[Quartz] Only normal toplevels should be in the Windows menu.

The Quartz Window Manager adds to the Windows menu all NSWindows with
titles. Since we assign a default title to all windows that produced a
rather cluttered Windows menu containing among other things dialogs.
Setting aside that dialogs don't belong in the Windows menu, if
a dialog was hidden for reuse instead of destroyed it would persist in
the Windows menu and if clicked there would show, but because it wasn't
running wouldn't respond to events and so couldn't be hidden again and
would remain on top of its parent window.

Ref: https://bugs.gnucash.org/show_bug.cgi?id=797807
This commit is contained in:
John Ralls
2020-06-20 09:41:47 -07:00
parent ae97f04498
commit c884308da3
2 changed files with 12 additions and 6 deletions

View File

@ -847,6 +847,7 @@ _gdk_quartz_display_create_window_impl (GdkDisplay *display,
{
GdkWindowImplQuartz *impl;
GdkWindowImplQuartz *parent_impl;
GdkWindowTypeHint type_hint = GDK_WINDOW_TYPE_HINT_NORMAL;
GDK_QUARTZ_ALLOC_POOL;
@ -879,6 +880,12 @@ _gdk_quartz_display_create_window_impl (GdkDisplay *display,
impl->view = NULL;
if (attributes_mask & GDK_WA_TYPE_HINT)
{
type_hint = attributes->type_hint;
gdk_window_set_type_hint (window, type_hint);
}
switch (window->window_type)
{
case GDK_WINDOW_TOPLEVEL:
@ -908,8 +915,7 @@ _gdk_quartz_display_create_window_impl (GdkDisplay *display,
window->height);
if (window->window_type == GDK_WINDOW_TEMP ||
((attributes_mask & GDK_WA_TYPE_HINT) &&
attributes->type_hint == GDK_WINDOW_TYPE_HINT_SPLASHSCREEN))
type_hint == GDK_WINDOW_TYPE_HINT_SPLASHSCREEN)
{
style_mask = GDK_QUARTZ_BORDERLESS_WINDOW;
}
@ -927,6 +933,9 @@ _gdk_quartz_display_create_window_impl (GdkDisplay *display,
defer:NO
screen:screen];
if (type_hint != GDK_WINDOW_TYPE_HINT_NORMAL)
impl->toplevel.excludedFromWindowsMenu = true;
if (attributes_mask & GDK_WA_TITLE)
title = attributes->title;
else
@ -982,9 +991,6 @@ _gdk_quartz_display_create_window_impl (GdkDisplay *display,
}
GDK_QUARTZ_RELEASE_POOL;
if (attributes_mask & GDK_WA_TYPE_HINT)
gdk_window_set_type_hint (window, attributes->type_hint);
}
void

View File

@ -647,7 +647,7 @@ if broadway_enabled
endif
if quartz_enabled
pc_gdk_extra_libs += ['-framework Cocoa', '-framework Carbon', '-framework CoreGraphics']
pc_gdk_extra_libs += ['-Wl,-framework,Cocoa', '-Wl,-framework,Carbon', '-Wl,-framework,CoreGraphics']
endif
extra_demo_ldflags = []