diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2024-10-31 15:15:33 +0100 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2024-10-31 15:15:33 +0100 |
| commit | 0ac13799853e87c331fc99f7387a5d5603c5820b (patch) | |
| tree | d410ba13a067dae013191fbd664a7281a135dd8d /src | |
| parent | 0cab095b3c5485a06767966a1e080432db81eb3e (diff) | |
macOS: prevent changing window border while window is fullscreen
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_cocoa.mm | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index 9b4e004ce..01995984b 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -3403,6 +3403,17 @@ void Fl_Cocoa_Window_Driver::use_border() { if (!shown() || pWindow->parent()) return; #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 if (fl_mac_os_version >= 100600) { + if (pWindow->fullscreen_active()) { + // prevent changing border while window is fullscreen + static bool active = false; + if (!active) { + active = true; + bool b = !border(); + pWindow->border(b); + active = false; + } + return; + } [fl_xid(pWindow) setStyleMask:calc_win_style(pWindow)]; // 10.6 if (border()) restore_window_title_and_icon(pWindow, icon_image); pWindow->redraw(); |
