summaryrefslogtreecommitdiff
path: root/src/test-fade.c
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2013-11-12 16:53:07 +0100
committerStefano Karapetsas <[email protected]>2013-11-12 16:53:07 +0100
commit31d78b8027002647879a0c3ffd508b0c93c2202b (patch)
treeaa427430983965ce6f388e4c6b9e2c0e962187a8 /src/test-fade.c
parent48d434125bb52e3f61556876546c91dd3b361ec7 (diff)
downloadmate-screensaver-31d78b8027002647879a0c3ffd508b0c93c2202b.tar.bz2
mate-screensaver-31d78b8027002647879a0c3ffd508b0c93c2202b.tar.xz
test-fade: Add GTK3 support
Diffstat (limited to 'src/test-fade.c')
-rw-r--r--src/test-fade.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test-fade.c b/src/test-fade.c
index 3b10a37..b906460 100644
--- a/src/test-fade.c
+++ b/src/test-fade.c
@@ -101,7 +101,11 @@ main (int argc,
exit (1);
}
+#if GTK_CHECK_VERSION (3, 0, 0)
+ if (! XQueryExtension (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), XF86_VIDMODE_NAME, &op, &event, &err))
+#else
if (! XQueryExtension (GDK_DISPLAY (), XF86_VIDMODE_NAME, &op, &event, &err))
+#endif
{
g_message ("no " XF86_VIDMODE_NAME " extension");
}
@@ -111,7 +115,11 @@ main (int argc,
int major;
int minor;
+#if GTK_CHECK_VERSION (3, 0, 0)
+ if (! XF86VidModeQueryVersion (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), &major, &minor))
+#else
if (! XF86VidModeQueryVersion (GDK_DISPLAY (), &major, &minor))
+#endif
{
g_message ("unable to get " XF86_VIDMODE_NAME " version");
}