This changes the default platform for Unix-like systems (other than
macOS) from only X11 to Wayland and X11. It also removes the backward
compatibility with the older GLFW_USE_WAYLAND CMake option.
If a bisect took you here because your build broke, hello, sorry, set
the GLFW_BUILD_WAYLAND or GLFW_BUILD_X11 CMake option to disable the
associated platform.
This can be done when configuring GLFW with CMake, from a higher-level
CMakeLists.txt if GLFW is part of your project, or at any point after
configuration by updating the CMake cache with the command-line tool or
the GUI.
The next step is to make Wayland the run-time default when enabled, but
that will hopefully not break any builds.
Related to #2439
The list of compile-time dependencies on FreeBSD lacked evdev-proto.
Unlike on Linux, the input-event-codes.h header file was not implicitly
included on FreeBSD.
Fixes#2445
glfwGetKeyName emitted GLFW_INVALID_VALUE when passed GLFW_KEY_UNKNOWN
and any scancode not associated with a key token on that platform.
This causes physical keys with no associated key token to emit
GLFW_INVALID_VALUE when the key and scancode are passed directly from
the key event to glfwGetKeyName. This breaks the promise made in the
reference documentation for glfwGetKeyName.
This commit removes that error for the whole range of valid scancodes.
Fixes#1785
We can finally have the compiler verify that the values go to the
correct struct member.
With this commit GLFW no longer compiles with Visual Studio 2012 or
earlier. If you must compile GLFW on Windows XP, check out MinGW-w64.
Fixes#2465
The GLFW_PLATFORM_UNAVAILABLE error was not listed for those native
access function that can emit it.
The order of errors for many functions in glfw3native.h did not match
the order used in glfw3.h.
The documentation for GLFW_PLATFORM_UNAVAILABLE was a little bit terse.
This is primarily a workaround for a GLFW application reading and/or
writing to the clipboard in rapid succession and catching up with the
Windows Clipboard History, which also has to contend for the lock.
This brings the latest released versions of all used Wayland protocol
files into this repository, removing the need for the user to arrange
a sufficiently new version of wayland-protocols.
The wayland.xml protocol file was copied from wayland 1.22.0.
The additional protocol files were copied from wayland-protocols 1.32.
Because of how files are moved and renamed inside the wayland-protocols
repository, it will not always be possible to update all our protocol
files from a single release without also potentially updating related
code (acceptable) and prematurely breaking compatibility with
compositors that still only support an earlier incompatible version
(unacceptable).
The macro in src/CMakeLists.txt has been modified to hopefully make it
easier to add new protocol files. This made it necessary to change the
name of a few of the generated header files.
Closes#2053
A segfault could occur during termination if libdecor was found but no
windows were created between initialization and termination. The wait
for libdecor to finish its initialization was only performed before
window creation, not at termination.
Regression introduced by 9fdc425931.
This adds Null-only and Wayland-only builds, while rearranging jobs by
host OS instead of by target platform.
Every useful combination of platforms is now being built, except for
Null-only with Win32 time and threading. This combination does not
compile on VS due to some non-standard array initializers.
It is reportedly possible for IOHIDDeviceCopyMatchingElements to return
NULL on macOS 13 if the application lacks input monitoring permissions.
This commit only prevents the segfault. More work will be needed to
correctly handle this situation, including Game Controller support.
Related to #2320Closes#2321
Mesa EGL requires the context version to be set to 2.0 or greater before
EGL_CONTEXT_OPENGL_NO_ERROR_KHR in the attribute list.
Without this, context creation via Mesa EGL with
EGL_CONTEXT_OPENGL_NO_ERROR_KHR set fails with EGL_BAD_ATTRIBUTE.
Fixes#2348
On macOS 10.15 Catalina and earlier, not having the resizable bit
cleared in NSWindowStyleMask in fullscreen leads to windows minimising
when clicked anywhere in the content area.
On all tested macOS versions it also causes the fullscreen window to be
resizable by the user.
Regression introduced by 0d599026d0.
Fixes#2377Closes#2405
The EGL_EXT_present_opaque extension is primarily a workaround meant for
Wayland, even if the language in it doesn't mention this. GLFW
previously always enabled this extension where supported. This caused
issues on X11 when running the Nvidia binary blob.
This commit ensures the extension is only enabled on Wayland.
Fixes#2365
It is reportedly possible to get opposing directions of an XInput DPad
bit mask set simultaneously with some controllers.
This commit ensures that those values are not passed on to other parts
of GLFW.
This commit is based on the PR #2291 by @ PeterJohnson but with the
following changes:
- moved XInput-specific special case to XInput implementation
- attempt to preserve data by only masking out the invalid axis
- admin (credit, changelog, commit message)
Closes#2291
Shifted the documentation away from the term 'named keys' as something
different than keys that glfwGetKeyName will return a name for. The
already existing term 'key token' should now be used to refer to the
GLFW_KEY_* constants.
The associated term 'named mouse button' was also replaced with
'supported mouse button'.
The parts explaining which key tokens will return a valid scancode from
glfwGetKeyScancode have hopefully been clarified. This issue was
reported in #2055.
The GLFW_KEY_UNKNOWN constant has been moved out of the list of key
tokens to simplify and hopefully clarify the related documentation.
Various other keyboard key related edits were made, hopefully resulting
in improvements.
Related to #2055