Commit Graph

4901 Commits

Author SHA1 Message Date
Camilla Löwy
68edc66aa4 Add credit
Fixes #2397
2023-12-07 16:01:47 +01:00
Camilla Löwy
ddd92a4fa8 Update changelog and add credit
Related to #2327
2023-12-06 18:34:22 +01:00
Camilla Löwy
5e4496cb42 Cocoa: Fix compilation error on OS X 10.8
The occlusion state parts of NSWindow are OS X 10.9+ only but we still
(technically) support building for only 10.8.

Fixes #2161
2023-12-06 18:34:22 +01:00
Camilla Löwy
0ede5f58c6 Simplify joystick hat value assertions 2023-12-06 18:34:22 +01:00
Peter Johnson
52405a9d59 Win32: Fix invalid hat bit mask being accepted
It is reportedly possible to get opposing directions of an XInput DPad
bit mask set simultaneously with some controllers.

This commit ensures that those values are not passed on to other parts
of GLFW.

This commit is based on the PR #2291 by @ PeterJohnson but with the
following changes:
 - moved XInput-specific special case to XInput implementation
 - attempt to preserve data by only masking out the invalid axis
 - admin (credit, changelog, commit message)

Closes #2291
2023-12-06 18:34:12 +01:00
Camilla Löwy
9959dc69ca Improve documentation relating to key tokens
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
2023-12-05 19:10:06 +01:00
Camilla Löwy
557a633b2d Fix list of possible errors for glfwGetKeyName 2023-12-05 18:36:54 +01:00
Camilla Löwy
b1517e5b3e Fix glfwGetKeyName not checking key token is valid 2023-12-05 18:36:54 +01:00
Camilla Löwy
3f31519de8 Clarify documentation for glfwMakeContextCurrent 2023-12-05 18:36:54 +01:00
Camilla Löwy
1b2605dbcd Fix missing new constant in release notes 2023-12-05 18:36:54 +01:00
Camilla Löwy
93d70cb6a8 Add assertions for context function invariants
Related to #2327
2023-12-05 18:36:54 +01:00
Camilla Löwy
fa0ea5c41f Fix potential violation of invariant
The shared function for reading back context attributes,
_glfwRefreshContextAttribs, did not check whether the newly created
context had been successfully made current.  This violated the invariant
that the context TLS slot always points to a valid window and that its
context is current whenever _glfw.platform.getProcAddress is called.

Related to #2327
2023-12-05 18:36:54 +01:00
Camilla Löwy
8c5471d6cd Fix return value on error for glfwGetKeyScancode
The documentation says it should be -1, not zero.
2023-12-05 18:36:38 +01:00
Camilla Löwy
fb94e4268b Remove changelog entry
This bug was introduced since the last release and should not be listed.
2023-12-01 12:38:57 +01:00
Camilla Löwy
d097e35743 Wayland: Fix heuristics for what counts as events
The Wayland implementation of glfwWaitEvents* keeps waiting until it
sees evidence that a significant event has been processed.  However,
this included updating an animated cursor (not a significant event)
but did not include previously buffered Wayland events or libdecor
events (definitely significant events).

This commit corrects these cases.
2023-11-30 18:52:43 +01:00
Camilla Löwy
23e40548b1 Wayland: Fix protocol error on undecorated window
When setting the visibility of a libdecor frame on a compositor that
supports XDG decorations, libdecor 0.1 will update the geometry of the
XDG surface.  GLFW attempted to set the visibility before having told
libdecor what size the content area is.  This caused a Wayland protocol
error when libdecor attempted to set the window size to 0x0.

This commit adds setting the content area size for the libdecor frame
directly after creation, allowing libdecor to know what it's doing.
2023-11-30 18:52:43 +01:00
Camilla Löwy
9fdc425931 Wayland: Use Wayland to wait for libdecor to init
Much of libdecor is initialized only after certain events have been
received from the compositor and some parts of libdecor 0.1 are unsafe
to use until this delayed initialization has completed.

Since libdecor does not provide an API to query if or be notified when
this has happened, GLFW processed events until its newly created
libdecor frame had created its XDG shell objects.

This commit switches to using a generic Wayland sync point created just
after libdecor (and presumably its plugin) has set up its delayed
initialization, instead of relying on the more specific implementation
detail mentioned above.

It also makes this wait mandatory before the first libdecor frame is
created instead of a pre-condition for certain libdecor frame calls,
hopefully removing even more dependence on implementation details.
2023-11-30 18:52:12 +01:00
Doug Binks
23ea072c41
Reorder changelog entry 2023-11-27 16:56:58 +00:00
Doug Binks
659d161446
Reorder credit 2023-11-24 17:06:18 +00:00
Grzesiek11
dbe810e403
Documentation: only named keys generate synthetic key releases
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.
2023-11-24 17:04:13 +00:00
Jan Schürkamp
125b1a2506
Merge branch 'master' into taskbar-progress 2023-11-22 09:38:27 +01:00
Jan Schürkamp
28dac93dad
Merge branch 'master' into application-badge 2023-11-22 09:36:47 +01:00
Camilla Löwy
afd22ebcf3 Add credit
Related to #2403
2023-11-21 21:26:45 +01:00
Scr3amer
97820bc329
Null: Remove duplicated function declaration
The declaration of _glfwRequestWindowAttentionNull was duplicated.

Closes #2403
2023-11-21 20:28:39 +01:00
Camilla Löwy
d9709904fe Linux: Fix POSIX version not set for Null build
When compiling GLFW on Linux with only the Null platform enabled, the
CMake files did not set the required POSIX version macro.

Fixes #2402
2023-11-21 17:40:43 +01:00
GamesTrap
a822381ed7
Win32 Fixed typo in font name 2023-11-19 04:50:20 +01:00
Jan Schürkamp
5af8c06714
Merge branch 'glfw:master' into application-badge 2023-11-18 11:54:28 +01:00
Jan Schürkamp
a8e3e5dbe6
Merge branch 'glfw:master' into taskbar-progress 2023-11-18 11:54:13 +01:00
Camilla Löwy
a87acd8c1f Update changelog and add credit
Related to #2229
2023-11-16 23:08:50 +01:00
Camilla Löwy
2a4dd9c28f Cleanup 2023-11-16 23:08:30 +01:00
Michael Skec
c992226a9c Linux: Fix memory leak when inotify init failed
This introduces regex_compiled boolean to track whether the regex is
compiled successfully.

Closes #2229
2023-11-16 20:49:23 +01:00
Camilla Löwy
0bd3e879e1 Fix unneccessary use of "must"
Passing a context-less window to a function that requires a context only
emits a harmless GLFW_NO_WINDOW_CONTEXT error.
2023-11-16 20:49:23 +01:00
Camilla Löwy
509f4131be Win32: Fix glfwWaitEventsTimeout ignoring messages
The bitmask passed to MsgWaitForMultipleObjects was missing
QS_SENDMESSAGE, causing glfwWaitEventsTimeout not to return when the
thread received messages sent from other threads.

Fixes #2408
2023-11-16 20:49:23 +01:00
Camilla Löwy
01d7c331fd Wayland: Fix zero being used in place of NULL 2023-11-16 20:49:23 +01:00
Camilla Löwy
938a3c29b2 Update Doxyfile template for Doxygen 1.9.7 2023-11-16 20:49:23 +01:00
Doug Binks
3ed6e9d89a
Updated credit 2023-11-15 17:48:30 +01:00
Doug Binks
9a80225ddf
Add credits
Related to #2386 and #2420
2023-11-15 16:48:19 +01:00
Doug Binks
46c2e35c55
Updated changelog 2023-11-15 16:44:24 +01:00
moritz-h
93a3ba8080
Win32: Add library name suffix to pkg-config file
Closes #2386
2023-11-15 16:37:46 +01:00
Jan Schürkamp
e597552e75
Merge branch 'glfw:master' into taskbar-progress 2023-08-11 19:58:59 +02:00
Jan Schürkamp
38b97087d0
Merge branch 'glfw:master' into application-badge 2023-08-11 19:58:17 +02:00
Camilla Löwy
3eaf1255b2 Wayland: Cleanup
Update naming and declarations to current standard.
2023-06-01 20:12:56 +02:00
Camilla Löwy
6b48f2be97 Wayland: Merge function called once
This brings together the two halves of the cursor setting logic for the
fallback decorations.
2023-06-01 20:12:22 +02:00
Camilla Löwy
00a663dafd Wayland: Fix fallback decorations emitting errors
A GLFW_CURSOR_UNAVAILABLE error would be emitted each time the cursor
moved over the fallback decorations if the standard cursor shape
appropriate for that part was missing on the system.

These errors served no useful purpose and have been removed.
2023-06-01 20:12:13 +02:00
GamesTrap
bf91d28b2c
Merge origin/taskbar-progress into application-badge 2023-04-12 00:55:41 +02:00
GamesTrap
8f1ddbb908
Fixed DBus crash because of illegal characters in executable name 2023-04-12 00:54:47 +02:00
GamesTrap
c31a759221
Merge origin/taskbar-progress into origin/application-badge 2023-04-12 00:33:36 +02:00
GamesTrap
5842644e2e
Improved DBus repetition 2023-04-12 00:10:39 +02:00
GamesTrap
59514c4bb5
DBus made bus and signal paths unique 2023-04-12 00:02:35 +02:00
GamesTrap
9506596ddd
Merge origin/taskbar-progress into origin/application-badge 2023-04-10 14:21:37 +02:00