Commit Graph

63 Commits

Author SHA1 Message Date
Camilla Löwy
1461c59aa2 Update changelog and add credit
Related to #1951
2022-03-10 20:04:56 +01:00
Camilla Löwy
cd22e28495 X11: Fix empty event race condition with a pipe
There is a seemingly unavoidable race condition when waiting for data on
the X11 display connection, as long as any other thread is also making
Xlib calls.  The event data we are waiting for could be read by the
other thread as part of looking for the reply to its request, before our
poll has begun.

This commit replaces the X11 event sent by glfwPostEmptyEvent with
writing to an unnamed pipe.  The race condition remains if other Xlib
calls are made on other threads, but glfwPostEmptyEvent should now be
race-free.

This commit is based on work by pcwalton, OlivierSohn, kovidgoyal and
joaodasilva.

Closes #2033
Related to #379
Related to #1281
Related to #1285
2022-03-03 22:16:59 +01:00
Camilla Löwy
d3e4fcf8b7 X11: Fix event polling when event fd > 1023
This replaces select with poll for checking for data on event file
descriptors, as select cannot handle file descriptors larger than 1023.

Closes #2024
2022-03-02 19:38:41 +01:00
Camilla Löwy
ad01c1b614 Win32: Fix key name code changing global key state
This prevents glfwInit from potentially clobbering the dead key state
for other applications.

Closes #2018
2022-03-02 19:38:41 +01:00
Camilla Löwy
7f6aa587f8 Cocoa: Fix deprecation warning for kUTTypeURL
We switched to kUTTypeURL when NSURLPboardType was deprecated, as the
official replacement symbol NSPasteboardTypeURL was not available on
every version of macOS supported by GLFW.

kUTTypeURL has now also been deprecated.

This commit moves to a compile-time choice between NSURLPboardType and
NSPasteboardTypeURL depending on the minimum targeted macOS version.

Fixes #2003
2022-02-02 19:20:32 +01:00
Jason Francis
094aa6d3c7 Wayland: Fix window hiding
Corrects the protocol violation when creating an xdg_surface from a
wl_surface that already has a buffer due to EGL buffer swaps.

This commit is based on PR #1731 by @ghost, but adapted and altered:
 - The XDG surface and role are now only created when a window is shown
   to prevent application lists from showing command-line applications
   with off-screen-only windows
 - The special case of Wayland+EGL buffer swap is now in the EGL code
   to mirror how X11 is handled
 - Adaption to run-time platform selection and separate credits file

Fixes #1492
Closes #1731
2021-12-24 00:55:31 +01:00
Camilla Löwy
fbfd7e65c8 Win32: Fix bad content scale on monitor disconnect
The monitor handle could have become invalid just before the call to
GetDpiForMonitor.  It was possible for both window and monitor content
scale queries.

This ensures both that an appropriate error is emitted and that the
retrieved values are zero on error.

Fixes #1615
2021-12-01 21:13:00 +01:00
Camilla Löwy
e40fa3bb94 Add credits and update changelog 2021-12-01 20:23:04 +01:00
Camilla Löwy
a30cd6acef Add credit
Related to #1998
2021-11-25 23:24:39 +01:00
Camilla Löwy
b55a517ae0 Add credit
Related to #1994
2021-11-22 21:32:34 +01:00
Camilla Löwy
999962bd2f Update changelog and add credit
Related to #1980
2021-10-27 23:14:19 +02:00
Camilla Löwy
76a5f781db Add glfwInitVulkanLoader
This removes the GLFW_VULKAN_STATIC CMake option and the
_GLFW_VULKAN_STATIC configuration macro and replaces them with the
glfwInitVulkanLoader function, allowing a single library binary to
provide both behaviors.

This is based on the design from PR #1374 by @pmuetschard.

Closes #1374
Closes #1890
2021-10-27 18:22:05 +02:00
Camilla Löwy
53d7622a3a Move list of contributors to separate file
Fixes #1839
2021-10-27 18:19:38 +02:00