aboutsummaryrefslogtreecommitdiff
path: root/xwayland
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-04-07 12:05:34 -0400
committerGitHub <noreply@github.com>2018-04-07 12:05:34 -0400
commitf4125220a58f508d54f5103d4b0580f1d047f6b9 (patch)
tree477dd94767e5365cf2a916ed2cee5834c4f5fa16 /xwayland
parentae4cef9e4189bddee5c7d8bd0e0e99c0bed43ea5 (diff)
parent8b07a4d05559698d3d88e227b2bb97f3fc9c4ca8 (diff)
Merge pull request #843 from emersion/fix-xwayland-unmap-signal
Emit xwayland unmap signal before unmapping
Diffstat (limited to 'xwayland')
-rw-r--r--xwayland/xwm.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/xwayland/xwm.c b/xwayland/xwm.c
index c2b9bd11..886fe251 100644
--- a/xwayland/xwm.c
+++ b/xwayland/xwm.c
@@ -743,6 +743,11 @@ static void xwm_handle_unmap_notify(struct wlr_xwm *xwm,
return;
}
+ if (xsurface->mapped) {
+ xsurface->mapped = false;
+ wlr_signal_emit_safe(&xsurface->events.unmap, xsurface);
+ }
+
if (xsurface->surface_id) {
// Make sure we're not on the unpaired surface list or we
// could be assigned a surface during surface creation that
@@ -757,11 +762,6 @@ static void xwm_handle_unmap_notify(struct wlr_xwm *xwm,
}
xsurface->surface = NULL;
- if (xsurface->mapped) {
- xsurface->mapped = false;
- wlr_signal_emit_safe(&xsurface->events.unmap, xsurface);
- }
-
xsurface_set_wm_state(xsurface, ICCCM_WITHDRAWN_STATE);
}