On Windows 7, when GLFW framebuffer transparency and the DWM are enabled
but DWM transparency is disabled (i.e. when the Transparency setting is
disabled under Personalization > Color), the contents of the framebuffer
is combined with the last frame using additive blending instead of
replacing the previous contents.
This commit limits GLFW framebuffer transparency on Windows 7 to when
DWM transparency is enabled, removing the previous workaround of setting
a layered window color key that led to rendering artifacts.
Fixes#1512.
(cherry picked from commit 05dd2fa298)
The window decoration window can go away between calls to XQueryPointer,
for example if the GLFW_DECORATED window attribute was just cleared.
(cherry picked from commit ceb20c7f97)
Background: The IM will filter out key events, instead sending exact
duplicate events that are not filtered. It does not send these for
every event, however, so the duplicate events cannot be relied on for
key input. Instead we need to identify and discard them. Since they
are identical, they have the same timestamp as the originals.
The previous duplicate event detection would consume unrelated key
events if the keys were pressed simultaneously, as it only tracked
a single timestamp.
This fixes that issue for any combination of keys, at the expense of
a 1 KB array per GLFW window.
This fix is a stopgap until explicit IME support is done.
Based on #1472 by @LucaRood.
Fixes#1112.
Fixes#1415.
Fixes#1616.
Fixes#1663.
Closes#1472.
(cherry picked from commit 9a3664b4a9)
Supplementary Plane codepoints from WM_CHAR and WM_SYSCHAR messages were
reported as UTF-16 surrogate pairs.
Related to #1635.
(cherry picked from commit 6ce2070392)
Re-worded documentation for the `GLFW_OPENGL_DEBUG_CONTEXT` window hint
to avoid implying that it only applies to OpenGL contexts. Added a link
to the relevant Khronos extension description.
Closes#1720.
(cherry picked from commit 8a69a0d7e5)
This fixes a regression introduced by
105cf32e0b where GLFW_INCLUDE_GLU had no
effect if the GLFW header detected an earlier OpenGL header or loader
library header.
Closes#1712.
(cherry picked from commit 81f475bccb)
This fixes a race between the key repeat logic and the surface leave
event handler, which could result in repeated keys being reported with
a window of NULL.
Fixes#1704.
(cherry picked from commit c72da994ba)
The documentation claims that any extension loader library header
included before the GLFW one will prevent the inclusion of the
default OpenGL header. In reality this only worked if the loader
defined the canonical desktop OpenGL __gl_h_ inclusion guard and even
then relied on the OpenGL header to detect this.
This is the companion to 105cf32e0b, which
added the preprocessor logic to check for many known OpenGL and OpenGL
ES inclusion guards and not even attempt to include the default header
if any are present.
Some clarification of the language around header inclusion has also been
attempted, including making GLFW_INCLUDE_NONE more prominent.
Fixes#1695.
(cherry picked from commit 399c2a1fad)
If an OpenGL ES header or the glcorearb header is included before the
GLFW header (with no options defined), the legacy OpenGL header will be
implicitly included and the compilation will fail.
This disables the default behavior if we detect any known OpenGL, OpenGL
ES or extension loader inclusion guard macro.
Sources:
- Khronos headers
- Windows SDK
- MinGW
- MinGW-w64
- flextGL
- glad
- glad2
- GLEW
- Galogen
- gl3w
- GLXW
- glbinding
- Epoxy
- Glatter
- glLoadGen
- Regal
- GLee
- OpenGL.framework
- Debian
- FreeBSD
- ANGLE
- SwiftShader
Related to #1695.
(cherry picked from commit 105cf32e0b)
These are harmless errors but the code was worth fixing just to reduce
confusion and be more explicit. E.g. using a different variable name
for a new variable of a different type in win32_joystick.c.
Closes#1700.
(cherry picked from commit a84a30ab63)
The `atomCount` variable has the type `unsigned long`,
so the `for` loop iterating over it should use the same type.
Closes#1701.
(cherry picked from commit 250b94cd03)
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)