summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2018-08-12 15:04:32 +0200
committerraveit65 <[email protected]>2018-08-15 17:59:32 +0200
commit5e16dc1799dbe6e9293c0d91e88c53023e8875d3 (patch)
tree4f2c899ebd3ae4c22441d180312a5a37d57ec1fc
parentd21326d41943dd89d2f48fd254b3cc4ea51d2178 (diff)
downloadmate-desktop-5e16dc1799dbe6e9293c0d91e88c53023e8875d3.tar.bz2
mate-desktop-5e16dc1799dbe6e9293c0d91e88c53023e8875d3.tar.xz
mate-bg: replace deprecated gdk_error_trap_push/pop
-rw-r--r--libmate-desktop/mate-bg.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/libmate-desktop/mate-bg.c b/libmate-desktop/mate-bg.c
index 0201552..2a454b7 100644
--- a/libmate-desktop/mate-bg.c
+++ b/libmate-desktop/mate-bg.c
@@ -1444,6 +1444,7 @@ mate_bg_get_surface_from_root (GdkScreen *screen)
int screen_num;
cairo_surface_t *surface;
cairo_surface_t *source_pixmap;
+ GdkDisplay *gdkdisplay;
int width, height;
cairo_t *cr;
@@ -1466,7 +1467,8 @@ mate_bg_get_surface_from_root (GdkScreen *screen)
}
if (data != NULL) {
- gdk_error_trap_push ();
+ gdkdisplay = gdk_screen_get_display (screen);
+ gdk_x11_display_error_trap_push (gdkdisplay);
Pixmap xpixmap = *(Pixmap *) data;
Window root_return;
@@ -1484,7 +1486,7 @@ mate_bg_get_surface_from_root (GdkScreen *screen)
w_ret, h_ret);
}
- gdk_error_trap_pop_ignored ();
+ gdk_x11_display_error_trap_pop_ignored (gdkdisplay);
}
width = WidthOfScreen (gdk_x11_screen_get_xscreen (screen));
@@ -1537,6 +1539,7 @@ mate_bg_set_root_pixmap_id (GdkScreen *screen,
int format, result;
unsigned long nitems, after;
unsigned char *data_root, *data_esetroot;
+ GdkDisplay *gdkdisplay;
/* Get atoms for both properties in an array, only if they exist.
* This method is to avoid multiple round-trips to Xserver
@@ -1561,14 +1564,15 @@ mate_bg_set_root_pixmap_id (GdkScreen *screen,
Pixmap xrootpmap = *((Pixmap *) data_root);
Pixmap esetrootpmap = *((Pixmap *) data_esetroot);
- gdk_error_trap_push ();
+ gdkdisplay = gdk_screen_get_display (screen);
+ gdk_x11_display_error_trap_push (gdkdisplay);
if (xrootpmap && xrootpmap == esetrootpmap) {
XKillClient (display, xrootpmap);
}
if (esetrootpmap && esetrootpmap != xrootpmap) {
XKillClient (display, esetrootpmap);
}
- gdk_error_trap_pop_ignored ();
+ gdk_x11_display_error_trap_pop_ignored (gdkdisplay);
}
if (data_esetroot != NULL) {
XFree (data_esetroot);