aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-11-06 18:25:54 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-11-06 18:25:54 +0000
commitb541ce9d5cd64344a7bfeea981fe52128e4bb88a (patch)
treea8713e43bd93c30642a4dfbefa10597dd179edfe
parentselection: explicitly set direction when right-click extending (diff)
wayland: output removed: only call surface_leave() if term is actually mapped on that output
-rw-r--r--wayland.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/wayland.c b/wayland.c
index e8a57c6a..ae285a50 100644
--- a/wayland.c
+++ b/wayland.c
@@ -470,7 +470,7 @@ surface_leave(void *data, struct wl_surface *wl_surface,
return;
}
- LOG_ERR("unmapped from unknown output");
+ LOG_WARN("unmapped from unknown output");
}
static const struct wl_surface_listener surface_listener = {
@@ -921,8 +921,14 @@ handle_global_remove(void *data, struct wl_registry *registry, uint32_t name)
* surfaces are *not* unmapped before the output is removed
*/
- tll_foreach(wayl->terms, t)
- surface_leave(t->item->window, NULL /* wl_surface - unused */, mon->output);
+ tll_foreach(wayl->terms, t) {
+ tll_foreach(t->item->window->on_outputs, o) {
+ if (o->item->output == mon->output) {
+ surface_leave(t->item->window, NULL, mon->output);
+ break;
+ }
+ }
+ }
monitor_destroy(mon);
tll_remove(wayl->monitors, it);