The name selection for the Vulkan loader and the EGL and client
libraries used the GLFW platform macros instead of the platform's own
macros. This caused the selection to be incorrect when building only
the Null platform on any platform but Linux (where it only accidentally
worked due to being the default case).
OSMesa was already using the correct method.
This adds support for wl_seat version 5, which adds pointer frames.
This allows two-dimensional scroll input to be emitted as single events
instead of one event per axis per motion.
It's also the the foundation for future enhancements like properly
scaled discrete scroll events and server-side key repeat.
Fixes#2494
The client-side key repeat timer fd was only created for wl_seat version
4 or later, but was then used unconditionally during event processing.
Rather than have this mechanism do nothing in a more correct way on
wl_seat version 3 or earlier (which is very old by now), this commit
creates the key repeat timer fd and then sets (hopefully gentle)
hardcoded repeat delay and rate.
Fallback decoration mouse button actions were performed for both press
and release events. The requests made using a mouse button release
serials were presumably (and correctly) discarded by the compositor.
This commit removes the generation of these nuisance requests.
Redrawing the window contents for every possible event is not
a reasonable thing for an application to do. The test should be whether
redrawing on demand plus periodic updates works with near-idle CPU use
and no extra input latency.
This change incidentally makes the test well-behaved on Wayland, where
it was previously broken due to every EGL buffer swap causing an event
to be received.
The previous implementation was based on the incorrect assumption that
the _NET_WM_STATE_ABOVE state is always retained on unmapped windows.
According to EWMH the WM should remove the _NET_WM_STATE property when
a window is unmapped.
This commit moves the adding of _NET_WM_STATE_ABOVE to before mapping
the window during glfwShowWindow. The logic for removing
_NET_WM_STATE_ABOVE from hidden windows is retained, as EWMH still
allows WMs to leave the window property on unmapped window.
Fixes#2276
The glfwCreateWindow function ensures that the width and height are
at least greater or equal than zero, but on X11 it is invalid to
create a window with dimensions that equal zero, see [1].
This change ensures that the dimensions passed to XCreateWindow are
at least 1 by 1.
This issue was detected in [2], where a call to glfwCreateWindow
was done to request a 1x1 window, with a _glfw.x11.contentScaleX of
less than 1.0 (0.958333) this results in a request for a 0x0 window
which then causes an BadWindow error from X11.
[1]: e003f52661/specs/libX11/CH03.xml (L1333-1337)
[2]: https://github.com/WerWolv/ImHex/pull/2390
This adds the glfwGetGLXFBConfig function for querying the GLXFBConfig
the GLXWindow of a window.
This commit is a squashed and modified version of PR #1925 by knokko.
The following changes were made by elmindreda:
The function signature was changed to handle GLXFBConfig being an opaque
value in core GLX. The function error checks were fixed and updated.
The struct member name was changed. The struct member clearing on
context destruction was removed. All documentation snippets were
updated.
Closes#1925
This adds the glfwGetEGLConfig function for querying the EGLConfig of
the EGLSurface of a window.
This is a re-implementation of the PR #2045 by knokko, slightly
redesigned to handle EGLConfig being an opaque type in core EGL.
Closes#2045
If a modal surface like the window menu was active, clicking on the GLFW
window content area to close it would correctly emit the cursor enter
event but would not propagate the cursor position from the event.
When a click through to the fallback decorations caused the end of
a modal like the window menu, the cursor shape would not be updated
until the next time the cursor moved.
This commit adds an update of the cursor for the pointer enter event for
fallback decoration surfaces, in addition to the updates at pointer
motion events.
The fallback decorations would place the menu at the wrong position, by
not translating the last decoration surface position into toplevel
surface coordinates.
This also limits the menu to the caption area of the top decoration
surface, similar to how other toolkits work.