In the case the key repeat timerfd was interrupted before read(), the
cursor timerfd wasn’t read at all even when it could.
Related to #1711
(cherry picked from commit 68879081cb)
The monitor handle could have become invalid just before the call to
GetDpiForMonitor. It was possible for both window and monitor content
scale queries.
This ensures both that an appropriate error is emitted and that the
retrieved values are zero on error.
Fixes#1615
(cherry picked from commit fbfd7e65c8)
Joysticks already connected when GLFW was initalized did not get gamepad
mappings applied to them.
Regression introduced by 74a8ba26c3.
This change was backported without taking into account that 3.3.x does
not have on-demand joystick init.
Fixes#1996
The native access functions for context handles did not verify that the
context had been created with the same API the function was for.
This makes these functions emit GLFW_NO_WINDOW_CONTEXT on API mismatch.
(cherry picked from commit cca9008db2)
The Wayland protocol spec[1] states that set_cursor must be called
with the serial number of the enter event. However, GLFW is passing in
the serial number of the latest received event, which does not meet the
protocol spec.
[1] https://wayland.freedesktop.org/docs/html/apa.html#protocol-spec-wl_pointer
As a result, set_cursor calls were simply ignored by the compositor.
This fix complies with the protocol more closely by specifically caching
the enter event serial, and using it for all set_cursor calls.
Fixes#1706Closes#1899
(cherry picked from commit e7758c506d)
According to the libxkbcommon documentation[1], xkb_keymap_key_repeats
requires keymap and keycode as input:
int xkb_keymap_key_repeats( struct xkb_keymap * keymap,
xkb_keycode_t key)
However, in inputChar in wl_input.c we are passing in xkb_keysym_t,
which was a type mismatch.
This results in some keys not repeating when they should and vice versa.
[1] https://xkbcommon.org/doc/current/group__components.html#ga9d7f998efeca98b3afc7c257bbac90a8Closes#1908.
(cherry picked from commit 216d5e8402)
The _glfwPlatformSetWindowFloating function would return without freeing
the state array if the window was already in the requested state.
(cherry picked from commit 071d7c0f46)
The contents scale of the hosted CAMetalLayer created for MoltenVK was
updated only after the GLFW content scale and framebuffer size events
were emitted, causing the layer to get out of sync with the monitor the
window was on.
(cherry picked from commit 076bfd55be)
Because there are controllers in the wild using the same hardware ID
despite having different numbers of buttons and axes, an error message
was triggered that was only expected for a corrupted mapping database.
This removes the error for now, in preparation for better error handling
for gamepad mappings overall.
Fixes#1763.
(cherry picked from commit 6876cf8d7e)
Some URLs in the documentation were overlooked during the switch to
https: for the GLFW website. This updates those and a few third-party
URLs.
(cherry picked from commit 787295b3af)
The `#glfw` IRC channel is moving to the Libera.Chat network due to the
recent takeover of the Freenode network.
(cherry picked from commit 78380c7761)
The old Travis CI .org service has been throttled for a while now and is
said to be shutting down completely next week.
This migrates the Travis CI build jobs to GitHub Actions, with minor
changes.
- The trailing whitespace detection has been removed for now.
- The libegl1-mesa-dev dependency for Wayland has been removed as it
appears to no longer be necessary for building.
(cherry picked from commit 5a6001a83b)
This skips the buffer swap after the initial glClear performed during
window creation, if the window is single-buffered. This call confused
apitrace into thinking the window was double-buffered.
Fixes#1873.
(cherry picked from commit 184377b493)
The /clang: suffix passed to Clang-CL was accidentally also passed to
the regular standalone Clang, which caused compilation to fail. We now
pass /W3 to Clang-CL, which it interprets as -Wall.
The _CRT_SECURE_NO_WARNINGS macro is now defined for both Clang and
Clang-CL.
The /entry: flag passed to link.exe is now also passed to lld-link,
letting the windows subsystem tests and examples link.
Fixes#1807.
Closes#1824.
Closes#1874.
(cherry picked from commit 061a0263a9)
This makes USE_MSVC_RUNTIME_LIBRARY_DLL update the directory scope
CMAKE_MSVC_RUNTIME_LIBRARY variable instead of CMAKE_C_FLAGS on CMake
3.15 and later.
Solution proposed by @moritz-h.
Fixes#1783.
Closes#1796.
(cherry picked from commit f4a7329604)
GLFW_SCALE_TO_MONITOR had no effect on Windows 8.1 up to and including
Windows 10 version 1607 (Anniversary Update), despite those having
support for per-monitor DPI.
That done was to avoid handling systems that have non-client scaling,
introduced in Windows 10 version 1607, without reliable overriding of
the new window size, introduced in Windows 10 version 1703 (Creators
Update). Both are needed to keep the content area at a fixed size for
windows that have GLFW_SCALE_TO_MONITOR disabled.
This change enables window rescaling on Windows 8.1 and all later
versions but disables non-client scaling for unscaled windows on Windows
10 version 1607. Versions after 1607 are unaffected.
Fixes#1511.
(cherry picked from commit 729c9988d0)
NSApp setActivationPolicy: was being called too soon when the app was
not bundled and launched from the command line.
This fix is based on #1802 by @richardwilkes.
Fixes#1648.
Closes#1802.
Adapted to 3.3-stable from 8b11867464.
On Wayland we implement Client-Side Decorations if the compositors do not
implement SSDs. In that case, the destructors of the surfaces were called
in the wrong order, leading to a dereference of an already freed object.
We need to first destroy the subsurface before destroying the parent surface.
Related PR on kitty: https://github.com/kovidgoyal/kitty/pull/3066
Related issue on kitty: https://github.com/kovidgoyal/kitty/issues/3051Closes#1798.
(cherry picked from commit 0dc1005c85)
CMake 3.19 adds -xc when the LANGUAGE file property is C, breaking our
workaround for CMake 3.15 and earlier not understanding the .m suffix.
Fixes#1787.
(cherry picked from commit 3327050ca6)
This mirrors the filtering done on X11 and Cocoa. Possibly this should
be done by shared code instead.
Fixes#1610.
(cherry picked from commit 0bccc3852b)