mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-12-22 18:09:49 +01:00
Emit xwayland unmap signal before unmapping
This allows compositors to access the surface being unmapped. This is also more consistent with the destroy signal.
This commit is contained in:
parent
ae4cef9e41
commit
8b07a4d055
1 changed files with 5 additions and 5 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue