[PATCH 0/1] MR8704: winemac.drv: Use a window level higher than kCGDockWindowLevel for WS_EX_TOPMOST windows.
NSFloatingWindowLevel(3) is below kCGDockWindowLevel(20), so windows with WS_EX_TOPMOST show behind the macOS dock. WS_EX_TOPMOST should have a higher window level so that it's not behind the macOS dock. This is similar to WS_EX_TOPMOST windows on Windows should show on top of the taskbar. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/8704
From: Zhiyi Zhang <zzhang(a)codeweavers.com> NSFloatingWindowLevel(3) is below kCGDockWindowLevel(20), so windows with WS_EX_TOPMOST show behind the macOS dock. WS_EX_TOPMOST should have a higher window level so that it's not behind the macOS dock. This is similar to WS_EX_TOPMOST windows on Windows should show on top of the taskbar. --- dlls/winemac.drv/cocoa_app.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/winemac.drv/cocoa_app.m b/dlls/winemac.drv/cocoa_app.m index 4d72baadf76..f62f0c1fbdb 100644 --- a/dlls/winemac.drv/cocoa_app.m +++ b/dlls/winemac.drv/cocoa_app.m @@ -581,7 +581,8 @@ - (void) adjustWindowLevels:(BOOL)active NSUInteger nextFloatingIndex = 0; __block NSInteger maxLevel = NSIntegerMin; __block NSInteger maxNonfloatingLevel = NSNormalWindowLevel; - __block NSInteger minFloatingLevel = NSFloatingWindowLevel; + /* Windows with WS_EX_TOPMOST should have a window level higher than the macOS dock */ + __block NSInteger minFloatingLevel = kCGDockWindowLevel + 1; __block WineWindow* prev = nil; WineWindow* window; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/8704
This merge request was approved by Brendan Shanks. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/8704
participants (3)
-
Brendan Shanks (@bshanks) -
Zhiyi Zhang -
Zhiyi Zhang (@zhiyi)