This adds a workaround for kIOMasterPortDefault having been deprecated
in favor of kIOMainPortDefault in macOS 12.0.
Closes#1980
(cherry picked from commit f75c251dec)
The GLFW_INCLUDE_GLCOREARB branch was left out when GLFW_INCLUDE_GLEXT
was originally added, for reasons that are lost to history. The current
versions of these headers seem to co-exist just fine.
Issue reported on IRC.
(cherry picked from commit 309d79376f)
The performance counter API is guaranteed to succeed on Windows XP and
later so there is no need for a fallback.
This removes our last dependency on winmm.
(cherry picked from commit b6834bf2a1)
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)
This sentence was truncated by 951a9583fa
and then not updated when content scale support was added with
16bf872117.
(cherry picked from commit 6a20053102)
There is a suppression interval (0.25 seconds by default) after a call
to CGWarpMouseCursorPosition, during which local hardware events
(keyboard and mouse) are ignored. GLFW already calls
CGEventSourceSetLocalEventsSuppressionInterval with a value of 0.0, but
it doesn't help in this case, there is still a short delay before the
cursor can be moved. Moving the CGAssociateMouseAndMouseCursorPosition
call after the cursor position has been restored, fixes the issue.
Closes#1962
(cherry picked from commit 157ebb80aa)
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)
Variables in CMake if-statements (and only in if-statements) do not need
to be explicitly dereferenced; a thing I did not always know.
(cherry picked from commit daed5edd6e)
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 outer glfwUpdateGamepadMappings function is now bypassed when
parsing the default gamepad mappings. The data in mappings.h does not
contain any comments or line breaks. Also this is done before joystick
support has been initialized, so there is no need to look for matching
devices.
Finally, the array of default mappings is pre-allocated. This has no
measurable performance impact but does generate a lot of calls, which
won't be nice for a user provided custom allocator to deal with.
(cherry picked from commit 201400b974)
This fixes gamepad mappings being included in GLFW binaries that would
then never use them because they were for a different platform.
(cherry picked from commit 0c90e1a33f)
This avoids generating a macro redefinition warning when the
GL_SILENCE_DEPRECATION macro has been defined for the whole of a larger
project.
Closes#1840.
(cherry picked from commit 1d88a2e3d6)
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)
In the compile guide, the "Dependencies for Linux and OSMesa" section
looks to be one level too high in the hierarchy. I've moved it to be in
line with the similarly-named sub-sub-sections.
Closes#1923.
(cherry picked from commit 52d8347d34)
On FreeBSD O_CLOEXEC is only available when _POSIX_C_SOURCE >= 200809.
O_CLOEXEC is in turn required by the epollshim header.
Issue reported on IRC.
(cherry picked from commit a89fcd20d8)
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)