Commit Graph

4507 Commits

Author SHA1 Message Date
Camilla Löwy
6f9686f1f4 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.

(cherry picked from commit 0bd3e879e1)
2023-11-28 22:15:43 +01:00
Camilla Löwy
89bea58b18 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

(cherry picked from commit 509f4131be)
2023-11-28 22:15:23 +01:00
Camilla Löwy
ff156743ab Update Doxyfile template for Doxygen 1.9.7
This was adapted to 3.3-stable from
938a3c29b2.
2023-11-28 22:04:48 +01:00
Doug Binks
489339b837 Updated credit
(cherry picked from commit 3ed6e9d89a)
2023-11-27 17:12:44 +01:00
Doug Binks
af93f06259 Add credits
Related to #2386 and #2420

(cherry picked from commit 9a80225ddf)
2023-11-27 17:12:40 +01:00
Doug Binks
8ef347157a Updated changelog
(cherry picked from commit 46c2e35c55)
2023-11-27 17:10:50 +01:00
moritz-h
c754de5deb Win32: Add library name suffix to pkg-config file
Closes #2386

This was adapted to 3.3-stable from
93a3ba8080.
2023-11-27 17:01:35 +01:00
Andy Williams
bf429fb628 Fix macOS Print Screen
Many years ago this value was changed from F13 to Print Screen with
1ae9ce1e0a.  However, this was later
reverted to F13 with 5759d0fdf2.

This changes it back to Print Screen for consistency with other
platforms.

Closes #1786
Fixes #2169

(cherry picked from commit c940695eb0)
2023-11-16 22:50:41 +01:00
Camilla Löwy
8da6223c90 Wayland: Cleanup
Update naming and declarations to current standard.

(cherry picked from commit 3eaf1255b2)
2023-07-19 17:51:56 +02:00
Camilla Löwy
c3f15da23a Wayland: Merge function called once
This brings together the two halves of the cursor setting logic for the
fallback decorations.

(cherry picked from commit 6b48f2be97)
2023-07-19 17:51:53 +02:00
Camilla Löwy
1d766c8b39 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.

(cherry picked from commit 00a663dafd)
2023-07-19 17:50:49 +02:00
TheBrokenRail
67d722788d Wayland: Fix detection of joysticks after init
Closes #2198

This was adapted to 3.3-stable from
0b94e1b29b and
3fa2360720.
2023-07-19 17:48:46 +02:00
Camilla Löwy
06a2ed38ea Fix glfwinfo output of Vulkan layer spec version
(cherry picked from commit f27daa34ad)
2023-07-19 17:44:21 +02:00
Camilla Löwy
0c2db4a23e Wayland: Add initial support for libdecor
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 #1639
Closes #1693
Related to #1725

This was adapted to 3.3-stable from
fbdb53b9ca.
2023-07-19 17:23:25 +02:00
Camilla Löwy
1ad5df8032 Wayland: Simplify decoration side detection
This commit simplifies the detection of which element of a fallback
decorated window the pointer has entered.  Instead of looping through
the list of windows, the user pointer of fallback decoration surfaces is
set to the GLFW window object.

(cherry picked from commit cd466cf9fd)
2023-03-28 17:46:41 +02:00
Camilla Löwy
95b35c43c2 Wayland: Clean up enum value names
(cherry picked from commit 39f0e86228)
2023-03-28 17:44:56 +02:00
Camilla Löwy
e5d19c9fac Wayland: Simplify per-window ouput scales tracking
This replaces (one case of) manual management of weak links between
windows and monitors, both objects with complex life times, with
wl_object pointers used as opaque key values.

(cherry picked from commit efa9297a41)
2023-03-28 17:43:39 +02:00
Camilla Löwy
5ac970120a Wayland: Use tags to verify proxy ownership
This is in preparation for adding support for libdecor, which creates
its own proxies on our display.  It will likely also be helpful to some
people using native access on Wayland.

This is partly based on the implementation of libdecor support in
PR #1693 by @ christianrauch.

(cherry picked from commit 91c837ace5)
2023-03-28 17:38:33 +02:00
Camilla Löwy
677fbb0f82 Wayland: Remove duplicate setting of user data
The surface user data is already set by wl_surface_add_listener.

(cherry picked from commit 6d9083af03)
2023-03-28 17:36:29 +02:00
Camilla Löwy
a29b5f38c6 Wayland: Stop manually tracking interface versions
This is already tracked by the proxies we care about.

(cherry picked from commit 4cf510511c)
2023-03-28 17:36:22 +02:00
Camilla Löwy
1de73c0dc5 Wayland: Emit size event when setting aspect ratio
(cherry picked from commit c1a79c1c41)
2023-03-28 17:36:18 +02:00
Camilla Löwy
a6e3efbafc Wayland: Fix some missing window refresh events
(cherry picked from commit 8397b39afa)
2023-03-28 17:36:13 +02:00
Camilla Löwy
ba99e20f6a Wayland: Fix decorations not always being created
If a window was initially fullscreen then it would not get an XDG
decoration object.  If the window was later switched to windowed mode it
would then get fallback decorations instead of XDG ones.

(cherry picked from commit 735fc101f5)
2023-03-28 17:36:09 +02:00
Camilla Löwy
8522447792 Wayland: Simplify test for fallback decorations
The GLFW fallback decorations only exist when the window is visible,
decorated and in windowed mode.

(cherry picked from commit 228428fa4f)
2023-03-28 17:36:05 +02:00
Camilla Löwy
ba80e23dab Wayland: Pick more plausible default cursor size
This is not intended as a replacement for actually querying the desktop
for the correct size, but it appears to be a better fallback value.

(cherry picked from commit 82e77dbff4)
2023-03-28 17:36:01 +02:00
Juan Ramos
2178c3e536 Update to actions/checkout@v3
Fixes the following CI warning:

"Node.js 12 actions are deprecated. Please update the following
actions to use Node.js 16: actions/checkout@v2..."

Closes #2255

(cherry picked from commit 9a87635686)
2023-03-28 17:35:56 +02:00
Juan Ramos
1b4e126dc0 Remove CMAKE_LEGACY_CYGWIN_WIN32 CMake option
This was needed for compatibility with CMake versions before 2.8.4.

Related to #2256

(cherry picked from commit 30b91c8b60)
2023-03-28 17:27:25 +02:00
Camilla Löwy
71dfc3f65c Add support for manually running build workflow
(cherry picked from commit 8f470597d6)
2023-03-28 17:26:31 +02:00
Camilla Löwy
4a33051456 Update change log and add credit
Related to #2225

This was adapted to 3.3-stable from
57cbded076.
2023-01-07 23:45:04 +01:00
Takuro Ashie
b06a91e92b Wayland: Fix wrong array size for _GLFWofferWayland
Closes #2225

(cherry picked from commit 41d8da1cea)
2023-01-07 23:13:16 +01:00
Camilla Löwy
c7a5333873 Add window surface creation to glfwinfo
The glfwinfo tool now attempts Vulkan surface creation via
glfwCreateWindowSurface and reports the results.

(cherry picked from commit 0beadfdc66)
2022-11-23 21:42:56 +01:00
Camilla Löwy
05e28537a3 Remove Doxyfile tags deprecated by Doxygen 1.9.5
(cherry picked from commit d299d9f788)
2022-10-31 22:16:33 +01:00
Camilla Löwy
af3e14fbc2 Document X11 WM_CLASS hint behavior
Fixes #2180

(cherry picked from commit ed1d9e1ca7)
2022-10-31 22:13:27 +01:00
Camilla Löwy
d36d062d72 Win32: Remove unhelpful helper function
(cherry picked from commit ab3ea8ac9f)
2022-10-31 22:13:01 +01:00
Camilla Löwy
493df4a0b5 EGL: Cleanup
Both config parameters are "desired", but one is older and never had its
name updated.

This commit at least makes it clearer that they are similar.

(cherry picked from commit ab1b1edfd0)
2022-10-31 22:05:22 +01:00
Camilla Löwy
31b038663a EGL: Add better error for no stereo
(cherry picked from commit 93e93135f2)
2022-10-31 22:04:00 +01:00
Camilla Löwy
6fb86c089e EGL: Add better errors for client API mismatch
Because EGL ties client API support to configs, attempts to create
a context with an unavailable client API will fail with the unhelpful
"failed to find suitable config" error description.

This attempts to detect cases where there are usable configs for the
other client API and emit a hopefully more helpful error.

Related to #2173

(cherry picked from commit e057666642)
2022-10-31 22:03:56 +01:00
Camilla Löwy
bc36010350 Check if context creation APIs match when sharing
(cherry picked from commit 6b57e08bb0)
2022-10-31 22:03:47 +01:00
Camilla Löwy
bd13f55ca8 WGL: Fix count of displayable pixel formats
We only care about displayable pixel formats (as defined in
WGL_ARB_pixel_format) for window context creation.

This changes pixel format enumeration to ignore non-displayable formats,
which are specified to be listed after displayable ones, by always using
the return value of DescribePixelFormat as the pixel format count.

(cherry picked from commit 2c0f34b60f)
2022-10-31 22:03:35 +01:00
Camilla Löwy
8b4f1ebbea Wayland: Fix window opacity on older systems
On systems lacking the EGL_EXT_present_opaque extension, some
compositors treat any buffer with an alpha channel as per-pixel
transparent.

This commit ignores any EGLConfig with an alpha channel if the extension
is missing and the window is created with GLFW_TRANSPARENT_FRAMEBUFFER
set to false.

This is technically not a breaking change since GLFW_ALPHA_BITS is not
a hard constraint, but it is still going to inconvenience anyone using
the framebuffer alpa channel to store other kinds of data.

Related to #1895

(cherry picked from commit ef6c9d8b4f)
2022-10-31 22:02:06 +01:00
Camilla Löwy
1f675ab62f GLX: Add support for loading glvnd libGLX
(cherry picked from commit c18851f52e)
2022-10-31 21:57:21 +01:00
Camilla Löwy
ed55529ce8 EGL: Add support for loading glvnd libOpenGL
(cherry picked from commit 55aad3c37b)
2022-10-31 21:48:45 +01:00
Camilla Löwy
426c6ed6b1 X11: Preserve unrelated values in WM_NORMAL_HINTS
This stops GLFW overwriting the whole WM_NORMAL_HINTS property every
time it updates size-related parts of it.

(cherry picked from commit 7d73629e50)
2022-10-31 21:48:04 +01:00
Camilla Löwy
1fe29e2c19 Fix native access macros being mutually exclusive
The documentation was updated with the introduction of run-time platform
selection, but the preprocessor logic was not.

(cherry picked from commit 2efc598d70)
2022-10-31 21:47:57 +01:00
TheChocolateOre
34bfb52641 Fix typos and other issues in docs
This fixes spelling, grammar and punctuation issues, missing words and
stray words across the documentation.  A confusing sentence was removed
from the tutorial.

Closes #2085

(cherry picked from commit 2e12ef00bb)
2022-10-31 21:47:01 +01:00
Camilla Löwy
3670cd0561 Wayland: Remove unreachable code
This platform function is only called if the cursor is enabled.

(cherry picked from commit 3a5c726d1b)
2022-10-31 21:34:38 +01:00
Camilla Löwy
0ee9b7281b Wayland: Clean up pointer helper function order
(cherry picked from commit 7be6a2cabe)
2022-10-31 21:34:33 +01:00
Camilla Löwy
5f3e5542cf Refactor cursor mode paths
This is the refactoring part of adding GLFW_CURSOR_CAPTURED, separated
out to help keep 3.3-stable similar to the main branch.

Related to #58.

(cherry picked from commit a46f829de8)
2022-10-31 21:29:42 +01:00
Camilla Löwy
632d35e0d4 Wayland: Fix leaks of pointer related objects
(cherry picked from commit 03af6b3d4c)
2022-10-31 21:19:15 +01:00
Camilla Löwy
5189d52ae3 Wayland: Clean up pointer locking
Shorten names and allow C99 declarations.  Replace helper function with
the NULL check it was hiding.  Separate cursor hiding from pointer
locking.

(cherry picked from commit e85b645b8a)
2022-10-31 21:18:12 +01:00