[gtk+] quartz: move tooltips window to the topmost level
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] quartz: move tooltips window to the topmost level
- Date: Sun, 18 Nov 2012 16:48:47 +0000 (UTC)
commit f2e05e2b4176082063c82d78b113d6065c0e77ec
Author: Michael Natterer <mitch gimp org>
Date: Sun Nov 18 17:42:31 2012 +0100
quartz: move tooltips window to the topmost level
so they can appear on top of popup menus. Also, reorder the switch()
statement in window_type_hint_to_level() so it resembles the stacking
order, to avoid confision like this in the future. Fixes bug 688512.
(cherry picked from commit 1a2509a6ab7f35caae758c2b31f40ef90d4fa94a)
gdk/quartz/gdkwindow-quartz.c | 27 +++++++++++++++------------
1 files changed, 15 insertions(+), 12 deletions(-)
---
diff --git a/gdk/quartz/gdkwindow-quartz.c b/gdk/quartz/gdkwindow-quartz.c
index ef104ca..4165a00 100644
--- a/gdk/quartz/gdkwindow-quartz.c
+++ b/gdk/quartz/gdkwindow-quartz.c
@@ -2318,25 +2318,28 @@ gdk_quartz_window_focus (GdkWindow *window,
static gint
window_type_hint_to_level (GdkWindowTypeHint hint)
{
+ /* the order in this switch statement corresponds to the actual
+ * stacking order: the first group is top, the last group is bottom
+ */
switch (hint)
{
- case GDK_WINDOW_TYPE_HINT_DOCK:
- case GDK_WINDOW_TYPE_HINT_UTILITY:
- return NSFloatingWindowLevel;
-
- case GDK_WINDOW_TYPE_HINT_MENU: /* Torn-off menu */
- case GDK_WINDOW_TYPE_HINT_DROPDOWN_MENU: /* Menu from menubar */
- return NSTornOffMenuWindowLevel;
+ case GDK_WINDOW_TYPE_HINT_POPUP_MENU:
+ case GDK_WINDOW_TYPE_HINT_COMBO:
+ case GDK_WINDOW_TYPE_HINT_DND:
+ case GDK_WINDOW_TYPE_HINT_TOOLTIP:
+ return NSPopUpMenuWindowLevel;
case GDK_WINDOW_TYPE_HINT_NOTIFICATION:
- case GDK_WINDOW_TYPE_HINT_TOOLTIP:
case GDK_WINDOW_TYPE_HINT_SPLASHSCREEN:
return NSStatusWindowLevel;
- case GDK_WINDOW_TYPE_HINT_POPUP_MENU:
- case GDK_WINDOW_TYPE_HINT_COMBO:
- case GDK_WINDOW_TYPE_HINT_DND:
- return NSPopUpMenuWindowLevel;
+ case GDK_WINDOW_TYPE_HINT_MENU: /* Torn-off menu */
+ case GDK_WINDOW_TYPE_HINT_DROPDOWN_MENU: /* Menu from menubar */
+ return NSTornOffMenuWindowLevel;
+
+ case GDK_WINDOW_TYPE_HINT_DOCK:
+ case GDK_WINDOW_TYPE_HINT_UTILITY:
+ return NSFloatingWindowLevel;
case GDK_WINDOW_TYPE_HINT_NORMAL: /* Normal toplevel window */
case GDK_WINDOW_TYPE_HINT_DIALOG: /* Dialog window */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]