macOS: Fl_Window::fullscreen_screens() method toggle NSWindowCollectionBehaviorFullScreenNone
This commit is contained in:
parent
ad333e2c8e
commit
d7f0c8e8e1
@ -157,6 +157,12 @@ private:
|
||||
void _Fl_Window(); // constructor innards
|
||||
void fullscreen_x(); // platform-specific part of sending a window to full screen
|
||||
void fullscreen_off_x(int X, int Y, int W, int H);// platform-specific part of leaving full screen
|
||||
void fullscreen_screens_x(bool on_off)
|
||||
#if __APPLE__
|
||||
;
|
||||
#else
|
||||
{}
|
||||
#endif
|
||||
|
||||
// unimplemented copy ctor and assignment operator
|
||||
Fl_Window(const Fl_Window&);
|
||||
|
||||
@ -108,11 +108,13 @@ void Fl_Window::fullscreen_screens(int top, int bottom, int left, int right) {
|
||||
fullscreen_screen_bottom = -1;
|
||||
fullscreen_screen_left = -1;
|
||||
fullscreen_screen_right = -1;
|
||||
fullscreen_screens_x(false);
|
||||
} else {
|
||||
fullscreen_screen_top = top;
|
||||
fullscreen_screen_bottom = bottom;
|
||||
fullscreen_screen_left = left;
|
||||
fullscreen_screen_right = right;
|
||||
fullscreen_screens_x(true);
|
||||
}
|
||||
|
||||
if (shown() && fullscreen_active())
|
||||
|
||||
@ -3124,6 +3124,15 @@ NSOpenGLContext* Fl_X::GLcontext_getcurrent()
|
||||
|
||||
static BOOL fullscreen_screen_border = NO;
|
||||
|
||||
void Fl_Window::fullscreen_screens_x(bool on_off) {
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
|
||||
if (fl_mac_os_version >= 100700) {
|
||||
if (on_off) i->xid.collectionBehavior |= NSWindowCollectionBehaviorFullScreenNone;
|
||||
else i->xid.collectionBehavior &= ~NSWindowCollectionBehaviorFullScreenNone;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void Fl_Window::fullscreen_x() {
|
||||
_set_fullscreen();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user