From 12a5e1c02b9f3184dc0e507d5ce7dc5eb90c9253 Mon Sep 17 00:00:00 2001 From: Adel Gadllah Date: Thu, 15 Dec 2011 19:44:11 +0100 Subject: [PATCH] meta-window-actor: Add error traps in meta_window_actor_set_redirected meta_window_actor_set_redirected makes X calls on the client window so it need to set error traps. --- src/compositor/meta-window-actor.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/compositor/meta-window-actor.c b/src/compositor/meta-window-actor.c index 5f7951059..d9dc1b22b 100644 --- a/src/compositor/meta-window-actor.c +++ b/src/compositor/meta-window-actor.c @@ -1252,19 +1252,24 @@ void meta_window_actor_set_redirected (MetaWindowActor *self, gboolean state) { MetaWindow *metaWindow = meta_window_actor_get_meta_window (self); + MetaDisplay *display = meta_window_get_display (metaWindow); - Display *xdisplay = meta_display_get_xdisplay (meta_window_get_display (metaWindow)); + Display *xdisplay = meta_display_get_xdisplay (display); Window xwin = meta_window_actor_get_x_window (self); if (state) { + meta_error_trap_push (display); XCompositeRedirectWindow (xdisplay, xwin, CompositeRedirectManual); + meta_error_trap_pop (display); meta_window_actor_queue_create_pixmap (self); self->priv->unredirected = FALSE; } else { + meta_error_trap_push (display); XCompositeUnredirectWindow (xdisplay, xwin, CompositeRedirectManual); + meta_error_trap_pop (display); self->priv->unredirected = TRUE; } }