summaryrefslogtreecommitdiff
path: root/libmate-desktop/mate-rr.c
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2012-11-15 08:26:24 -0800
committerStefano Karapetsas <[email protected]>2012-11-15 08:26:24 -0800
commit86a51f1ba55208272a50e17ac94f745907131758 (patch)
tree93d19d85feadd31f2027f09557447998ebd42bda /libmate-desktop/mate-rr.c
parent30ec51cebbfaa251bff071e39ab777af012cb015 (diff)
parent39d84d1c8a3ff07d20126f7220b7a3bfec5e306a (diff)
downloadmate-desktop-86a51f1ba55208272a50e17ac94f745907131758.tar.bz2
mate-desktop-86a51f1ba55208272a50e17ac94f745907131758.tar.xz
Merge pull request #36 from jasmineaura/develop
Properly support GTK3, simplify GTK2 compat, and some fixes
Diffstat (limited to 'libmate-desktop/mate-rr.c')
-rw-r--r--libmate-desktop/mate-rr.c8
1 files changed, 8 insertions, 0 deletions
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
}