summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/background/msd-background-manager.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/background/msd-background-manager.c b/plugins/background/msd-background-manager.c
index 724e01e..b00ed6a 100644
--- a/plugins/background/msd-background-manager.c
+++ b/plugins/background/msd-background-manager.c
@@ -104,6 +104,7 @@ caja_is_drawing_bg (MsdBackgroundManager *manager)
int format;
unsigned long nitems, after;
unsigned char *data;
+ GdkDisplay *gdk_display;
gboolean running = FALSE;
if (!manager->priv->caja_can_draw)
@@ -129,14 +130,15 @@ caja_is_drawing_bg (MsdBackgroundManager *manager)
if (wmclass_prop == None)
return FALSE;
- gdk_error_trap_push();
+ gdk_display = gdk_display_get_default ();
+ gdk_x11_display_error_trap_push (gdk_display);
XGetWindowProperty (display, caja_window, wmclass_prop, 0, 20, False,
XA_STRING, &type, &format, &nitems, &after, &data);
XSync (display, False);
- if (gdk_error_trap_pop() == BadWindow || data == NULL)
+ if (gdk_x11_display_error_trap_pop (gdk_display) == BadWindow || data == NULL)
return FALSE;
/* See: caja_desktop_window_new(), in src/caja-desktop-window.c */