summaryrefslogtreecommitdiff
path: root/src/gs-fade.c
diff options
context:
space:
mode:
authorinfirit <[email protected]>2015-07-09 10:39:04 +0200
committerinfirit <[email protected]>2015-07-09 11:28:41 +0200
commit1b8f66d0f995b2f9ccf56c9ab7a27c2f68442c50 (patch)
treed191f95dc10adac55375ed5f15425fda420f3abf /src/gs-fade.c
parentc1d1e089a69c5e90e8b0cf4b96335899f209e7f0 (diff)
downloadmate-screensaver-1b8f66d0f995b2f9ccf56c9ab7a27c2f68442c50.tar.bz2
mate-screensaver-1b8f66d0f995b2f9ccf56c9ab7a27c2f68442c50.tar.xz
Always use GDK_DISPLAY_XDISPLAY instead of GDK_DISPLAY
Has been in Gtk since 2.22
Diffstat (limited to 'src/gs-fade.c')
-rw-r--r--src/gs-fade.c28
1 files changed, 0 insertions, 28 deletions
diff --git a/src/gs-fade.c b/src/gs-fade.c
index b4ccb07..566078d 100644
--- a/src/gs-fade.c
+++ b/src/gs-fade.c
@@ -217,11 +217,7 @@ xf86_whack_gamma (int screen,
g2.blue = XF86_MIN_GAMMA;
}
-#if GTK_CHECK_VERSION (3, 0, 0)
status = XF86VidModeSetGamma (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), screen, &g2);
-#else
- status = XF86VidModeSetGamma (GDK_DISPLAY (), screen, &g2);
-#endif
}
else
{
@@ -241,11 +237,7 @@ xf86_whack_gamma (int screen,
b[i] = gamma_info->b[i] * ratio;
}
-#if GTK_CHECK_VERSION (3, 0, 0)
status = XF86VidModeSetGammaRamp (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), screen, gamma_info->size, r, g, b);
-#else
- status = XF86VidModeSetGammaRamp (GDK_DISPLAY (), screen, gamma_info->size, r, g, b);
-#endif
g_free (r);
g_free (g);
@@ -321,11 +313,7 @@ gamma_fade_setup (GSFade *fade, int screen_idx)
{
/* have ramps */
-#if GTK_CHECK_VERSION (3, 0, 0)
res = XF86VidModeGetGammaRampSize (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), screen_idx, &screen_priv->info->size);
-#else
- res = XF86VidModeGetGammaRampSize (GDK_DISPLAY (), screen_idx, &screen_priv->info->size);
-#endif
if (!res || screen_priv->info->size <= 0)
{
screen_priv->fade_type = FADE_TYPE_GAMMA_NUMBER;
@@ -342,11 +330,7 @@ gamma_fade_setup (GSFade *fade, int screen_idx)
goto test_number;
}
-#if GTK_CHECK_VERSION (3, 0, 0)
res = XF86VidModeGetGammaRamp (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
-#else
- res = XF86VidModeGetGammaRamp (GDK_DISPLAY (),
-#endif
screen_idx,
screen_priv->info->size,
screen_priv->info->r,
@@ -366,11 +350,7 @@ test_number:
{
/* only have gamma parameter, not ramps. */
-#if GTK_CHECK_VERSION (3, 0, 0)
res = XF86VidModeGetGamma (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), screen_idx, &screen_priv->vmg);
-#else
- res = XF86VidModeGetGamma (GDK_DISPLAY (), screen_idx, &screen_priv->vmg);
-#endif
if (! res)
{
screen_priv->fade_type = FADE_TYPE_NONE;
@@ -452,19 +432,11 @@ check_gamma_extension (GSFade *fade, int screen_idx)
screen_priv = &fade->priv->screen_priv[screen_idx];
#ifdef HAVE_XF86VMODE_GAMMA
-#if GTK_CHECK_VERSION (3, 0, 0)
res = XF86VidModeQueryExtension (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), &event, &error);
-#else
- res = XF86VidModeQueryExtension (GDK_DISPLAY (), &event, &error);
-#endif
if (! res)
goto fade_none;
-#if GTK_CHECK_VERSION (3, 0, 0)
res = safe_XF86VidModeQueryVersion (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), &major, &minor);
-#else
- res = safe_XF86VidModeQueryVersion (GDK_DISPLAY (), &major, &minor);
-#endif
if (! res)
goto fade_none;