summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2022-11-21 12:59:42 +0100
committerMarge Bot <marge-bot@gnome.org>2022-12-01 20:10:52 +0000
commitdae981cc5c63b05225b4e1dcc2d544adb917ccfb (patch)
tree286ab94ed1b3e61fff03707107ff54e370c6537a
parenta60863838e4a263f1d3ff1327eba59a72e33656b (diff)
downloadmutter-dae981cc5c63b05225b4e1dcc2d544adb917ccfb.tar.gz
core: Avoid notifying the stack manager of frame reparents during unmanaging
This may result in a view of the stack in MetaStackManager that does not correspond to reality, since the window is already being unmanaged, there is no point either in notifying the stack manager about it. This slight divergence with reality in the MetaStackManager may produce a non-accurate view if querying its state has to go through the predicted branches. Later synchronization with the X11 stack may even this out, but the result really depends on when it is asked. Fixes some intermittent failures in the stacking/closed-transient-only-take-focus-parents unit test. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2175>
-rw-r--r--src/core/frame.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/core/frame.c b/src/core/frame.c
index 9c8cbb946..f995ca2c3 100644
--- a/src/core/frame.c
+++ b/src/core/frame.c
@@ -194,9 +194,12 @@ meta_window_destroy_frame (MetaWindow *window)
if (!x11_display->closing)
{
- meta_stack_tracker_record_add (window->display->stack_tracker,
- window->xwindow,
- XNextRequest (x11_display->xdisplay));
+ if (!window->unmanaging)
+ {
+ meta_stack_tracker_record_add (window->display->stack_tracker,
+ window->xwindow,
+ XNextRequest (x11_display->xdisplay));
+ }
XReparentWindow (x11_display->xdisplay,
window->xwindow,