diff options
-rw-r--r-- | src/compositor/compositor-xrender.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/compositor/compositor-xrender.c b/src/compositor/compositor-xrender.c index 4e8030d2..623d6ce8 100644 --- a/src/compositor/compositor-xrender.c +++ b/src/compositor/compositor-xrender.c @@ -1029,6 +1029,7 @@ get_window_picture (MetaCompWindow *cw) XRenderPictureAttributes pa; XRenderPictFormat *format; Drawable draw; + int error_code; draw = cw->id; @@ -1037,6 +1038,10 @@ get_window_picture (MetaCompWindow *cw) if (cw->back_pixmap == None) cw->back_pixmap = XCompositeNameWindowPixmap (xdisplay, cw->id); + error_code = meta_error_trap_pop_with_return (display, FALSE); + if (error_code != 0) + cw->back_pixmap = None; + if (cw->back_pixmap != None) draw = cw->back_pixmap; @@ -1047,13 +1052,13 @@ get_window_picture (MetaCompWindow *cw) pa.subwindow_mode = IncludeInferiors; + meta_error_trap_push (display); pict = XRenderCreatePicture (xdisplay, draw, format, CPSubwindowMode, &pa); meta_error_trap_pop (display, FALSE); return pict; } - meta_error_trap_pop (display, FALSE); return None; } |