Commit Graph

466 Commits

Author SHA1 Message Date
ManoloFLTK
3c03aecc3c Fix Windows: fullscreen doesn't always pick the correct display (#1097) 2024-10-30 17:32:57 +01:00
ManoloFLTK
94a50ecd6b Windows: fix for using AltGr key after kludge for Ctrl+ (#1093) 2024-10-26 18:33:26 +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
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
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
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
ManoloFLTK
482da12f71 Fix: Zero-sized borderless window causes high cpu usage on windows (#985) 2024-06-01 16:48:27 +02:00
ManoloFLTK
f3f69b892d Remove useless Fl_Window_Driver accessors after new member Fl_Window::get_size_range() 2024-05-27 11:39:27 +02:00
ManoloFLTK
39c1386ba7 Improve use of fl_create_print_window() under Windows 2024-04-04 16:36:51 +02:00
ManoloFLTK
34b8801fed Windows: fix moving window with Windows+Shift+arrow (#919) 2024-03-01 18:30:20 +01:00
ManoloFLTK
266647d2a7 Windows: fix issue if moving window back & forth across screens (#919) 2024-03-01 12:20:10 +01:00
ManoloFLTK
0eef561e7b Windows: make Ctrl/+/-/0/ scaling system-wide if all screens have same DPI 2024-03-01 11:11:15 +01:00
Albrecht Schlosser
367826979d Fix a typo and the URL to an STR in a comment
no code changes
2024-02-28 15:54:02 +01:00
ManoloFLTK
0ae927a00e Add Fl_Window::maximize() and Fl_Window::un_maximize() 2023-11-05 19:42:55 +01:00
Albrecht Schlosser
847901623a Handle shift + mousewheel event on Windows (STR 3521)
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 scrollwheel 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 is different than the one in file 'scroll.patch' (STR 3521).
It takes care of distinct mousewheel delta calculation for vertical
and horizontal mousewheels and avoids the "fallthrough" case.

Note: macOS takes care of this, there's no special handling required.

To do: the Wayland platform still needs to be updated.
2023-08-13 17:44:00 +02:00
Albrecht Schlosser
a4c6c18b3d Fix doxygen doc generation and document platform specific files
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-05-09 22:36:41 +02:00
Matthias Melcher
a2929b15ba Undid old change in Windows code that causes undesired results (STR 1115)
Windows created when another window was grab()'d would always become
dependents under WIN32, hiding them when the grabbed window was hidden.
2023-04-30 20:08:44 +02:00
ManoloFLTK
f459fdb637 Allow scaled image in Fl_Window::cursor(const Fl_RGB_Image *, int, int) 2023-02-13 12:11:04 +01:00
Albrecht Schlosser
d7f21d9568 Remove dead code and comments (Windows only)
Most of the old code was a leftover of STR 3454 (which fixed winsock
issues).

Also removed an old comment about usage of Windows WSAAsyncSelect()
and why it had been removed (related to Windows socket functions).
2023-02-10 13:31:07 +01:00
Albrecht Schlosser
2239ecc4a1 Fix typos in documentation and comments
(no code changes)
2023-02-10 13:13:36 +01:00
ManoloFLTK
f3e21ddad2 Fix for "Rename Fl_X* Fl_Window::i private class member" (#223) 2023-01-13 21:16:17 +01:00
ManoloFLTK
6a5c326c39 Fix for "Screen resolution change (win32)" (#651) 2023-01-13 15:15:02 +01:00
ManoloFLTK
9bdaf5a84d Virtual member Fl_Window_Driver::makeWindow() now returns void 2023-01-09 17:35:38 +01:00
ManoloFLTK
df059de37e "Public members Fl::awake_ring_*_ should be private" (#559) - cont'd 2022-12-10 10:19:54 +01:00
ManoloFLTK
59be6a7ef9 Fix for "Public members Fl::awake_ring_*_ should be private" (#559) 2022-12-09 18:50:04 +01:00
ManoloFLTK
5f189aa213 Make Windows-specific HICON-using functions visible in doc. 2022-10-06 13:15:16 +02:00
ManoloFLTK
eb314f5653 Allow use of Fl_Window::default_icon() with a scaled image - Part 2.
Default icons are handled according to their scaled size, if there scaled.
2022-09-17 09:03:34 +02:00
ManoloFLTK
87ee126e1f Allow use of Fl_Window::default_icon() with a scaled image. 2022-09-12 11:07:03 +02:00
ManoloFLTK
c720aae515 Make hybrid Wayland/X11 platform. 2022-08-29 12:15:32 +02:00
ManoloFLTK
02870242ee Move input method support to Fl_Screen_Driver from Fl_Graphics_Driver 2022-06-19 10:23:24 +02:00
ManoloFLTK
f5628aa66d Fix issue #413: Commit 29d9e31 creates memory handling problem under macOS. 2022-03-20 08:09:34 +01:00
Albrecht Schlosser
47154602dd Simplify internal Fl_WinAPI_Window_Driver::fake_X_wm() method
Add optional arguments 'style' and 'styleEx' to fake_X_wm().

Remove static function fake_X_wm_style() and include its code in the
Window driver method Fl_WinAPI_Window_Driver::fake_X_wm(). This
removes some calls and function arguments.
2022-03-01 13:45:51 +01:00
Albrecht Schlosser
091712bea8 Fix default size_range() calculation (issue #392, STR 3352) 2022-03-01 13:45:51 +01:00
Albrecht Schlosser
84c06419bc Remove obsolete/disabled "boxcheat" code
Windows platform: Remove comments about obsolete code and one
exported declaration of the variable 'fl_background_pixel' which
is used only on the X11 platform.

X11 platform: Remove comments.

Other platforms: not affected.
2022-02-21 20:38:33 +01:00
Albrecht Schlosser
e73f9d466d Rearrange "Print Button Window" functions
- Rename Fl_Screen_Driver::print_or_copy_window() to
    fl_print_or_copy_window()
- Add header file src/print_button.h
- Update dependencies
2022-02-03 21:57:47 +01:00
ManoloFLTK
2e6e0b9c36 Reorganize classes Fl_System_Driver and Fl_Screen_Driver
These virtual members are moved from Fl_Screen_Driver to Fl_System_Driver
- wait(double)
- ready()

These virtual members are moved from Fl_System_Driver to Fl_Screen_Driver
- copy(const char *stuff, int len, int clipboard, const char *type)
- void paste(Fl_Widget &widget, int clipboard, const char *type)
- clipboard_contains(const char *type)
- clipboard_notify_change()

These members are moved from Fl_X11_Screen_Driver to Fl_X11_System_Driver
- poll_or_select_with_delay(double time_to_wait)
- poll_or_select()
and are made virtual in preparation for the introduction of class
Fl_Unix_System_Driver.
2022-02-03 07:03:44 +01:00
Albrecht Schlosser
29d9e31c51
Consolidate timeout handling across platforms (#379)
Add Fl_Timeout class

Move platform independent code of Fl::wait() to main part

- basic timeout handling
- Fl::run_checks()
- Fl::run_idle()
- Fl::idle()
- waiting time calculation (next timeout)
- remove platform dependent "screen driver" stuff
2022-01-31 22:27:17 +01:00
Albrecht Schlosser
92e9181a0a Rename FL/fl_string.h to FL/fl_string_functions.h
This is part 1 of the final fix for a previous name clash on case
insensitive file systems (fl_string.h vs. Fl_String.H).
2022-01-16 19:47:16 +01:00
ManoloFLTK
27c175dad8 Add virtual void Fl_Graphics_Driver::set_status() and implement for X11 platform. 2022-01-07 07:50:36 +01:00
ManoloFLTK
47164bf954 Fix for issue #344 : New/Delete Type Mismatch on Windows 2021-12-19 19:49:39 +01:00
ManoloFLTK
12d699a650 Win32 platform: add support of "PROCESS_PER_MONITOR_DPI_AWARE" set via manifest. 2021-12-11 16:39:11 +01:00
ManoloFLTK
0a8b1845fe Win32 platform: allow use of manifest to set the app's DpiAwareness level.
This fixes issue #309: FLTK 1.4 does not properly size window when using display scaling on Windows 10.

FLTK now tests whether the app's DpiAwareness has been previously set, presumably
via a manifest, before attempting to set it to FLTK's preferred level DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2
2021-12-11 11:40:02 +01:00
Greg Ercolano
74dd5164d3 Fixes STR #3352: "tiny window problem if child group larger than window" 2021-12-05 12:26:25 -08:00
Albrecht Schlosser
1ce3a84e9f Refactor and improve "Print front window" dialog
src/print_button.cxx: "Print front window" implementation (new file)

This is compiled and activated if USE_PRINT_BUTTON is defined.

The feature can be fine controlled by environment variable
  'FLTK_PRINT_BUTTON' (see docs in source file).
2021-11-19 18:50:53 +01:00
ManoloFLTK
b027d2ba57 Windows platform: use GDI+ to antialias oblique lines and curves. 2021-05-31 08:28:06 +02:00
Albrecht Schlosser
374232e2f4 Fix MSVC 2010 and older not finding round()
Actually we don't know about some newer MSVC versions, but current
version MSVC 2019 works fine w/o defining round(). If other MSVC
versions need this as well we can change the version test or add
a compiler feature test to CMake (configure not required).
2021-05-07 15:48:24 +02:00
ManoloFLTK
d93fc2bfa6 Use <config.h> when appropriate. 2021-02-16 11:08:59 +01:00
ManoloFLTK
a723c0e889 PR #174: Skip the call to MonitorFromRect when it is not needed. 2021-02-15 21:07:24 +01:00
ManoloFLTK
9fad601401 Remove compilation warnings issued by Visual Studio 2019. 2021-02-13 21:13:04 +01:00