From 0a821d23417898efc8554195f445e5349be50549 Mon Sep 17 00:00:00 2001 From: "Owen W. Taylor" Date: Tue, 4 Jan 2011 11:43:02 -0500 Subject: [PATCH] Update window->visible_to_compositor before calling into compositor To deal with reentrancy from compositor plugins doing things like moving windows between workspaces in an effect callback, update the visible_to_compositor flag before calling into the compositor. https://bugzilla.gnome.org/show_bug.cgi?id=613124 --- src/core/window.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/window.c b/src/core/window.c index 3e5c754c0..afd721d30 100644 --- a/src/core/window.c +++ b/src/core/window.c @@ -2678,6 +2678,8 @@ meta_window_show (MetaWindow *window) if (!window->visible_to_compositor) { + window->visible_to_compositor = TRUE; + if (window->display->compositor) { MetaCompEffect effect = META_COMP_EFFECT_NONE; @@ -2697,8 +2699,6 @@ meta_window_show (MetaWindow *window) meta_compositor_show_window (window->display->compositor, window, effect); } - - window->visible_to_compositor = TRUE; } /* We don't want to worry about all cases from inside @@ -2769,6 +2769,8 @@ meta_window_hide (MetaWindow *window) if (window->visible_to_compositor) { + window->visible_to_compositor = FALSE; + if (window->display->compositor) { MetaCompEffect effect = META_COMP_EFFECT_NONE; @@ -2788,8 +2790,6 @@ meta_window_hide (MetaWindow *window) meta_compositor_hide_window (window->display->compositor, window, effect); } - - window->visible_to_compositor = FALSE; } did_hide = FALSE;