Commit Graph

7257 Commits

Author SHA1 Message Date
ManoloFLTK
55db651a96 Fix: X11: test/gl_overlay stale overlay rendering (#1111) 2024-11-08 12:25:49 +01:00
ManoloFLTK
c46a92809e Fix macOS Very minor high DPI rounding issue with fl_rect (#1113) 2024-11-08 11:07:32 +01:00
ManoloFLTK
e15cd9d5bb Fix: fl_draw_image() with horizontal flip reads out of bounds (#1112) 2024-11-08 10:28:27 +01:00
ManoloFLTK
3fbbce0654 Slightly improve member function Fl_Wayland_Graphics_Driver::copy_offscreen() 2024-11-08 09:46:35 +01:00
ManoloFLTK
82e0e859ee Fix X11: test/checkers drawing artifacts when window is scaled (#1109) 2024-11-08 09:14:29 +01:00
ManoloFLTK
8f987ce8bd Fix X11: test/curve "points" mode not drawn correctly (#1110) 2024-11-07 19:33:43 +01:00
ManoloFLTK
5e91ecfd58 Fix Mac: Fl_Window::fullscreen() doesn't work for unfocused tabbed window (#1101) 2024-11-04 06:28:02 +01:00
Matthias Melcher
5ac570c338 Fixes Fl_Tile resizing for "sudden" size changes: #1102
Enlarging and reducing wdth and height needed to be treated
seprately when the bottom right corner of the resizable would
overshoot the final size of the tile.
2024-11-03 18:53:18 +01:00
ManoloFLTK
6f6a375fca Recent macOS SDKs badly define MAC_OS_X_VERSION_MAX_ALLOWED
and the correct information is in __MAC_OS_X_VERSION_MAX_ALLOWED
2024-11-03 14:27:28 +01:00
ManoloFLTK
b8bf13ec65 Recent Xcode versions badly define MAC_OS_X_VERSION_MAX_ALLOWED
and the correct information is in __MAC_OS_X_VERSION_MAX_ALLOWED
2024-11-03 13:06:51 +01:00
Albrecht Schlosser
e138814257 Fix confusing alignment
note: no "real" code changes
2024-11-02 17:11:32 +01:00
ManoloFLTK
b3a6838128 Fix Mac: "Merge All Windows" fails if focused window is borderless (#1100) 2024-11-02 07:37:43 +01:00
ManoloFLTK
7ce5b74e12 New member function 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-01 18:26:52 +01:00
Albrecht Schlosser
abf28f0b70 Improve and clarify documentation 2024-11-01 18:24:06 +01:00
ManoloFLTK
818e2b77d1 Wayland: Fix issue in maximization of a borderless window (#1099)
Also fixes scenarios mixing fullscreen and maximization:
- maximize
- set fullscreen
- unset fullscreen
- un-maximize
with and without window border.
2024-11-01 15:43:18 +01:00
Albrecht Schlosser
34f465add2 Windows: fix compiler warning [-Wstrict-aliasing]
In function ‘void innards(...)’:
src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx:132:23:
dereferencing type-punned pointer will break strict-aliasing rules
  BITMAPINFO &bmi = *((BITMAPINFO*)bmibuffer);
                     ~^~~~~~~~~~~~~~~~~~~~~~~

Found with gcc 12 (MinGW cross compiler)

Also: use correct sizes (sizeof) rather than hardcoded values.
2024-10-31 18:38:55 +01:00
ManoloFLTK
bdb5972504 macOS: prevent changing window border while window is maximized 2024-10-31 15:35:52 +01:00
ManoloFLTK
0ac1379985 macOS: prevent changing window border while window is fullscreen 2024-10-31 15:15:33 +01:00
ManoloFLTK
0cab095b3c Fix "Mac: Mixing native fullscreen button with Fl_Window::fullscreen() has side effects" (#1098) 2024-10-31 12:19:22 +01:00
ManoloFLTK
7237e0d308 Restore Fl_Widget_Surface::draw_decorated_window() under XQuartz 2024-10-31 09:17:55 +01:00
ManoloFLTK
3c03aecc3c Fix Windows: fullscreen doesn't always pick the correct display (#1097) 2024-10-30 17:32:57 +01:00
ManoloFLTK
ae55a42c71 Quick fix for Windows Ctrl character handling - cont'd 2024-10-27 00:14:09 +02:00
ManoloFLTK
94a50ecd6b Windows: fix for using AltGr key after kludge for Ctrl+ (#1093) 2024-10-26 18:33:26 +02:00
Matthias Melcher
737137cf78 Fixes Fl_Text_Display line number calculation. (#1088) 2024-10-19 15:53:29 +02:00
ManoloFLTK
6ea450407b Windows: process the +-containing key used with Ctrl in cross-platform way 2024-10-19 09:14:45 +02:00
Albrecht Schlosser
d589c05b17 Fix documentation typos and trailing whitespace 2024-10-15 18:59:28 +02:00
ManoloFLTK
957fa1fe37 Improve method to draw boxes of type FL_BORDER_BOX and FL_SHADOW_BOX (#1089)
These types of boxes frame a background with a rectangular frame of another color.
The previous procedure to draw them was not robust to GUI rescaling creating cases
where space between the border and the background was not drawn.
The new drawing procedure for these boxes first paints the whole area (frame included)
with the background color and next draws the frame over the just painted rectangle.
No uncolored space is possible.
It was also necessary to very slightly modify Fl_Scalable_Graphics_Driver::rect()
used by the Windows and X11 (no Cairo) backends to make sure fl_rect(x,y,w,h)
exactly frames fl_rectf(x,y,w,h) without drawing outside the filled area.
2024-10-15 18:02:48 +02:00
Albrecht Schlosser
a5f28b3984 Fix compiler warning [-Wstringop-overflow=] 2024-10-12 15:27:25 +02:00
ManoloFLTK
013e939c93 Make Pango-handled text accept legacy CP1252-encoded text - continued 2024-10-10 18:18:52 +02:00
Matthias Melcher
f87d7a71c0 Missing *not* in Fl_Preferences docs. 2024-10-10 15:12:04 +02:00
Matthias Melcher
a0f1d5bc5e Fl_Preferences documentation update. 2024-10-10 11:46:31 +02:00
ManoloFLTK
99c36b44ac Restore building without Cairo developer files (#1087) 2024-10-08 23:52:03 +02:00
Albrecht Schlosser
475bfa9230 Define missing macro on Windows/MinGW platform
... as reported today by Ian on fltk.general in thread
"Mingw-32 compile issue with new 4/5 mousebutton hooks (fltk-1.4)"
2024-10-07 18:14:19 +02:00
ManoloFLTK
6e5f3f7ecb Make Pango-handled text accept legacy CP1252-encoded text 2024-10-07 16:20:59 +02:00
Albrecht Schlosser
0b4bea1eea Fix shortcut FL_CTRL+'=' on Windows (#1086)
Strictly spoken, commit 3fbd4f944f introduced a regression on Windows.

The additional table entry VK_OEM_PLUS overrode the old behavior
because the value of VK_OEM_PLUS is 0xbb (see comment in code).
2024-10-07 14:33:44 +02:00
dannye
5c6ec56b33
Submenus with no callback enter their submenu instead of closing the whole menu (#1043)
Thanks for those nice changes.
2024-10-06 19:19:54 +02:00
Albrecht Schlosser
4f4a9be15b Support mouse buttons 4 + 5 (aka "side buttons") (#1076, #1068)
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-06 18:53:03 +02:00
Albrecht Schlosser
3fbd4f944f Apply scaling-shortcut-kludge.patch for Windows
... as proposed by Manolo in a private mail.

This patch allows to detect "ctrl+'-' on keyboards with digits in
uppercase positions (e.g. French)" but this is only preliminary for
FLTK 1.4.0.

Windows keyboard handling should be revised in FLTK 1.5.0 or higher.
2024-10-06 18:44:31 +02:00
Albrecht Schlosser
133d8fb96d Update comment, sorry for the noise 2024-10-06 17:44:20 +02:00
Albrecht Schlosser
cd0f5aec24 Add comments regarding X11 keyboard layout handling
This commit doesn't change the code flow although the code has been
slightly refactored.
2024-10-06 17:42:22 +02:00
Andrew Fuller
3431c9d21a
Fl_Text_Display: Fix text selection off-by-one bug (#1080)
This seems to have been left over from when mouse text selection would start a text selection on the left side of the character and always extend the selection to include the character under the cursor.

We now perform text selection based on whether the selection spans across the horizontal center of a character and so this next_char() causes the endpoint of the selection to be incorrectly shifted to the right.
2024-10-06 16:18:37 +02:00
ManoloFLTK
9d194ac960 Add necessary dirty indicator 2024-10-04 17:39:36 +02:00
ManoloFLTK
ea80a31266 macOS fix for "Fl_Window::cursor(...) does not work reliably on some platforms" (#1082) 2024-10-04 17:33:50 +02:00
Andrew Fuller
f348e2bdb9 Fix bug in Fl_Text_Display when tab is followed by multibyte char
When the user clicks the right half of a tab, we add 1 (the byte len of the tab) to obtain the starting index of the following character.
2024-09-28 11:05:05 +02:00
ManoloFLTK
84eeac5892 Fix issue about Fl_Tabs and maximizing window under Windows (#1075) 2024-09-25 10:23:47 +02:00
ManoloFLTK
382d6b2fbd Bypass Mutter bug for menubar in fullscreen window (see #1061) 2024-09-14 15:08:03 +02:00
ManoloFLTK
bb917628ff Fix "Wayland crash on mapping windows at startup" (#1072) 2024-09-13 11:47:08 +02:00
ManoloFLTK
6aa5b70307 Fix problems introduced at commits 9b777cc and d70c79b 2024-09-13 11:39:08 +02:00
ManoloFLTK
31f4a44054 Fix typo in Doxygen text: unod --> undo 2024-09-12 14:14:18 +02:00
ManoloFLTK
5cc9845f2f Fix "fl_read_image() missing right and bottom pixel line" (#1066) 2024-09-11 22:17:07 +02:00