gdk: Use X11 API only when running under X11
Avoid using GdkX11Screen API when the GDK backend being used is not the X11 one. https://bugzilla.gnome.org/show_bug.cgi?id=752143
This commit is contained in:
parent
41cd804f10
commit
365bd482fb
@ -534,11 +534,12 @@ clutter_gdk_get_visual (void)
|
||||
g_assert (screen != NULL);
|
||||
|
||||
#if defined(GDK_WINDOWING_X11) && defined(COGL_HAS_XLIB_SUPPORT)
|
||||
{
|
||||
XVisualInfo *xvisinfo = cogl_clutter_winsys_xlib_get_visual_info ();
|
||||
if (xvisinfo != NULL)
|
||||
return gdk_x11_screen_lookup_visual (screen, xvisinfo->visualid);
|
||||
}
|
||||
if (GDK_IS_X11_SCREEN (screen))
|
||||
{
|
||||
XVisualInfo *xvisinfo = cogl_clutter_winsys_xlib_get_visual_info ();
|
||||
if (xvisinfo != NULL)
|
||||
return gdk_x11_screen_lookup_visual (screen, xvisinfo->visualid);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (gdk_screen_get_rgba_visual (screen) != NULL)
|
||||
|
Loading…
Reference in New Issue
Block a user