mirror of
https://github.com/fltk/fltk.git
synced 2026-05-30 21:25:30 +08:00
Attempt to fix issue#287 about fullscreen mode.
The fix is to reproduce what is in main branch 1.4
This commit is contained in:
+13
-10
@@ -3113,22 +3113,25 @@ void Fl_Window::fullscreen_x() {
|
|||||||
|
|
||||||
void Fl_Window::fullscreen_off_x(int X, int Y, int W, int H) {
|
void Fl_Window::fullscreen_off_x(int X, int Y, int W, int H) {
|
||||||
_clear_fullscreen();
|
_clear_fullscreen();
|
||||||
if (fl_mac_os_version < 101000) {
|
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
|
||||||
hide();
|
if (fl_mac_os_version >= 100600) {
|
||||||
resize(X, Y, W, H);
|
|
||||||
show();
|
|
||||||
} else {
|
|
||||||
NSUInteger winstyle = (border() ?
|
|
||||||
(NSTitledWindowMask | NSClosableWindowMask | NSResizableWindowMask) : NSBorderlessWindowMask);
|
|
||||||
if (!modal()) winstyle |= NSMiniaturizableWindowMask;
|
|
||||||
NSInteger level = NSNormalWindowLevel;
|
NSInteger level = NSNormalWindowLevel;
|
||||||
if (modal()) level = modal_window_level();
|
if (modal()) level = modal_window_level();
|
||||||
else if (non_modal()) level = non_modal_window_level();
|
else if (non_modal()) level = non_modal_window_level();
|
||||||
|
[i->xid orderOut:nil];
|
||||||
[i->xid setLevel:level];
|
[i->xid setLevel:level];
|
||||||
resize(X, Y, W, H);
|
NSUInteger winstyle = (border() ?
|
||||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
|
(NSTitledWindowMask | NSClosableWindowMask | NSResizableWindowMask) : NSBorderlessWindowMask);
|
||||||
|
if (!modal()) winstyle |= NSMiniaturizableWindowMask;
|
||||||
[i->xid setStyleMask:winstyle]; //10.6
|
[i->xid setStyleMask:winstyle]; //10.6
|
||||||
|
resize(X, Y, W, H);
|
||||||
|
[i->xid orderFront:nil];
|
||||||
|
} else
|
||||||
#endif
|
#endif
|
||||||
|
{
|
||||||
|
hide();
|
||||||
|
resize(X, Y, W, H);
|
||||||
|
show();
|
||||||
}
|
}
|
||||||
Fl::handle(FL_FULLSCREEN, this);
|
Fl::handle(FL_FULLSCREEN, this);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user