1
0
mirror of https://github.com/glfw/glfw.git synced 2025-04-07 09:22:02 +00:00
Commit Graph

69 Commits

Author SHA1 Message Date
Camilla Löwy
228e58262e EGL: Allow native access with defaults on Wayland
The intent of enforcing GLFW_EGL_CONTEXT_API for EGL native access
functions was to ensure that the application had requested the same
context creation API at window creation time that it then attempted
native access for.

With the 3.4 ABI this both isn't true anymore, as a single binary may
have multiple meanings of GLFW_NATIVE_CONTEXT_API, and is no longer
necessary, since glfwGetPlatform provides enough information to
disambiguate even without knowing what GLFW_PLATFORM was set to.

This all leaves the requirement that the context creation API be
GLFW_EGL_CONTEXT_API as just an unnecessary annoyance.

Fixes 
2024-03-29 13:18:31 +01:00
Camilla Löwy
3573c5a890 Wayland: Fix segfault when there is no seat
Bug encountered running on a headless instance of Weston.

Fixes 
2024-03-29 13:17:06 +01:00
Camilla Löwy
d7e7b164bc Add credit
Related to 
2024-02-21 00:17:32 +01:00
Doug Binks
1fb7f0e120 Cocoa: Added glfwGetCocoaView native access function
Resolves 

Co-authored-by: mightgoyardstill <mightgoyardstill@users.noreply.github.com>
2024-02-20 13:20:30 +00:00
Camilla Löwy
559bd3adb9 Add credit
Related to 
2024-02-19 14:44:02 +01:00
Camilla Löwy
dbf7cfc4dc Update credit
Related to 
2024-02-19 14:21:55 +01:00
Doug Binks
95d464bb4b Add glfwGetWindowTitle
This adds a function for querying the current title of a window.  This
currently returns a copy of the last title set via GLFW.

Fixes 
Closes 
Closes 
2024-02-19 14:20:52 +01:00
Camilla Löwy
f0ec791386 X11: Cleanup
The actual reported bug was fixed at some point during the refactoring
of the Wayland backend.  This is only a bit of tidying.  Updating the
cache before emitting events is always a nice thing to do.

Closes 
2024-02-16 12:34:03 +01:00
Camilla Löwy
b61f3fc479 Wayland: Fix invalid size protocol error
This could happen when resizing a window with fallback decorations.

Fixes 
2024-02-16 00:13:32 +01:00
Camilla Löwy
30127690a2 Add credit
Related to 
2024-02-12 15:59:11 +01:00
Camilla Löwy
6565c0cc04 Update changelog and add credit
Related to 
2024-02-12 13:06:59 +01:00
Camilla Löwy
00e86d4b73 WGL: Fix pixel format count in a Parallels VM
In a Parallels VM wglGetPixelFormatAttribivARB returns fewer pixel
formats than DescribePixelFormat.  This broke context creation on
Windows in Parallels since the changes in
2c0f34b60f.  The previous version of the
code worked accidentally.

This adds a workaround by iterating through the minimum of both counts.
It should have no effect when running on conforming implementations.

Tested on Parallels by @ dougbinks.

Closes 
Fixes 
Fixes 
2024-01-30 20:22:10 +01:00
Jan Schürkamp
9317970243 Wayland: Implement glfwRequestWindowAttention
This implements window attention requests via the xdg-activation-v1
protocol.

This was updated by @ elmindreda to work with recent Wayland related
 changes to the main branch:
 - Switched to current way of handling Wayland protocol files
 - Added the xdg-activation-v1.xml protocol file to deps/wayland
 - Added missing macros to rename protocol interface globals

The protocol file was copied from wayland-protocols 1.33.

Closes 
2024-01-30 20:20:42 +01:00
Doug Binks
7321b56cad
Reorder credit 2024-01-28 17:18:11 +00:00
Hilderin
c8521b7fda
Win 32: Fix disabled cursor mode when connected over RDP
Fixes 
Based on PR  by @Pokechu22

Co-authored-by: Pokechu22 <8334194+Pokechu22@users.noreply.github.com>
2024-01-28 17:08:27 +00:00
Camilla Löwy
ab09dc8fb1 Add credit
I lost track of the existing PR  when fixing  with
5e4496cb42.

Closes 
2023-12-26 14:47:51 +01:00
Camilla Löwy
2c1d31009f Cocoa: Fix segfault querying joystick elements
It is reportedly possible for IOHIDDeviceCopyMatchingElements to return
NULL on macOS 13 if the application lacks input monitoring permissions.

This commit only prevents the segfault.  More work will be needed to
correctly handle this situation, including Game Controller support.

Related to 
Closes 
2023-12-12 18:36:14 +01:00
Camilla Löwy
ea3ea62708 Update changelog and add credit
Related to 
2023-12-12 13:47:37 +01:00
Camilla Löwy
7b152019da Add credit
Related to 
Related to 
2023-12-11 21:28:48 +01:00
Camilla Löwy
46cebb5081 EGL: Only use EGL_EXT_present_opaque on Wayland
The EGL_EXT_present_opaque extension is primarily a workaround meant for
Wayland, even if the language in it doesn't mention this.  GLFW
previously always enabled this extension where supported.  This caused
issues on X11 when running the Nvidia binary blob.

This commit ensures the extension is only enabled on Wayland.

Fixes 
2023-12-07 16:51:13 +01:00
Camilla Löwy
68edc66aa4 Add credit
Fixes 
2023-12-07 16:01:47 +01:00
Camilla Löwy
ddd92a4fa8 Update changelog and add credit
Related to 
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  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 
2023-12-06 18:34:12 +01: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
Camilla Löwy
afd22ebcf3 Add credit
Related to 
2023-11-21 21:26:45 +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 
2023-11-21 17:40:43 +01:00
Camilla Löwy
a87acd8c1f Update changelog and add credit
Related to 
2023-11-16 23:08:50 +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 
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  and 
2023-11-15 16:48:19 +01:00
Camilla Löwy
2b580012da Add credit
Related to 
2023-03-03 14:46:43 +01:00
Camilla Löwy
9b1f63bad9 Add credit
Closes 
2023-03-02 17:47:36 +01:00
Camilla Löwy
57cbded076 Add credit
Related to 
2022-12-16 13:44:59 +01:00
Camilla Löwy
b2b087cd8e Fix documented errors for gamma ramp functions
Fixes 
2022-09-20 17:02:51 +02:00
Camilla Löwy
ed1d9e1ca7 Document X11 WM_CLASS hint behavior
Fixes 
2022-09-15 22:25:10 +02:00
Camilla Löwy
c812b9d87c Add conditional compilation for platform units
This is a step towards being able to compile GLFW manually without
needing to duplicate a lot of platform- or OS-specific logic.
2022-09-15 22:24:39 +02:00
Camilla Löwy
ef6c9d8b4f 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 
2022-08-01 19:19:51 +02:00
Michael Pennington
b9ed25d2e9 Wayland: Add GLFW_WAYLAND_APP_ID window hint
This adds a window hint string for the xdg_toplevel::app_id, which is
used by desktop environments to connect windows with application icons
and other information.  This is similar to the WM_CLASS property on X11.

A few very minor fixes were done by @elmindreda during merge.

Fixes 
Closes 
2022-07-24 17:51:54 +02:00
Camilla Löwy
71be34a6c3 Wayland: Fix crash if mouse connected after init
The cursor theme was only loaded if the chosen seat had a mouse
(wl_pointer) during initialization.  If a mouse was connected only after
glfwInit, there would be no cursor theme but the rest of the cursor
related code assumed one had already been loaded.

This also moves the details of cursor theme loading out into a separate
function to declutter platform init.

Because the original cursor theme loading code checked whether we got
a wl_shm, and because the rest of the code just assumes we have
a wl_shm, initialization will now fail if there isn't one.

Fixes 
2022-07-15 16:17:12 +02:00
Camilla Löwy
91a96ed434 Update changelog and add credit
Related to 
Related to 
2022-07-15 16:17:12 +02:00
Camilla Löwy
6dd526fb1a Win32: Fix right Shift scancode when using CJK IME
Fixes 
2022-07-11 20:54:22 +02:00
Camilla Löwy
8e725338bf Add credit
Related to 
2022-07-11 20:54:03 +02:00
Camilla Löwy
dfb26023fc Update changelog and add credit
Related to 
Related to 
2022-07-07 23:48:42 +02:00
Camilla Löwy
0d599026d0 Cocoa: Fix clearing of unrelated window style bits
Whenever GLFW changed the window style mask, a new mask was created
from scratch based on the attributes set on the GLFW window object.
This caused us to potentially clear unrelated window style bits.

This was always wrong but became a critical issue when Cocoa began
throwing an exception if an application cleared the
NSWindowStyleMaskFullScreen while the window is in macOS fullscreen.

This commit reworks all style mask editing so it only changes the
relevant bits, preserving all others.

This is only a narrow bug fix to prevent crashes, intended for the
stable branch.  Our interaction with macOS fullscreen is still very
poor.  The next step after this is a set of patches that improve the
interaction between the current API and macOS fullscreen.

Fixes 
Fixes 
2022-07-07 23:47:48 +02:00
Camilla Löwy
0f5b095042 Wayland: Fix erratic fallback decoration behavior
The handler for xdg_toplevel::configure treated the provided size as the
content area size when instead it is the size of the bounding rectangle
of the wl_surface and all its subsurfaces.

This caused the fallback decorations to try positioning themselves
outside themselves, causing feedback loops during interactive resizing.

Fixes 
Fixes 
Closes 
Related to 
2022-06-20 00:57:17 +02:00
Camilla Löwy
ddd087d662 Wayland: Fix behavior of leaving full screen mode
These changes make GLFW fullscreen more consistent, but unfortunately
also make GLFW even more oblivious to user-initiated XDG shell
fullscreen changes.

Fixes 
2022-06-20 00:57:17 +02:00
Camilla Löwy
d3ede7b684 Add credit
Related to 
2022-06-10 00:14:05 +02:00
Camilla Löwy
2c204ab52e Fix joystick user pointer NULL during disconnect
The joystick code did not distinguish between the allocation status of
the GLFW joystick object and whether it is connection to an OS level
joystick object.

These are now tracked separately.

Fixes 
2022-06-08 22:14:38 +02:00
Camilla Löwy
f843d53333 Fix glfwMakeContextCurrent using uninitialized TLS
Issue reported by danhambleton on the GLFW forum:
https://discourse.glfw.org/t/posix-thread-local-storage-tls-error-when-making-context-current/2034
2022-04-21 15:56:01 +02:00