mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 22:20:24 +00:00
Fix CSD check for Win32
Win32 does not have alpha channel currently ; fix the check for this, so trying to enable CSDs on this platform will not "succeed" and crash the app anymore. Partially fixes gtk3-widget-factory.
This commit is contained in:
parent
c13c741143
commit
e45ea70936
@ -61,6 +61,10 @@
|
|||||||
#include "x11/gdkx.h"
|
#include "x11/gdkx.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef GDK_WINDOWING_WIN32
|
||||||
|
#include "win32/gdkwin32.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef GDK_WINDOWING_WAYLAND
|
#ifdef GDK_WINDOWING_WAYLAND
|
||||||
#include "wayland/gdkwayland.h"
|
#include "wayland/gdkwayland.h"
|
||||||
#endif
|
#endif
|
||||||
@ -3507,6 +3511,21 @@ gdk_window_supports_csd (GtkWindow *window)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef GDK_WINDOWING_WIN32
|
||||||
|
if (GDK_IS_WIN32_DISPLAY (gtk_widget_get_display (widget)))
|
||||||
|
{
|
||||||
|
GdkScreen *screen;
|
||||||
|
GdkVisual *visual;
|
||||||
|
|
||||||
|
screen = gtk_widget_get_screen (widget);
|
||||||
|
|
||||||
|
/* We need a visual with alpha */
|
||||||
|
visual = gdk_screen_get_rgba_visual (screen);
|
||||||
|
if (!visual)
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user