winemac: Keep floating windows in a higher window level than non-floating full-screen windows.
Ken Thomases
ken at codeweavers.com
Thu Dec 1 19:38:40 CST 2016
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 at codeweavers.com>
---
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 @@ - (void) adjustWindowLevels:(BOOL)active
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 @@ - (void) adjustWindowLevels:(BOOL)active
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.10.2
More information about the wine-patches
mailing list