From ad333e2c8e7e916aa3b6b0a0b557b5a030364fd7 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Tue, 28 Jan 2025 12:14:16 +0100 Subject: [PATCH] macOS: fix window level issue when changing active app while in fullscreen mode (#1192) --- src/Fl_cocoa.mm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index a41fc4989..f3f2bebc0 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -1502,7 +1502,11 @@ static FLWindowDelegate *flwindowdelegate_instance = nil; FLWindow *nsw = (FLWindow*)[notif object]; Fl_Window *w = [nsw getFl_Window]; /* Restore previous fullscreen level */ - if (w->fullscreen_active() && fl_mac_os_version < 100700) { + if (w->fullscreen_active() && (fl_mac_os_version < 100700 +# if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7 + || !(nsw.styleMask & NSWindowStyleMaskFullScreen) +#endif + )) { [nsw setLevel:NSStatusWindowLevel]; fixup_window_levels(); }