mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-03 09:23:24 +00:00
app, libgimp: protect a bit GDK X Window calls.
The GDK_WINDOWING_X11 build-time macro check is not enough as GDK can be built with both X11 and Wayland backends. We need to add a runtime check of the type of display.
This commit is contained in:
parent
9545406034
commit
33520a547d
2 changed files with 6 additions and 4 deletions
|
@ -913,8 +913,9 @@ static GdkWindow *
|
|||
gimp_get_foreign_window (guint32 window)
|
||||
{
|
||||
#ifdef GDK_WINDOWING_X11
|
||||
return gdk_x11_window_foreign_new_for_display (gdk_display_get_default (),
|
||||
window);
|
||||
if (GDK_IS_X11_DISPLAY (gdk_display_get_default ()))
|
||||
return gdk_x11_window_foreign_new_for_display (gdk_display_get_default (),
|
||||
window);
|
||||
#endif
|
||||
|
||||
#ifdef GDK_WINDOWING_WIN32
|
||||
|
|
|
@ -178,8 +178,9 @@ static GdkWindow *
|
|||
gimp_ui_get_foreign_window (guint32 window)
|
||||
{
|
||||
#ifdef GDK_WINDOWING_X11
|
||||
return gdk_x11_window_foreign_new_for_display (gdk_display_get_default (),
|
||||
window);
|
||||
if (GDK_IS_X11_DISPLAY (gdk_display_get_default ()))
|
||||
return gdk_x11_window_foreign_new_for_display (gdk_display_get_default (),
|
||||
window);
|
||||
#endif
|
||||
|
||||
#ifdef GDK_WINDOWING_WIN32
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue