Commit 7161df13 authored by Ken Thomases's avatar Ken Thomases Committed by Alexandre Julliard

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: 's avatarKen Thomases <ken@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent b5194d6f
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment