Skip to content
Browse files

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.
  • Loading branch information...
1 parent 3e930df commit 804875e1d1dcb5e4969566cccf6b6fc882b98be5 Adel Gadllah committed with rat4 Dec 15, 2011
Showing with 6 additions and 1 deletion.
  1. +6 −1 src/compositor/meta-window-actor.c
View
7 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;
}
}

0 comments on commit 804875e

Please sign in to comment.
Something went wrong with that request. Please try again.