This fixes the bug of video modes being discarded if they had
a different resolution but the same area as another mode.
Fixes#1555.
Closes#1556.
(cherry picked from commit 2777f6a754)
The window rect adjustment for content scale broke the initial, correct
maximization performed when creating the window with WS_MAXIMIZE. This
switches to updating the restored rect instead of the current rect.
Fixes#1499.
Closes#1503.
(cherry picked from commit 711b9694a1)
The command buffer handle was not reset after being freed on window
resize, leading to a segfault when the stale handle was used.
(cherry picked from commit 65748fb8f3)
The Bazel build system may define DEBUG when compiling on macOS, which
caused the glfwinfo test program to fail to build.
Fixes#1537.
(cherry picked from commit 6abad2efd2)
When using GLFW with CMake and installed GLFW binaries, `-DGLFW_DLL` is
passed on Linux, which should not happen.
Closes#1530.
(cherry picked from commit d7fb01750ece465cfaae0493dfe3003da1e5f500)
When both GLFW_INCLUDE_VULKAN and VK_USE_PLATFORM_WIN32_KHR were
defined, the GLFW header would define replacement versions of APIENTRY
and WINGDIAPI /before/ including the Vulkan header, which would include
windows.h, which (justifiably) defines APIENTRY and WINGDIAPI blindly.
Fixes#1524.
(cherry picked from commit 773f4495f0)
For users with multiple keyboard layouts configured, glfwGetKeyName
works fine only with the primary layout. Switching layouts results in
changing the group index. This commit querries the current group index
when initializing keyboard input and keeps track of any change to it.
As a result the scancode -> keyname mapping may change while the program
is running (needs to be documented).
Fixes#1462.
Closes#1528.
(cherry picked from commit 36f90800d8)
MSVC 2019 complains that the code at line 1744
(`GetMonitorInfo(window->monitor->win32.handle, &mi);`) can potentially
dereference a null pointer. The compiler is wrong in this case (it has
not spotted that `monitor` and `window->monitor` must be equal), but
I think it makes sense for our non-NULL test to be on the variable we
actually use rather than the one it was set from.
Related to #1491.
(cherry picked from commit 1d62157268)
The EWMH feature detection atoms are now named and loaded the same way
as other X11 atoms. Detection is now performed after all
non-conditional atoms have been loaded. The EWMH detection now has
hopefully more readable comments.
(cherry picked from commit fad9896d38)
Thank you, Travis CI, for reminding me that one cannot disable a header
with inclusion guards if it doesn't exist.
(cherry picked from commit 537ea4ccf1)
This will let higher-level projects override GLFW CMake options with
normal variables instead of having to use cache variables.
This means with CMake 3.13 and later you can now do:
set(GLFW_BUILD_TESTS ON)
add_subdirectory(path/to/glfw)
Instead of the more verbose:
set(GLFW_BUILD_TESTS ON CACHE BOOL "" FORCE)
add_subdirectory(path/to/glfw)
(cherry picked from commit 71e6ff386d)
This should have been done when the WGL extension members were moved
from the context struct to the library struct.
(cherry picked from commit 22a6c02a4c)
Files built for Win32 must use C89 style declarations for compatibility
with VS 2010 and 2012, which are still supported by GLFW.
(cherry picked from commit 56aad76b16)
Most context related hint and attribute links had copypaste errors.
The GLFW_CONTEXT_RELEASE_BEHAVIOR and GLFW_CONTEXT_NO_ERROR attributes
did not have guide documentation.
(cherry picked from commit 3cf7645b96)