[gdk-quartz] Set POPUP_MENU type hint for GDK_WINDOW_TEMP.

GDK_WINDOW_TEMP is set only for GTK_WINDOW_POPUP. If the type_hint
is left at the default GDK_WINDOW_TYPE_HINT_NORMAL the Quartz WM
will fullscreen it, which isn't desirable for popup menus or other
popups.

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/5716
This commit is contained in:
John Ralls
2023-08-28 20:23:13 -07:00
parent 022c36a137
commit 4560664fff

View File

@ -2389,6 +2389,10 @@ gdk_quartz_window_set_type_hint (GdkWindow *window,
if (!impl)
return;
if (hint == GDK_WINDOW_TYPE_HINT_NORMAL &&
window->window_type == GDK_WINDOW_TEMP)
hint = GDK_WINDOW_TYPE_HINT_POPUP_MENU;
impl->type_hint = hint;
/* Match the documentation, only do something if we're not mapped yet. */