aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevin J. Pohly <djpohly@gmail.com>2020-07-25 11:29:36 -0400
committerDevin J. Pohly <djpohly@gmail.com>2020-07-25 11:29:36 -0400
commit8b7cc8ada65939b12320b9c77d656401c1ca9f15 (patch)
tree31731dcde925543d6633a255ccf72da2697264d1
parentc4cf78aadba1f076afe93591ad7dd7a5528e5f25 (diff)
clarify createnotifyx11 function
-rw-r--r--dwl.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/dwl.c b/dwl.c
index 266c988..684a49a 100644
--- a/dwl.c
+++ b/dwl.c
@@ -574,14 +574,18 @@ createnotifyx11(struct wl_listener *listener, void *data)
/* Listen to the various events it can emit */
if (!xwayland_surface->override_redirect) {
+ c->map.notify = maprequest;
+ c->unmap.notify = unmapnotify;
+ /* Only "managed" windows can be activated */
c->activate.notify = activate;
wl_signal_add(&xwayland_surface->events.request_activate, &c->activate);
+ } else {
+ c->map.notify = maprequestindependent;
+ c->unmap.notify = unmapnotifyindependent;
}
- c->map.notify = xwayland_surface->override_redirect ? maprequestindependent : maprequest;
+ c->destroy.notify = destroynotify;
wl_signal_add(&xwayland_surface->events.map, &c->map);
- c->unmap.notify = xwayland_surface->override_redirect ? unmapnotifyindependent : unmapnotify;
wl_signal_add(&xwayland_surface->events.unmap, &c->unmap);
- c->destroy.notify = destroynotify;
wl_signal_add(&xwayland_surface->events.destroy, &c->destroy);
}