When compiling with `-Wall` and `-pedantic-errors`, gcc complains with
```
warning: ISO C does not support the '%m' gnu_printf format [-Wformat=]
```
because the `%m` conversion specifier is a GNU extension.
Closes#1702.
(cherry picked from commit d4f5074535)
The only two EGL implementations on macOS are Swiftshader and ANGLE.
While Swiftshader supports both `NSView` and `CALayer` as
`EGLNativeWindowType`, ANGLE supports only `CALayer`. Furthermore
Swiftshader's OpenGL ES frontend is deprecated in favor of using ANGLE's
Vulkan backend on top of Swiftshader's Vulkan frontend.
This means that on macOS `EGLNativeWindowType` should be a `CALayer` for
compatibility with ANGLE.
Fixes#1169.
Closes#1680.
(cherry picked from commit 91eebe922d)
glfwSwapBuffers may be called by any thread but NSWindow may not.
Bug introduced by c3ca88055f and reported
by @crujose.
(cherry picked from commit 949275bbed)
A regression introduced by b889aa7841
broke the special handling of numpad keys for the non-XKB fallback path.
The non-functional remains were later removed. This restores the
original behavior.
(cherry picked from commit cab41529da)
This replaces the hardcoded keycode ranges and various kludgy range
checks with the actual ranges reported by Xlib and XKB.
(cherry picked from commit ee45b58647)
This fixes the issue where function keys would be reported as
GLFW_KEY_UNKNOWN if XKB was available and one of the configured keyboard
layouts was Arabic.
This is only part of #1598, because the full patch removed parts of the
fallback path for when XKB is unavailable.
Closes#1598.
(cherry picked from commit a41a58a95e)
The non-root parent window owned by the WM could be destroyed before we
process the ConfigureNotify event using the cached parent handle.
Bug was found by unmapping a decorated window.
This like all uses of the Xlib error handler is not thread safe and
there is nothing we can do about that short of moving to XCB.
Fixes#1633.
(cherry picked from commit e65de2941c)
The wayland-egl library is now loaded dynamically at init. This narrows
the pkgconfig dependencies to the link-time depdendencies.
(cherry picked from commit 6aca3e99f0)
This removes most references to GLU, replaces the legacy CMake cache
variables for OpenGL with the modern namespaced target and switches to
$() for command substitution.
Fixes#1580.
(cherry picked from commit d973acc123)
Some synthetic key messages come with a scancode of zero, causing them
to be translate to GLFW_KEY_UNKNOWN. This fills in the missing scancode
by translating the provided virtual key.
Rather than further complicate a single-use function, its body is merged
into the key message handler.
Fixes#1623.
(cherry picked from commit 789a2bcb39)
The Win+V hotkey brings up a clipboard history IME that consumes the key
release. This adds left and right Super to the modifier keys manually
polled for undetected release during event processing.
Fixes#1622.
(cherry picked from commit 562c17d131)
If the application is not linked against the Vulkan loader and relies on
a third-party loader library or glfwGetInstanceProcAddress, then our
call to dlopen will fail without a custom dyld environment variable.
This adds a fallback of looking in the directory of the main executable,
which matches the bundle structure recommended by the Vulkan SDK, making
that finally work out of the box for fully dynamic loading.
(cherry picked from commit 7da87aaae7)
This should have been initialized to the screen root, not None. This
issue was introduced by fe57e3c292.
Fixes#1620.
(cherry picked from commit 9372ba95fa)
When the WM does not support EWMH or there is no WM running, GLFW falls
back to XSetInputFocus, which will emit BadMatch if the window is not
viewable, which will terminate the program.
Bug spotted on IRC.
(cherry picked from commit aa5e313561)
A window resize action that also resulting in the window being moved did
not emit any window positions events, as the position of real
ConfigureNotify events was ignored. The real events use parent
coordinates instead of root coordinates so this adds parent tracking and
conditional translation.
Fixes#1613.
(cherry picked from commit fe57e3c292)