From 7161df136fd1f98fc005528e6e2f391e5a952f1b Mon Sep 17 00:00:00 2001 From: Ken Thomases Date: Thu, 1 Dec 2016 19:38:40 -0600 Subject: [PATCH] winemac: Keep floating windows in a higher window level than non-floating full-screen windows. When windows aren't full-screen, non-floating windows go in NSNormalWindowLevel and floating ones go in NSFloatingWindowLevel, which is higher. However, a non-floating full-screen window will go into a level higher than either of those. The prior logic of the -adjustWindowLevels: method would keep the floating windows at a window level at least that high. They should actually be in a strictly higher level. Signed-off-by: Ken Thomases Signed-off-by: Alexandre Julliard --- dlls/winemac.drv/cocoa_app.m | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/dlls/winemac.drv/cocoa_app.m b/dlls/winemac.drv/cocoa_app.m index 0eaea57d836..09c95d069e1 100644 --- a/dlls/winemac.drv/cocoa_app.m +++ b/dlls/winemac.drv/cocoa_app.m @@ -520,6 +520,7 @@ static NSString* WineLocalizedString(unsigned int stringID) NSUInteger nextFloatingIndex = 0; __block NSInteger maxLevel = NSIntegerMin; __block NSInteger maxNonfloatingLevel = NSNormalWindowLevel; + __block NSInteger minFloatingLevel = NSFloatingWindowLevel; __block WineWindow* prev = nil; WineWindow* window; @@ -556,6 +557,14 @@ static NSString* WineLocalizedString(unsigned int stringID) NSInteger origLevel = [window level]; NSInteger newLevel = [window minimumLevelForActive:active]; + if (window.floating) + { + if (minFloatingLevel <= maxNonfloatingLevel) + minFloatingLevel = maxNonfloatingLevel + 1; + if (newLevel < minFloatingLevel) + newLevel = minFloatingLevel; + } + if (newLevel < maxLevel) newLevel = maxLevel; else -- 2.11.4.GIT