On Wayland we implement Client-Side Decorations if the compositors do not
implement SSDs. In that case, the destructors of the surfaces were called
in the wrong order, leading to a dereference of an already freed object.
We need to first destroy the subsurface before destroying the parent surface.
Related PR on kitty: https://github.com/kovidgoyal/kitty/pull/3066
Related issue on kitty: https://github.com/kovidgoyal/kitty/issues/3051Closes#1798.
(cherry picked from commit 0dc1005c85)
CMake 3.19 adds -xc when the LANGUAGE file property is C, breaking our
workaround for CMake 3.15 and earlier not understanding the .m suffix.
Fixes#1787.
(cherry picked from commit 3327050ca6)
This mirrors the filtering done on X11 and Cocoa. Possibly this should
be done by shared code instead.
Fixes#1610.
(cherry picked from commit 0bccc3852b)
/W3 is the default for new VS projects and the library builds cleanly
with it on VS 2010-2019 so let's try to keep it that way.
(cherry picked from commit 6b78419c9a)
Clang ignores this when C99 is enabled, while GCC does not. Removing
the checks for Clang to hopefully avoid a false sense of security.
(cherry picked from commit 9b140d08d7)
An incorrect value for _WIN32_WINNT_WINBLUE caused GLFW to think Windows
8 was 8.1 or greater. This led to a crash when attempting to call
SetProcessDpiAwareness.
Closes#1775.
(cherry picked from commit e1d71cfa4701250a44a6c02d1bbb43309ac8a46c)
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)