[gtk/gtk-3-24] [Quartz] Only normal toplevels should be in the Windows menu.
- From: John Ralls <jralls src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/gtk-3-24] [Quartz] Only normal toplevels should be in the Windows menu.
- Date: Sat, 20 Jun 2020 18:17:53 +0000 (UTC)
commit c884308da3d2afe362eff6a6d2fce421e11834ca
Author: John Ralls <jralls ceridwen us>
Date: Sat Jun 20 09:41:47 2020 -0700
[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
gdk/quartz/gdkwindow-quartz.c | 16 +++++++++++-----
meson.build | 2 +-
2 files changed, 12 insertions(+), 6 deletions(-)
---
diff --git a/gdk/quartz/gdkwindow-quartz.c b/gdk/quartz/gdkwindow-quartz.c
index 6f72793a82..0cf7f9057d 100644
--- a/gdk/quartz/gdkwindow-quartz.c
+++ b/gdk/quartz/gdkwindow-quartz.c
@@ -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
diff --git a/meson.build b/meson.build
index 415a66c732..e5e2eba05c 100644
--- a/meson.build
+++ b/meson.build
@@ -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 = []
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]