summaryrefslogtreecommitdiff
path: root/libmate-desktop/mate-rr.c
diff options
context:
space:
mode:
Diffstat (limited to 'libmate-desktop/mate-rr.c')
-rw-r--r--libmate-desktop/mate-rr.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libmate-desktop/mate-rr.c b/libmate-desktop/mate-rr.c
index 7b2d32a..d61dd45 100644
--- a/libmate-desktop/mate-rr.c
+++ b/libmate-desktop/mate-rr.c
@@ -673,7 +673,11 @@ mate_rr_screen_new (GdkScreen *gdk_screen,
screen->gdk_screen = gdk_screen;
screen->gdk_root = gdk_screen_get_root_window (gdk_screen);
+ #if GTK_CHECK_VERSION(3, 0, 0)
+ screen->xroot = gdk_x11_window_get_xid (screen->gdk_root);
+ #else
screen->xroot = gdk_x11_drawable_get_xid (screen->gdk_root);
+ #endif
screen->xdisplay = dpy;
screen->xscreen = gdk_x11_screen_get_xscreen (screen->gdk_screen);
screen->connector_type_atom = XInternAtom (dpy, "ConnectorType", FALSE);