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>
This commit is contained in:
parent
b5194d6f83
commit
7161df136f
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue