The data available on the X11 connection may be a reply or an internal
event for an X11 extension. Previously the check for whether an event
was available for us was done outside waitForEvent. This prevented data
available on other file descriptors from breaking the outer wait loop.
This commit moves the check for whether an event is available into the
wait functions, where there is enough knowledge to limit the check to
the X11 connection.
Related to #932
(cherry picked from commit 87970b7f26)
On Linux, the inotify descriptor was included in the set used for
select, but could not break the outer loop, leading to busy waiting
until timeout or the correct X11 event arrived.
This commit adds a new function for waiting just on X11 events.
Fixes#1872
(cherry picked from commit 1e987cb92e)
This replaces select with poll for checking for data on event file
descriptors, as select cannot handle file descriptors larger than 1023.
Closes#2024
(cherry picked from commit d3e4fcf8b7)
We switched to kUTTypeURL when NSURLPboardType was deprecated, as the
official replacement symbol NSPasteboardTypeURL was not available on
every version of macOS supported by GLFW.
kUTTypeURL has now also been deprecated.
This commit moves to a compile-time choice between NSURLPboardType and
NSPasteboardTypeURL depending on the minimum targeted macOS version.
Fixes#2003
(cherry picked from commit 7f6aa587f8)
The Wayland backend now requires xkbcommon-compose, which was added in
version 0.5.0. xkbcommon 0.5.0 was released in 2014.
This removes the non-composing fallback path for text input.
(cherry picked from commit 293d19a153)
By definition a hidden window on Wayland does not have valid framebuffer
contents.
This adds a window damage (refresh) event when a window is shown, to
request an initial frame for the now visible window.
(cherry picked from commit 25c521cbe5)
A window created with GLFW_VISIBLE set was not made visible by the
initial buffer swap during context attribute refresh.
Regression introduced by @elmindreda in
094aa6d3c7.
(cherry picked from commit c05acf6246)
Platform code should not generate key events with GLFW_REPEAT.
GLFW_PRESS is translated into GLFW_REPEAT by shared code based on the
key state cache.
This confused the automatic key release logic into not generating an
event with GLFW_RELEASE for a key being repeated when the window lost
input focus.
(cherry picked from commit 3f5dfeaf29)
We were previously storing the pointer position only when on the main
window, so when the user clicked on a fallback decoration it would use
the last position of the cursor on the main window, instead of the
position in the decoration surface.
Fixes part of #1991.
(cherry picked from commit 855d338a65)
The OpenBSD ports tree assigns its own soname version numbers, so the
hardcoded sonames GLFW uses to load libraries on non-macOS Unices are
often incorrect. Instead OpenBSD recommends that run-time loading
should leave out the version numbers entirely. The OpenBSD ld.so then
finds the correct library.
This upstreams the ports tree fixes for Xcursor and EGL, and adds the
corresponding fix for all other run-time loaded library sonames.
Tested on OpenBSD 7.0.
This issue was initially reported on IRC.
(cherry picked from commit 7d060ba4f1)
Corrects the protocol violation when creating an xdg_surface from a
wl_surface that already has a buffer due to EGL buffer swaps.
This commit is based on PR #1731 by @ghost, but adapted and altered:
- The XDG surface and role are now only created when a window is shown
to prevent application lists from showing command-line applications
with off-screen-only windows
- The special case of Wayland+EGL buffer swap is now in the EGL code
to mirror how X11 is handled
- Adaption to run-time platform selection and separate credits file
Fixes#1492Closes#1731
(cherry picked from commit 094aa6d3c7)
If a window lost input focus while a key was held down, the key repeat
mechanism would resume once the window regained focus.
(cherry picked from commit e24fe4b189)
This extensions allows GLFW to instruct the driver to ignore the alpha
bits, even in formats which contain them. This makes it possible to use
the alpha bits as extra storage, without it affecting the end result
getting displayed to the user.
Fixes#1434Fixes#1803
(cherry picked from commit 6281f498c8)
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)
Only apply the content scale to the initial size of the window if
content scale retrieval succeeded.
Related to #1615.
(cherry picked from commit 53d86c64d7)
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)