diff options
-rw-r--r-- | applets/wncklet/window-list.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/applets/wncklet/window-list.c b/applets/wncklet/window-list.c index 32e6a602..f9e14f2b 100644 --- a/applets/wncklet/window-list.c +++ b/applets/wncklet/window-list.c @@ -288,6 +288,8 @@ preview_window_thumbnail (WnckWindow *wnck_window, *thumbnail_width = (int) ((double) width * ratio); } + gdk_x11_display_error_trap_push (gdk_window_get_display (window)); + thumbnail = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, *thumbnail_width, *thumbnail_height); @@ -298,6 +300,12 @@ preview_window_thumbnail (WnckWindow *wnck_window, cairo_paint (cr); cairo_destroy (cr); + if (gdk_x11_display_error_trap_pop (gdk_window_get_display (window))) + { + cairo_surface_destroy (thumbnail); + thumbnail = NULL; + } + g_object_unref (window); return thumbnail; |