aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevin J. Pohly <djpohly@gmail.com>2020-07-25 11:48:47 -0400
committerDevin J. Pohly <djpohly@gmail.com>2020-07-25 11:48:47 -0400
commitf2d025d4e9b6f9a83346cb4a9788ac45f3243536 (patch)
tree9679e7a2ae777a1f91623fc258aa6b691a3d2bd6
parente5e170e420aafaad4cb851caeca8d652f9949846 (diff)
do managed check in activatex11
-rw-r--r--dwl.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/dwl.c b/dwl.c
index 0780632..5e2923c 100644
--- a/dwl.c
+++ b/dwl.c
@@ -281,7 +281,7 @@ activatex11(struct wl_listener *listener, void *data)
{
Client *c = wl_container_of(listener, c, activate);
- if (c && c->isx11)
+ if (c->type == X11Managed)
wlr_xwayland_surface_activate(c->xwayland_surface, 1);
}
@@ -580,16 +580,16 @@ createnotifyx11(struct wl_listener *listener, void *data)
c->map.notify = maprequest;
c->unmap.notify = unmapnotify;
/* Only "managed" windows can be activated */
- c->activate.notify = activatex11;
- wl_signal_add(&xwayland_surface->events.request_activate, &c->activate);
} else {
c->type = X11Unmanaged;
c->map.notify = maprequestindependent;
c->unmap.notify = unmapnotifyindependent;
}
- c->destroy.notify = destroynotify;
wl_signal_add(&xwayland_surface->events.map, &c->map);
wl_signal_add(&xwayland_surface->events.unmap, &c->unmap);
+ c->activate.notify = activatex11;
+ wl_signal_add(&xwayland_surface->events.request_activate, &c->activate);
+ c->destroy.notify = destroynotify;
wl_signal_add(&xwayland_surface->events.destroy, &c->destroy);
}