FLTK logo

[fltk/fltk] Fix fullscreen window level corner cases on macOS (#277)

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.issues  ]
 
Previous Message ]New Message | Reply ]Next Message ]

[fltk/fltk] Fix fullscreen window level corner cases on macOS (#277) Samuel Mannehed Oct 05, 2021  
 

I'll begin with my understanding of the intended window levels from the windowDidResignKey and windowDidBecomeKey functions:

  • Fullscreen non keyWindow = NSNormalWindowLevel
  • Fullscreen keyWindow = NSStatusWindowLevel

Our application listens to FL_SCREEN_CONFIGURATION_CHANGED to be able to handle when a new monitor has been added while the window is in fullscreen. When this happens we need to call FLTK's fullscreen_x() to enable fullscreen on the new monitor as well. The function needs to be called while the window already is in fullscreen.

It's possible that this happens when the fullscreen window isn't keyWindow, and in this case the proper level seems to be NSNormalWindowLevel instead of NSStatusWindowLevel.

We also want to avoid re-stacking windows within the same level, this happens when setting level to the same value again. The window who's level was re-set will appear in front. This was already mentioned in a comment in fixup_window_levels().

Lastly, when the level of a window changes we should make sure the stacking is correct for modal and non-modal windows, this is done using fixup_window_levels() on other places in the code, we should do the same in fullscreen_x().


You can view, comment on, or merge this pull request online at:

  https://github.com/fltk/fltk/pull/277

Commit Summary

File Changes

Patch Links:


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.

Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

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