aboutsummaryrefslogtreecommitdiffstats
path: root/sway/desktop/layer_shell.c
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2018-03-29 12:19:20 -0400
committerLibravatar Drew DeVault <sir@cmpwn.com>2018-03-29 22:11:08 -0400
commita76829f3756d3df22fe46e6688374497de29c2e1 (patch)
tree2dc57796bf9975dacd3de8913cfe97d0c8fa981d /sway/desktop/layer_shell.c
parentRespect user bar height preference (diff)
downloadsway-a76829f3756d3df22fe46e6688374497de29c2e1.tar.gz
sway-a76829f3756d3df22fe46e6688374497de29c2e1.tar.zst
sway-a76829f3756d3df22fe46e6688374497de29c2e1.zip
Some layer shell fixes
Based on the corresponding rootston changes
Diffstat (limited to 'sway/desktop/layer_shell.c')
-rw-r--r--sway/desktop/layer_shell.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/sway/desktop/layer_shell.c b/sway/desktop/layer_shell.c
index bd62f84a..31679fb2 100644
--- a/sway/desktop/layer_shell.c
+++ b/sway/desktop/layer_shell.c
@@ -193,22 +193,10 @@ static void handle_output_destroy(struct wl_listener *listener, void *data) {
193 struct sway_layer_surface *sway_layer = 193 struct sway_layer_surface *sway_layer =
194 wl_container_of(listener, sway_layer, output_destroy); 194 wl_container_of(listener, sway_layer, output_destroy);
195 wl_list_remove(&sway_layer->output_destroy.link); 195 wl_list_remove(&sway_layer->output_destroy.link);
196 wl_list_remove(&sway_layer->output_mode.link);
197 wl_list_remove(&sway_layer->output_transform.link);
198 sway_layer->layer_surface->output = NULL; 196 sway_layer->layer_surface->output = NULL;
199 wlr_layer_surface_close(sway_layer->layer_surface); 197 wlr_layer_surface_close(sway_layer->layer_surface);
200} 198}
201 199
202static void handle_output_mode(struct wl_listener *listener, void *data) {
203 struct wlr_output *output = data;
204 arrange_layers((struct sway_output *)output->data);
205}
206
207static void handle_output_transform(struct wl_listener *listener, void *data) {
208 struct wlr_output *output = data;
209 arrange_layers((struct sway_output *)output->data);
210}
211
212static void handle_surface_commit(struct wl_listener *listener, void *data) { 200static void handle_surface_commit(struct wl_listener *listener, void *data) {
213 struct sway_layer_surface *layer = 201 struct sway_layer_surface *layer =
214 wl_container_of(listener, layer, surface_commit); 202 wl_container_of(listener, layer, surface_commit);
@@ -243,8 +231,6 @@ static void handle_destroy(struct wl_listener *listener, void *data) {
243 wl_list_remove(&sway_layer->surface_commit.link); 231 wl_list_remove(&sway_layer->surface_commit.link);
244 if (sway_layer->layer_surface->output != NULL) { 232 if (sway_layer->layer_surface->output != NULL) {
245 wl_list_remove(&sway_layer->output_destroy.link); 233 wl_list_remove(&sway_layer->output_destroy.link);
246 wl_list_remove(&sway_layer->output_mode.link);
247 wl_list_remove(&sway_layer->output_transform.link);
248 } 234 }
249 struct sway_output *output = sway_layer->layer_surface->output->data; 235 struct sway_output *output = sway_layer->layer_surface->output->data;
250 arrange_layers(output); 236 arrange_layers(output);
@@ -289,14 +275,6 @@ void handle_layer_shell_surface(struct wl_listener *listener, void *data) {
289 wl_signal_add(&layer_surface->output->events.destroy, 275 wl_signal_add(&layer_surface->output->events.destroy,
290 &sway_layer->output_destroy); 276 &sway_layer->output_destroy);
291 277
292 sway_layer->output_mode.notify = handle_output_mode;
293 wl_signal_add(&layer_surface->output->events.mode,
294 &sway_layer->output_mode);
295
296 sway_layer->output_transform.notify = handle_output_transform;
297 wl_signal_add(&layer_surface->output->events.transform,
298 &sway_layer->output_transform);
299
300 sway_layer->destroy.notify = handle_destroy; 278 sway_layer->destroy.notify = handle_destroy;
301 wl_signal_add(&layer_surface->events.destroy, &sway_layer->destroy); 279 wl_signal_add(&layer_surface->events.destroy, &sway_layer->destroy);
302 sway_layer->map.notify = handle_map; 280 sway_layer->map.notify = handle_map;