From a2da5dac814405666b4ed0c9fb779a46cd5eaa66 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Tue, 4 Feb 2025 17:23:59 +0100 Subject: [PATCH] macOS: fix when fullscreen window looses and regains focus with SDK 10.6 (#1192) --- src/Fl_cocoa.mm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index ec68e6f07..0e88d557e 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -1508,11 +1508,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() # if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7 - || !(nsw.styleMask & NSWindowStyleMaskFullScreen) + && (fl_mac_os_version < 100700 || !(nsw.styleMask & NSWindowStyleMaskFullScreen)) #endif - )) { + ) { [nsw setLevel:NSStatusWindowLevel]; fixup_window_levels(); }