mirror of
https://github.com/brl/mutter.git
synced 2024-11-28 19:10:43 -05:00
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.
This commit is contained in:
parent
974be1035e
commit
12a5e1c02b
@ -1252,19 +1252,24 @@ void
|
|||||||
meta_window_actor_set_redirected (MetaWindowActor *self, gboolean state)
|
meta_window_actor_set_redirected (MetaWindowActor *self, gboolean state)
|
||||||
{
|
{
|
||||||
MetaWindow *metaWindow = meta_window_actor_get_meta_window (self);
|
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);
|
Window xwin = meta_window_actor_get_x_window (self);
|
||||||
|
|
||||||
if (state)
|
if (state)
|
||||||
{
|
{
|
||||||
|
meta_error_trap_push (display);
|
||||||
XCompositeRedirectWindow (xdisplay, xwin, CompositeRedirectManual);
|
XCompositeRedirectWindow (xdisplay, xwin, CompositeRedirectManual);
|
||||||
|
meta_error_trap_pop (display);
|
||||||
meta_window_actor_queue_create_pixmap (self);
|
meta_window_actor_queue_create_pixmap (self);
|
||||||
self->priv->unredirected = FALSE;
|
self->priv->unredirected = FALSE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
meta_error_trap_push (display);
|
||||||
XCompositeUnredirectWindow (xdisplay, xwin, CompositeRedirectManual);
|
XCompositeUnredirectWindow (xdisplay, xwin, CompositeRedirectManual);
|
||||||
|
meta_error_trap_pop (display);
|
||||||
self->priv->unredirected = TRUE;
|
self->priv->unredirected = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user