summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2021-10-06 09:48:09 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2021-10-06 11:11:59 +0200
commitd2c41924a62ca36263d897e7edf5393ff158ed2b (patch)
treed7de33488abc68ec834171fec3f8ed917433d99f /src
parent10da46a5a62012fb6467ef48cc8cabd05690262a (diff)
macOS: "Fix fullscreen window level corner cases"
This corresponds to changes of PR#277 (Author: Samuel Mannehed)
Diffstat (limited to 'src')
-rw-r--r--src/Fl_cocoa.mm10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm
index 7d28d5747..585e87ab9 100644
--- a/src/Fl_cocoa.mm
+++ b/src/Fl_cocoa.mm
@@ -3151,7 +3151,15 @@ void Fl_Cocoa_Window_Driver::fullscreen_on() {
if (fl_mac_os_version >= 100600) {
FLWindow *nswin = fl_xid(pWindow);
[nswin setStyleMask:NSBorderlessWindowMask]; // 10.6
- [nswin setLevel:NSStatusWindowLevel];
+ if ([nswin isKeyWindow]) {
+ if ([nswin level] != NSStatusWindowLevel) {
+ [nswin setLevel:NSStatusWindowLevel];
+ fixup_window_levels();
+ }
+ } else if([nswin level] != NSNormalWindowLevel) {
+ [nswin setLevel:NSNormalWindowLevel];
+ fixup_window_levels();
+ }
int sx, sy, sw, sh, X, Y, W, H;
int top = fullscreen_screen_top();
int bottom = fullscreen_screen_bottom();