summaryrefslogtreecommitdiff
path: root/src/Fl_x.cxx
AgeCommit message (Collapse)Author
46 hourswipmaxim nikonov
3 dayswi[maxim nikonov
3 dayswip: forkmaxim nikonov
2026-01-24Fix "Setting window custom cursor from SVG image crashes" - cont'd (#1363)ManoloFLTK
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-20Move call to fl_utf8_remove_context_dependent() to more appropriate place.ManoloFLTK
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.
2025-11-13Revert/fix a0654b59ac: FLTK_CONSOLIDATE_MOTION = OFFAlbrecht Schlosser
In commit a0654b59ac17ad5b7739b7136d00f2469b03d5fa all assignments to variable `fl_xmousewin` were erroneously put under control of macro FLTK_CONSOLIDATE_MOTION. This commit reverts this. The correct fix would have been to declare extern Fl_Window *fl_xmousewin; unconditionally which was eventually done in a later commit. The related variable `static Fl_Window *send_motion;` is still used under control of macro FLTK_CONSOLIDATE_MOTION.
2025-09-15Complete Wayland-related part of issue #1295ManoloFLTK
2025-08-03Fix "Callback or event on minimize of the main window" for X11 platform (#1288)ManoloFLTK
2025-03-18Fix "Inconsistent FL_FULLSCREEN when creating full-screen window" (#1225)ManoloFLTK
The commit has all platforms send the FL_FULLSCREEN event when a window is created fullscreen.
2025-03-07Fix "fltk autotools build does not link against libXft" (#1202)ManoloFLTK
libXft was erroneously present in the link command when using Pango and Cairo. This is fixed by disconnecting the GUI scaling code from use of Xft. This commit also makes sure that when Wayland is used, pkg-config is available on the build machine. This allows to remove from file CMake/options.cmake code that was labelled with "FIXME".
2025-02-03Avoid code repetitions among Fl_{X11_}Window_Driver::{un_}maximize() functionsManoloFLTK
2024-11-02Fix confusing alignmentAlbrecht Schlosser
note: no "real" code changes
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-07-07X11: fix extraneous (undefined) event state bitsAlbrecht Schlosser
- Restrict FL_BUTTONS mask to only three valic mouse buttons. Pseudo mouse buttons 4-7 are used for FL_MOUSEWHEEL events and are no longer reflected in Fl::event_buttons(). - Return only state of mouse buttons 1-3 in Fl::event_buttons(). Buttons 4-7 are not "sticky" (used for FL_MOUSEWHEEL). - Keep undefined keyboard related bits in Fl::event_state() for backwards compatibility and transparency. These bits may be masked out in a later release. - Document Fl::event_state() bits for X11 in src/Fl_x.cxx. Note: this is a bug fix for X11 only, Wayland and other platforms are not affected.
2024-07-07X11: don't send FL_RELEASE event after FL_MOUSEWHEELAlbrecht Schlosser
Horizontal mousewheel events use pseudo button numbers 6 and 7, resp., similar to vertical mousewheel events which use buttons 4 and 5. The old code erroneously sent FL_RELEASE events for buttons 6 and 7 although it was prevented for buttons 4 and 5 explicitly.
2024-06-15X11: update XDND protocol from version 4 to 5 (#988)Albrecht Schlosser
Some applications insist on sending XDND protocol version 5 and rejected (ignored) FLTK as DND receiver because we allowed only protocol version 4. Known apps: Google Chrome and Chromium. This commit enables XDND protocol version 5 in FLTK programs as DND receiver.
2024-05-27Remove useless Fl_Window_Driver accessors after new member ↵ManoloFLTK
Fl_Window::get_size_range()
2024-05-11Add detailed comment about getting all supported XDND data typesManoloFLTK
2024-05-10Fix DnD from Wayland gnome app to X11 FLTK appManoloFLTK
This DnD gives two data types of the dragged text: text and a gnome-specific type. The code previously accepted DnD with 1 data type or 4 or more data types, and processed situations with 2 or 3 data types in a special way that fails with gnome source apps. The new code processes situations with 2 and 3 data types just like other ones. This works OK when dragging from gnome wayland apps.
2024-04-04Improve use of fl_create_print_window() under X11ManoloFLTK
2024-03-19Update dependencies, whitespace, and Fl_File_Chooser.cxxAlbrecht Schlosser
Rewrite src/Fl_File_Chooser.cxx from its .fl source file
2024-03-18 Fix "FLTK on NetBSD very slow on X11 with Unicode locale" (#935)ManoloFLTK
2024-03-12 using xlib to query the new DPI (old #910) (PR #913)ManoloFLTK
Thanks to Mike Qin for finding how to query the possibly changed DPI value of an X11 display while an FLTK app keeps running without running an external command in a pipe.
2024-03-04Fix Scaling window up/down also scales X/Y position on secondary displays ↵ManoloFLTK
only (#925)
2024-03-04X11: improve moving window back & forth across screens (#919)ManoloFLTK
2024-03-03 X11: Window scaling makes window lose resizable status if resizable_ is ↵ManoloFLTK
NULL (#923)
2023-12-21Fix "commit 96bacd3 may crash on X11" (#873)ManoloFLTK
2023-12-19Procedure to instruct FLTK to use given X11 connexion (#149)ManoloFLTK
2023-12-13Fix X11 '_NET_ACTIVE_WINDOW' message (STR 3396)Albrecht Schlosser
Send a valid timestamp rather than 0. For details see STR 3396.
2023-11-17Remove friend declaration from Fl_Window.H (see STR 3354)Albrecht Schlosser
Although this was not strictly necessary I decided to implement the proposed patch, but in a slightly different way. This adds a static public method for internal use only but it wouldn't do any harm if a user called it.
2023-11-05Add Fl_Window::maximize() and Fl_Window::un_maximize()ManoloFLTK
2023-10-17Fix Crashes and warnings when Fl_Double_Window is smaller than 1x1 (#798)ManoloFLTK
2023-08-16X11 platform: give number keys layout-independent keysym'sManoloFLTK
Without this, the sudoku app is unusable with a French keyboard
2023-08-13Handle shift + mousewheel event on Linux (STR 3521)Albrecht Schlosser
Pressing the shift key while using the mousewheel changes horizontal to vertical scrolling and vice versa. This allows users with a standard mouse with only one scroll button to use it for both scrolling directions. Note: other mice that have either two buttons or a scroll ball can generate both horizontal and vertical scrolling in one action. This commit does not affect such behavior. This patch has been provided by Manolo in file 'scroll.patch' (see STR 3521).
2023-05-09Fix doxygen doc generation and document platform specific filesAlbrecht Schlosser
Pure platform specific files like 'src/*_win32.cxx' are excluded from doxygen processing and don't need doxygen specific guard macros. Document this fact prominently at the beginning of each file. Fix exclude patterns and remove duplicates from Doxyfile.in.
2023-02-14Rename class Fl_Display_Cairo_Graphics_Driver to Fl_X11_Cairo_Graphics_DriverManoloFLTK
2023-02-13Allow scaled image in Fl_Window::cursor(const Fl_RGB_Image *, int, int)ManoloFLTK
2023-01-13Fix for "Rename Fl_X* Fl_Window::i private class member" (#223)ManoloFLTK
2023-01-06X11: Optionally copy selection buffer to clipboard (STR 3229)Albrecht Schlosser
The new method Fl::selection_to_clipboard(int) enables copying selection data to the clipboard on X11 if it is set to 1. This feature was requested by STR 3229 and the implementation was inspired by an `xterm` feature named "Select to Clipboard" which can be enabled by 'ctrl + middle mouse button + "Select to Clipboard"' in an xterm window.
2022-12-30Fixing false FL_OVERRIDEMatthias Melcher
2022-12-30Use `FL_OVERRIDE` for all overridden virtual methods (#611)Matthias Melcher
FL_OVERRIDE is defined as `override` for C++11 and higher FL_OVERRIDE is defined as `override` for VisualC 2015 and newer Don't interfere with Fl_Widget::override()
2022-11-07Create class Fl_Unix_Screen_Driver used by X11 and Wayland platformsManoloFLTK
2022-11-05Wayland/X11 hybrid: use "bool fl_disable_wayland;" declaration.ManoloFLTK
2022-10-17Allow DnD from Wayland FLTK app to X11 FLTK app (#516)ManoloFLTK
2022-09-26Replace all calls to sprintf() by calls to snprintf().ManoloFLTK
2022-09-23Fix Fl_X11_Window_Driver::fullscreen_on() and ↵ManoloFLTK
Fl_X11_Window_Driver::fullscreen_off().
2022-09-17Allow use of Fl_Window::default_icon() with a scaled image - Part 2.ManoloFLTK
Default icons are handled according to their scaled size, if there scaled.