1689 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
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
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
7237e0d308 Restore Fl_Widget_Surface::draw_decorated_window() under XQuartz 2024-10-31 09:17:55 +01:00
ManoloFLTK
ae55a42c71 Quick fix for Windows Ctrl character handling - cont'd 2024-10-27 00:14:09 +02:00
Albrecht Schlosser
d589c05b17 Fix documentation typos and trailing whitespace 2024-10-15 18:59:28 +02:00
ManoloFLTK
013e939c93 Make Pango-handled text accept legacy CP1252-encoded text - continued 2024-10-10 18:18:52 +02:00
ManoloFLTK
99c36b44ac Restore building without Cairo developer files (#1087) 2024-10-08 23:52:03 +02:00
ManoloFLTK
6e5f3f7ecb Make Pango-handled text accept legacy CP1252-encoded text 2024-10-07 16:20:59 +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
ManoloFLTK
9d194ac960 Add necessary dirty indicator 2024-10-04 17:39:36 +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
5cc9845f2f Fix "fl_read_image() missing right and bottom pixel line" (#1066) 2024-09-11 22:17:07 +02:00
ManoloFLTK
9b777cc011 Wayland + Mutter: fix issue with menubar on fullscreen window (#1061) 2024-09-10 07:50:40 +02:00
ManoloFLTK
d70c79b8bc Wayland: one more fix yet for interactive move of subwindow inside parent 2024-09-09 10:27:04 +02:00
ManoloFLTK
2a87244ae3 Add support of GL with Wayland for Linux on Apple hardware 2024-09-07 16:50:14 +02:00
Matthias Melcher
2834213815 Reverting false Ctrl Key fix on Windows
- 1ae43956e2bfb933d63fc774ca8e4ed22e4108dd
2024-09-02 11:59:36 +02:00
Matthias Melcher
aa6ce6b9f1 Cairo image drawing improvements 2024-09-01 16:11:31 +02:00
Matthias Melcher
634ce805e5 Fixing set_font and image overflow for Cairo. 2024-08-31 23:20:27 +02:00
ManoloFLTK
b124ac9066 Fix return values of Fl_Printer::begin_job() with GTK dialogs 2024-08-28 17:56:54 +02:00
ManoloFLTK
c7417f793f Restore building with option FLTK_USE_POLL 2024-08-27 18:32:47 +02:00
ManoloFLTK
5fae7b36bb Fix Fl_GDI_Graphics_Driver::rect_unscaled() (#1052) 2024-08-27 16:52:20 +02:00
ManoloFLTK
008d71f5b7 Fix for artefact in X11 1-pixel thick rect drawing with some drivers (#156, #1052) 2024-08-26 22:56:27 +02:00
ManoloFLTK
13f1911624 Implement and document Fl::add_system_handler() for Wayland 2024-08-26 09:38:57 +02:00
ManoloFLTK
6d04ef2caa Fix Fl_GDI_Graphics_Driver::rect_unscaled() (#1052) 2024-08-26 09:22:04 +02:00
ManoloFLTK
fc57a51836 Fix Fl_Wayland_Screen_Driver::compose() to handle the FL_Alt_Gr key 2024-08-25 12:06:59 +02:00
Matthias Melcher
1ae43956e2 Quick fix for Window Ctrl charcter handling.
This is needed to allow platform compatibel e_text and e_length, but a lot more work ist needed to unify keyboard
handling
2024-08-23 12:43:21 +02:00
Albrecht Schlosser
666bbda70e Fix tabs, trailing spaces, and update dependencies 2024-08-10 20:32:19 +02:00
Albrecht Schlosser
7d90a3b373 Fix indenting, add comments for clarity
no operative code changes in this commit
2024-08-03 18:09:58 +02:00
Albrecht Schlosser
fd691b6173 Remove obsolete statement (#1033)
Thanks to @xuyun018 for finding this.
2024-08-03 18:07:05 +02:00
Cyprinus Carpio
471aca03bc GDI: fix StretchBlt mode setting 2024-07-28 22:30:55 +02:00
ManoloFLTK
c0dba15e4b Wayland: restore support of Fl_Tile with subwindow widget - cont'd 2024-07-28 14:21:51 +02:00
ManoloFLTK
b740c48ee8 Wayland: restore support of Fl_Tile with subwindow widget 2024-07-26 16:01:16 +02:00
ManoloFLTK
3cc12d203f Fix Fl_Scalable_Graphics_Driver::rect(x,y,w,h) (#1017) 2024-07-24 17:09:30 +02:00
ManoloFLTK
f6a508291a Fix "line_style_doc program under X11: join type wrong" - cont'd (#1017) 2024-07-23 10:23:57 +02:00
ManoloFLTK
5e6c47f446 Fix "line_style_doc program under X11: join type wrong" (#1017) 2024-07-23 10:13:27 +02:00
ManoloFLTK
ffe39737e5 Remove unused function after commit 325004f 2024-07-19 14:04:59 +02:00
ManoloFLTK
56f0671b32 Fix border case of use of fl_end_loop under Windows with USE_GDIPLUS=1 2024-07-19 13:48:18 +02:00
ManoloFLTK
4fb4f395a3 Remove duplicated comment
The remaining instance is in Fl_Gl_Window_Driver.cxx
2024-07-18 18:43:46 +02:00
ManoloFLTK
325004fb33 Simplify creation of OpenGL contexts under X11 platform (#1005)
The previous approach FLTK used to create OpenGL contexts under the X11 platform
followed a different code path to create contexts for OpenGL version 3 and above
than to create contexts for OpenGL versions 1 or 2.
The FLTK code followed exactly "Tutorial: OpenGL 3.0 Context Creation (GLX)"
of the official OpenGL wiki, see:
https://www.khronos.org/opengl/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)
That code worked OK with Debian 11 and with any tested Linux configurations
in a VM running on Apple hardware. However, it failed with Debian 12 and later
on native Linux boxes to create GL3 contexts with the FL_DOUBLE flag.
That's what issue #1005 reports.

A first attempt to fix #1005 followed instructions given at:
https://registry.khronos.org/OpenGL-Refpages/gl2.1/xhtml/glXIntro.xml
which supposedly describe how to create OpenGL contexts with GLX.
That had no effect on issue #1005.

This commit erases all attempts to use OpenGL3-specific calls or even
the more modern glXCreateNewContext() function that appears with
GLX version 1.3. The committed code uses only OpenGL 1-age
functions to create OpenGL contexts for X11 windows.
Created contexts follow the "Compatibility Profile" which means they
are compatible with both modern OpenGL3-style and legacy OpenGL1/2-style.

This appears to fix issue #1005.
2024-07-17 17:12:23 +02:00
ManoloFLTK
fd257a7bf3 Wayland: support move/resize of subwindow independently from parent (#1003) 2024-07-14 13:24:28 +02:00
ManoloFLTK
ee05d4bd3a Fix typo in comment referring to github issue 2024-07-12 17:50:29 +02:00