Skip to content

Commit

Permalink
quartz: move dialogs to the same window level as utility windows
Browse files Browse the repository at this point in the history
window_type_hint_to_level(): applied patch from Paul Davis which moves
dialogs to NSFloatingWindowLevel. This is not quite the perfect
solution, but it's a pragmatic fix that makes apps which have both
window types much more usable, and prevents dialog from disappearing
under an application's main window.
(cherry picked from commit 59d49e1)
  • Loading branch information
mitchfoo committed Jun 6, 2013
1 parent f29841a commit 4c896c9
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions gdk/quartz/gdkwindow-quartz.c
Original file line number Diff line number Diff line change
Expand Up @@ -2289,14 +2289,18 @@ window_type_hint_to_level (GdkWindowTypeHint hint)
return NSTornOffMenuWindowLevel;

case GDK_WINDOW_TYPE_HINT_DOCK:
return NSFloatingWindowLevel; /* NSDockWindowLevel is deprecated, and not replaced */

case GDK_WINDOW_TYPE_HINT_UTILITY:
case GDK_WINDOW_TYPE_HINT_DIALOG: /* Dialog window */
return NSFloatingWindowLevel;

case GDK_WINDOW_TYPE_HINT_NORMAL: /* Normal toplevel window */
case GDK_WINDOW_TYPE_HINT_DIALOG: /* Dialog window */
case GDK_WINDOW_TYPE_HINT_TOOLBAR: /* Window used to implement toolbars */
case GDK_WINDOW_TYPE_HINT_DESKTOP: /* N/A */
break;
return NSNormalWindowLevel;

case GDK_WINDOW_TYPE_HINT_DESKTOP:
return kCGDesktopWindowLevelKey; /* doesn't map to any real Cocoa model */

default:
break;
Expand Down

0 comments on commit 4c896c9

Please sign in to comment.