The GLFW_NO_WINDOW_CONTEXT error can be emitted if the window passed in
for context sharing does not have a context.
Fixes#2456
(cherry picked from commit 73948e6c0f)
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
(cherry picked from commit 9959dc69ca)
The current wording states that all keys have synthetic key release
events generated after focus is lost, but keys that aren't named
don't have any state held, so no such events are generated for them.
The new wording clarifies that only named keys have the events generated
for them.
(cherry picked from commit dbe810e403)
This is partly based on the implementation of libdecor support in
PR #1693 by @ christianrauch.
Where available, the libdecor library is loaded at init and becomes the
preferred method for window decorations. On compositors that support
XDG decorations, libdecor in turn uses those. If not, libdecor has
a plug-in archtecture and may load additional libraries to either use
compositor-specific decorations or draw its own.
If necessary, support for libdecor can be disabled with the
GLFW_WAYLAND_LIBDECOR init hint. This is mostly in case some part of
the dynamic loading or duplication of header material added here turns
out to cause problems with future versions of libdecor-0.so.0.
Fixes#1639Closes#1693
Related to #1725
This was adapted to 3.3-stable from
fbdb53b9ca.
The documentation was updated with the introduction of run-time platform
selection, but the preprocessor logic was not.
(cherry picked from commit 2efc598d70)
By default, the glfw3native.h header will include the platform-specific
headers necessary for the return types of GLFW native access functions.
Sometimes it is preferrable to declare those types
This commit adds support for the GLFW_NATIVE_INCLUDE_NONE macro, which
when defined disables the inclusion of all platform-specific headers.
Fixes#1348
(cherry picked from commit 05f6c13d11)
There were no checks for invalid values or asserts for all invalid NULL
pointers to glfwSetWindowIcon or glfwCreateCursor.
Fixes#1862
(cherry picked from commit 66a4882eb1)
On a Unix system, if you define GLFW_INCLUDE_NONE and
GLFW_EXPOSE_NATIVE_GLX, then include glfw3.h and glfw3native.h, you will
get a redefinition warning for GLAPIENTRY.
The glfw3.h header defines GLAPIENTRY as a service for OpenGL related
headers that assume it's already defined. However, glx.h includes gl.h,
which defines GLAPIENTRY unconditionally.
If not for Hyrum's law, the better solution would have been not to
define GLAPIENTRY if GLFW_INCLUDE_NONE is defined.
Fixes#2010
This is adapted to 3.3-stable from
535c3ce632 and
ce85c7dcaf.
This docstring previously indicated that GLFW_CONTEXT_REVISION was
a window hint and attribute, but in fact it is only a window attribute
(there is no code which uses this constant in any other context.)
We noticed this in https://github.com/hexops/mach/pull/71/files#r749741814Closes#1992
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
(cherry picked from commit 37fc28bff6)
Add GLFW_FORMAT_UNAVAILABLE to the list of possible errors in the
reference documentation for glfwGetClipboardString.
Slightly edited by @elmindreda.
Closes#1998
(cherry picked from commit bb193325cc)
The GLFW_INCLUDE_GLCOREARB branch was left out when GLFW_INCLUDE_GLEXT
was originally added, for reasons that are lost to history. The current
versions of these headers seem to co-exist just fine.
Issue reported on IRC.
(cherry picked from commit 309d79376f)
This sentence was truncated by 951a9583fa
and then not updated when content scale support was added with
16bf872117.
(cherry picked from commit 6a20053102)
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)
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)