This is an automated email from the git hooks/post-receive script. o l i v i e r p u s h e d a c o m m i t t o b r a n c h m a s t e r in repository xfce/xfwm4.
commit bc07c4a1d21ea372b7d28d74987e376b0816a3d0 Author: Olivier Fourdan <four...@xfce.org> Date: Tue May 21 21:59:22 2019 +0200 compositor: Fix build without compositor Bug: 15432 Signed-off-by: Olivier Fourdan <four...@xfce.org> --- src/compositor.c | 20 ++++++++++++++++---- src/compositor.h | 2 +- src/main.c | 2 +- src/screen.h | 3 ++- src/settings.c | 2 +- 5 files changed, 21 insertions(+), 8 deletions(-) diff --git a/src/compositor.c b/src/compositor.c index 54c6ca8..3bfad4e 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -4911,26 +4911,38 @@ compositorTestServer (DisplayInfo *display_info) } vblankMode -compositorVblankMode (const gchar *vblank_mode) +compositorParseVblankMode (const gchar *vblank_setting) { #ifdef HAVE_PRESENT_EXTENSION - if (g_ascii_strcasecmp (vblank_mode, "xpresent") == 0) + if (g_ascii_strcasecmp (vblank_setting, "xpresent") == 0) { return VBLANK_XPRESENT; } else #endif /* HAVE_PRESENT_EXTENSION */ #ifdef HAVE_EPOXY - if (g_ascii_strcasecmp (vblank_mode, "glx") == 0) + if (g_ascii_strcasecmp (vblank_setting, "glx") == 0) { return VBLANK_GLX; } else #endif /* HAVE_EPOXY */ - if (g_ascii_strcasecmp (vblank_mode, "off") == 0) + if (g_ascii_strcasecmp (vblank_setting, "off") == 0) { return VBLANK_OFF; } return VBLANK_AUTO; } + +void +compositorSetVblankMode (ScreenInfo *screen_info, + vblankMode vblank_mode) +{ +#ifdef HAVE_COMPOSITOR + g_return_if_fail (screen_info != NULL); + TRACE ("entering"); + + screen_info->vblank_mode = vblank_mode; +#endif /* HAVE_COMPOSITOR */ +} diff --git a/src/compositor.h b/src/compositor.h index 0445fe5..533a359 100644 --- a/src/compositor.h +++ b/src/compositor.h @@ -79,6 +79,6 @@ void compositorWindowSetOpacity (DisplayInfo *, void compositorRebuildScreen (ScreenInfo *); gboolean compositorTestServer (DisplayInfo *); -vblankMode compositorVblankMode (const gchar *); +vblankMode compositorParseVblankMode (const gchar *); #endif /* INC_COMPOSITOR_H */ diff --git a/src/main.c b/src/main.c index ee1ae62..f1e7eb7 100644 --- a/src/main.c +++ b/src/main.c @@ -595,7 +595,7 @@ initialize (gint compositor_mode, gboolean replace_wm) if (vblank_mode != VBLANK_AUTO) { - screen_info->vblank_mode = vblank_mode; + compositorSetVblankMode (screen_info, vblank_mode); } if (compositor_mode == COMPOSITOR_MODE_AUTO) diff --git a/src/screen.h b/src/screen.h index 1496325..8deb289 100644 --- a/src/screen.h +++ b/src/screen.h @@ -76,6 +76,8 @@ struct _gaussian_conv { }; typedef struct _gaussian_conv gaussian_conv; +#endif /* HAVE_COMPOSITOR */ + typedef enum { VBLANK_OFF = 0, @@ -84,7 +86,6 @@ typedef enum VBLANK_GLX, VBLANK_ERROR, } vblankMode; -#endif /* HAVE_COMPOSITOR */ struct _ScreenInfo { diff --git a/src/settings.c b/src/settings.c index 7d3db10..8929be0 100644 --- a/src/settings.c +++ b/src/settings.c @@ -885,7 +885,7 @@ loadSettings (ScreenInfo *screen_info) value = getStringValue ("vblank_mode", rc); if (value) { - screen_info->vblank_mode = compositorVblankMode (value); + compositorSetVblankMode (screen_info, compositorParseVblankMode (value)); } freeRc (rc); -- To stop receiving notification emails like this one, please contact the administrator of this repository. _______________________________________________ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits