Factor out a helper function to retrieve current gamma ramp size out of
_glfwPlatformGetGammaRamp implementations on Cocoa and X11, and add a
trivial implementation for Windows. No functional change.
Commit 9c513346ad ("Gamma will never be supported on Wayland") made
it clear that it cannot be implemented, so remove the TODO markers and
reword the error messages.
Assertions and tests in glfwSetGamma verify that user-supplied gamma is
a positive finite value, but tests for error reporting are redundant
given the preceding asserts (however asserts allow gamma == 0, which is
probably not intended).
Remove the asserts and simplify the range check. Alternatively, it may
be spelled as 'isfinite(gamma) && gamma > 0'.
click events would have an incorrect position after changing workspace,
if the mouse didn't move in between.
(Another example where this matters is a new window, if it appears under
the cursor, clicking would lead the application to think the user clicked
at 0,0)
As of the release of Mir 1.0, libmirclient has been deprecated[1] and
its developers recommend clients using it to switch to Wayland. This
patch removes support for libmirclient and instruct users to use the
experimental Wayland backend instead.
[1] https://discourse.ubuntu.com/t/mir-news-28th-september-2018/8184
This allows compositors which prefer to draw the decorations around
clients to do so, rather than letting GLFW draw its own decorations.
The appearance is thus entirely subject to the compositor used, but
should generally be better than the current solid colour decorations we
have, which we continue to use when the compositor doesn’t support this
protocol or tells us to draw the decorations ourselves.
This new protocol has been tested against wlroots’s rootston compositor.
Fixes#1257.
This allows the compositor to avoid having to setup and teardown a
SIGBUS signal handler whenever it needs to read from this surface, as it
knows we won’t be able to shrink the file and so doesn’t have to protect
against that.
This codepath will only be used on Linux ≥ 3.17 with glibc ≥ 2.27, and
possibly other kernels and libc. The former code will continue to be
used as a fallback, either if memfd_create() fails or if it isn’t
available.