Module: wine Branch: master Commit: 7161df136fd1f98fc005528e6e2f391e5a952f1b URL: http://source.winehq.org/git/wine.git/?a=commit;h=7161df136fd1f98fc005528e6e...
Author: Ken Thomases ken@codeweavers.com Date: Thu Dec 1 19:38:40 2016 -0600
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 ken@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
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 0eaea57..09c95d0 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