summaryrefslogtreecommitdiff
path: root/src/Fl_cocoa.mm
AgeCommit message (Collapse)Author
3 dayswip: forkmaxim nikonov
6 daysmacOS: remove code present only to support macOS versions 10.6 and earlier - ↵ManoloFLTK
cont'd.
6 daysmacOS: remove code present only to support macOS versions 10.6 and earlier.ManoloFLTK
It's possible to build and run FLTK 1.5 with its use of C++11 for macOS 10.7 and SDK 10.7. This commit makes 10.7 the required minimal version of macOS to build and run FLTK 1.5.
7 daysFix obvious indenting errors after removal of old codeAlbrecht Schlosser
... by commit e0405d2135939d08289205e3a38df329076e16c1
7 daysmacOS: remove code present only to support macOS versions 10.3 and 10.4.ManoloFLTK
This is a first step towards removing the code related to support of old macOS versions that are not compatible with C++11 which FLTK 1.5 requires.
2026-01-22Fix "Setting window custom cursor from SVG image crashes" (#1363)ManoloFLTK
2026-01-21Improve handling of text containing context-dependent unicode points.ManoloFLTK
This commit makes platforms Windows and macOS compute string widths with the same mechanism as what is in place for platforms Wayland/X11: - the width of a string containing a single codepoint is computed and memorized in the table of character widths; - the width of a string containing several codepoints is computed as such rather than as the sum of the widths of its composing characters. The result is that FLTK text widgets input and draw correctly also complex emojis encoded with context-dependent codepoints. Function fl_utf8_remove_context_dependent() is no longer necessary.
2026-01-19All platforms use same code to remove context-dependent codepoints from text ↵ManoloFLTK
input. This commit introduces function fl_utf8_remove_context_dependent() that removes from an UTF-8 string its context-dependent codepoints. Platforms macOS, Wayland and X11 call this function to process UTF-8 text received from a character palette as input to FLTK text. This makes sure FLTK text-editing widgets process textual input equally and consistently across platforms, especially emojis entered via a palette. Platform Windows creates a series of separate system events to input an emoji via the character palette. For this reason, function fl_utf8_remove_context_dependent() is not used by this platform which does internally the same filtering of context- dependent codepoints.
2026-01-18Emoji input: remove context-dependent unicode points from output of emoji ↵ManoloFLTK
palette. The character palette allowing to input emojis in text generates in some cases a series of unicode points to represent a single emoji. These series contain various kinds of unicode points with context-dependent meaning. This commit prevents such context- dependent unicodepoints from being inserted in FLTK text because FLTK text edition mechanism is not ready to handle properly context dependency in edited UTF-8 text.
2026-01-16Restore emojis support under recent macOS versions - cont'd (#1360)ManoloFLTK
This commit improves how FLTK follows changes to the focus window under macOS.
2026-01-12Restore emojis support under recent macOS versions - cont'd (#1360)ManoloFLTK
Detect Ctrl+Command+Space to open character palette only if not used before as shortcut.
2026-01-12Restore emojis support under recent macOS versions - cont'd (#1360)ManoloFLTK
This makes FLTK open the character palette when typing Ctrl+Command+Space or Function+e
2026-01-12Restore emojis support under recent macOS versions (#1360)ManoloFLTK
2026-01-08Add CMake option FLTK_OPTION_PEN_SUPPORT (default: ON)Albrecht Schlosser
This option can be used to disable pen/tablet support if there are build problems on a particular platform or build system (e.g. MinGW) so users can continue to build FLTK 1.5. Users can also choose to disable pen support if they don't need it.
2025-12-21MacOS: Add FL_APP_ACTIVATE and DEACTIVATE.Matthias Melcher
This event is sent on application level. Add a handler with Fl::add_handler to receive the event.
2025-11-20Adjust some pen driver comments.Matthias Melcher
Made global variables private.
2025-11-17Add pen/stylus/tablet API and driver for macOS (#1326)Matthias Melcher
* define the pen/tablet support API * add pen event handler stub as a fallback * add pen device test "penpal". * Add macOS pen/stylus/tablet driver. * Add Oxygen documentation.
2025-09-08Remove deprecation warning of graphicsContextWithWindow used with macOS ≤ ↵ManoloFLTK
10.13
2025-09-05Remove use of deprecated member function Fl_Menu_Item::setonly()ManoloFLTK
2025-09-03Fix "Focus event lost if opening window on macOS" (#1300)ManoloFLTK
2025-06-11Fix in window titlebar capture to support macOS 26 TahoeManoloFLTK
2025-06-03macOS: protect uses of __block by #if defined(__BLOCKS__) conditionManoloFLTK
2025-05-21Add change necessary to support new class Fl_Native_Input, possibly as addonManoloFLTK
The added if() statement's condition is always false in FLTK before addition to it of class Fl_Native_Input. Therefore, the present modification is effectless unless this new class is added to the library, either in its core or as an addon.
2025-05-13Remove deprecated function Fl::set_idle()Albrecht Schlosser
This turned out to be more complicated than just to delete a function because it was used internally, and the callback signatures were a bit flaky. I also added a lot of documentation to clarify matters. FL/Fl.H: document idle callback signatures, make some internal functions of class Fl private, add public Fl::idle() accessor (read- only), add Fl::add_idle(Fl_Old_Idle_Handler cb) to enable using old-style idle callbacks w/o 'data' argument. FL/forms.H: replace Fl::set_idle() with Fl::add_idle(). src/Fl.cxx: rename private Fl::idle_ with trailing underscore. src/Fl_System_Driver.cxx: use new public accessor Fl::idle() to access Fl::idle_ which is now private. src/Fl_add_idle.cxx: improve documentation, clarify idle callback matching, add example code in docs, rename methods, add overloaded Fl::add_idle(Fl_Old_Idle_Handler cb). src/Fl_win32.cxx: use public Fl::idle() rather than private member. src/drivers/Unix/Fl_Unix_System_Driver.cxx: same as above. src/Fl_cocoa.mm: same as above.
2025-04-05Fixes error: two consecutive '[' tokens on g++ with objcpp files (#1246)Mohammed Alyousef
Applying MoAlyousef's PR. -erco
2025-03-30Fixes a couple of compiler warnings on AppleClang.Matthias Melcher
2025-02-08Make Fl_Cocoa_Gl_Window_Driver::capture_gl_rectangle() return a depth-4 imageManoloFLTK
This change allows to capture the rounded corners of a top-level GL window. Also, rename Fl_Cocoa_Window_Driver::capture_decorated_window_10_5() from capture_decorated_window_10_6() because this function uses CGWindowListCreateImageFromArray() available from macOS 10.5.
2025-02-05macOS: restore building with SDK versions between 10.7 and 10.11ManoloFLTK
2025-02-04macOS: fix when fullscreen window looses and regains focus with SDK 10.6 (#1192)ManoloFLTK
2025-02-03macOS: Restore fullscreen window mode when using SDK < 10.7 (#1192)ManoloFLTK
2025-02-03macOS: fix transition from single-screen fullscreen to "All Screens" fullscreenManoloFLTK
2025-01-30macOS: add support of showing window to multi-screen fullscreen stateManoloFLTK
2025-01-30macOS: Fix "Full screen broken on macOS in FLTK 1.3.10 (regression)" (#1192)ManoloFLTK
FLTK now supports 2 types of fullscreen modes under macOS: 1) normal macOS fullscreen mode where the menubar and titlebar appear when mouse is moved to top of screen and the window covers one screen only; 2) multiple-screen mode that requires calling Fl_Window::fullscreen_screens() before. This commit fixes all possible transitions between these fullscreen modes and normal window mode.
2025-01-26Refrain static function capture_decorated_window_SCK() from capturing the cursorManoloFLTK
2025-01-11Remove unnecessary #include directiveManoloFLTK
2024-12-15Fix: Crash on macOS if Escape is pressed while Help submenu is open (#1170)ManoloFLTK
2024-11-18Fix: Fullscreen regression between release-1.4.0rc2 and release-1.4.0rc3 on ↵ManoloFLTK
macOS( #1129)
2024-11-04Fix Mac: Fl_Window::fullscreen() doesn't work for unfocused tabbed window ↵ManoloFLTK
(#1101)
2024-11-03Recent macOS SDKs badly define MAC_OS_X_VERSION_MAX_ALLOWEDManoloFLTK
and the correct information is in __MAC_OS_X_VERSION_MAX_ALLOWED
2024-11-03Recent Xcode versions badly define MAC_OS_X_VERSION_MAX_ALLOWEDManoloFLTK
and the correct information is in __MAC_OS_X_VERSION_MAX_ALLOWED
2024-11-01New member function ↵ManoloFLTK
Fl_Cocoa_Window_Driver::capture_decorated_window_10_6(NSWindow*) This function hides the code to capture an image of a window that varies a lot with macOS versions
2024-11-01Wayland: Fix issue in maximization of a borderless window (#1099)ManoloFLTK
Also fixes scenarios mixing fullscreen and maximization: - maximize - set fullscreen - unset fullscreen - un-maximize with and without window border.
2024-10-31macOS: prevent changing window border while window is maximizedManoloFLTK
2024-10-31macOS: prevent changing window border while window is fullscreenManoloFLTK
2024-10-31Fix "Mac: Mixing native fullscreen button with Fl_Window::fullscreen() has ↵ManoloFLTK
side effects" (#1098)
2024-10-06Support mouse buttons 4 + 5 (aka "side buttons") (#1076, #1068)Albrecht Schlosser
This work is based on PR 1068 (patch by @CendioHalim) and extended to store button status (4,5) in Fl::event_state() like it's done for other mouse buttons (1-3). Changes: - new symbol: FL_BUTTON4 = side button 1 = "back" - new symbol: FL_BUTTON5 = side button 2 = "forward" - modified : FL_BUTTONS now includes bits for two side buttons Note: the status of these new buttons is not maintained by X11, therefore we need to maintain them in internal variables for this platform.
2024-10-04macOS fix for "Fl_Window::cursor(...) does not work reliably on some ↵ManoloFLTK
platforms" (#1082)
2024-07-28 Crash in macOS when switching fullscreen window between displays (#1022)ManoloFLTK
2024-06-21Fix compiler warning on macOS: remove unused variableAlbrecht Schlosser
2024-06-21macOS: fix changes to Fl_X::first with front windowManoloFLTK