summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasmine Hassan <[email protected]>2012-11-11 06:58:41 +0200
committerJasmine Hassan <[email protected]>2012-11-11 19:35:36 +0200
commitd8ad1966e4bc8745160386d704fe67c9000d4bb0 (patch)
treeb162f81b6c0eddf1a58e208bd8e32591d82e58ca
parentd15854911034f7cce3c949aee2ec39f512890ae3 (diff)
downloadmate-desktop-d8ad1966e4bc8745160386d704fe67c9000d4bb0.tar.bz2
mate-desktop-d8ad1966e4bc8745160386d704fe67c9000d4bb0.tar.xz
[libmate-desktop] make error traps use the new GTK APIs
http://git.gnome.org/browse/gnome-desktop/commit/?id=da4d293870762064285231fba3a2a7c3c0d25838
-rw-r--r--libmate-desktop/mate-bg.c6
-rw-r--r--libmate-desktop/mate-rr.c8
2 files changed, 13 insertions, 1 deletions
diff --git a/libmate-desktop/mate-bg.c b/libmate-desktop/mate-bg.c
index 1423415..5252020 100644
--- a/libmate-desktop/mate-bg.c
+++ b/libmate-desktop/mate-bg.c
@@ -1306,7 +1306,7 @@ mate_bg_get_pixmap_from_root (GdkScreen *screen)
w_ret, h_ret);
}
- gdk_error_trap_pop ();
+ gdk_error_trap_pop_ignored ();
#else
source_pixmap = gdk_pixmap_foreign_new (*(Pixmap *) data);
gdk_error_trap_pop ();
@@ -1408,8 +1408,12 @@ mate_bg_set_root_pixmap_id (GdkScreen *screen,
nitems == 1) {
gdk_error_trap_push ();
XKillClient (display, *(Pixmap *)data_esetroot);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gdk_error_trap_pop_ignored ();
+#else
gdk_flush ();
gdk_error_trap_pop ();
+#endif
}
XFree (data_esetroot);
}
diff --git a/libmate-desktop/mate-rr.c b/libmate-desktop/mate-rr.c
index 5c73ce9..22852d4 100644
--- a/libmate-desktop/mate-rr.c
+++ b/libmate-desktop/mate-rr.c
@@ -486,8 +486,12 @@ fill_out_screen_info (Display *xdisplay,
if (info->screen->rr_major_version == 1 && info->screen->rr_minor_version >= 3) {
gdk_error_trap_push ();
info->primary = XRRGetOutputPrimary (xdisplay, xroot);
+ #if GTK_CHECK_VERSION (3, 0, 0)
+ gdk_error_trap_pop_ignored ();
+ #else
gdk_flush ();
gdk_error_trap_pop (); /* ignore error */
+ #endif
}
#endif
@@ -746,8 +750,12 @@ mate_rr_screen_set_size (MateRRScreen *screen,
gdk_error_trap_push ();
XRRSetScreenSize (screen->xdisplay, screen->xroot,
width, height, mm_width, mm_height);
+ #if GTK_CHECK_VERSION (3, 0, 0)
+ gdk_error_trap_pop_ignored ();
+ #else
gdk_flush ();
gdk_error_trap_pop (); /* ignore error */
+ #endif
#endif
}