[master] d2c4192 - macOS: "Fix fullscreen window level corner cases" This corresponds to changes of PR#277 (Author: Samuel Mannehed)

GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.commit  ]
 
Previous Message ]Next Message ]

[master] d2c4192 - macOS: "Fix fullscreen window level corner cases" This corresponds to changes of PR#277 (Author: Samuel Mannehed) "ManoloFLTK" 02:17 Oct 06 top right image
 
commit d2c41924a62ca36263d897e7edf5393ff158ed2b
Author:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
AuthorDate: Wed Oct 6 09:48:09 2021 +0200
Commit:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
CommitDate: Wed Oct 6 11:11:59 2021 +0200

    macOS: "Fix fullscreen window level corner cases"
    This corresponds to changes of PR#277 (Author: Samuel Mannehed)

 src/Fl_cocoa.mm | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git src/Fl_cocoa.mm src/Fl_cocoa.mm
index 7d28d57..585e87a 100644
--- src/Fl_cocoa.mm
+++ 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();
Direct Link to Message ]
 
bottom left image   bottom right image
Previous Message ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2021 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.