mirror of
https://github.com/glfw/glfw.git
synced 2025-01-19 06:25:54 +00:00
parent
ce2ec035f4
commit
cc752ad6a0
@ -89,6 +89,7 @@ GLFW bundles a number of dependencies in the `deps/` directory.
|
|||||||
full screen windows
|
full screen windows
|
||||||
- [X11] Bugfix: `GLFW_ARROW_CURSOR` selected the wrong cursor image
|
- [X11] Bugfix: `GLFW_ARROW_CURSOR` selected the wrong cursor image
|
||||||
- [X11] Bugfix: The `GLFW_DECORATED` hint was not ignored for full screen
|
- [X11] Bugfix: The `GLFW_DECORATED` hint was not ignored for full screen
|
||||||
|
- [X11] Bugfix: `glfwWaitEvents` did not handle `EINTR` for `select`
|
||||||
- [WGL] Made all WGL functions dynamically loaded
|
- [WGL] Made all WGL functions dynamically loaded
|
||||||
- [WGL] Removed `GLFW_USE_DWM_SWAP_INTERVAL` compile-time option
|
- [WGL] Removed `GLFW_USE_DWM_SWAP_INTERVAL` compile-time option
|
||||||
- [WGL] Bugfix: Swap interval was ignored when DWM was enabled
|
- [WGL] Bugfix: Swap interval was ignored when DWM was enabled
|
||||||
@ -163,6 +164,7 @@ skills.
|
|||||||
- Robin Leffmann
|
- Robin Leffmann
|
||||||
- Glenn Lewis
|
- Glenn Lewis
|
||||||
- Shane Liesegang
|
- Shane Liesegang
|
||||||
|
- Eyal Lotem
|
||||||
- Дмитри Малышев
|
- Дмитри Малышев
|
||||||
- Martins Mozeiko
|
- Martins Mozeiko
|
||||||
- Tristam MacDonald
|
- Tristam MacDonald
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
// Action for EWMH client messages
|
// Action for EWMH client messages
|
||||||
#define _NET_WM_STATE_REMOVE 0
|
#define _NET_WM_STATE_REMOVE 0
|
||||||
@ -63,15 +64,23 @@ typedef struct
|
|||||||
void selectDisplayConnection(struct timeval* timeout)
|
void selectDisplayConnection(struct timeval* timeout)
|
||||||
{
|
{
|
||||||
fd_set fds;
|
fd_set fds;
|
||||||
|
int result;
|
||||||
const int fd = ConnectionNumber(_glfw.x11.display);
|
const int fd = ConnectionNumber(_glfw.x11.display);
|
||||||
|
|
||||||
FD_ZERO(&fds);
|
FD_ZERO(&fds);
|
||||||
FD_SET(fd, &fds);
|
FD_SET(fd, &fds);
|
||||||
|
|
||||||
// select(1) is used instead of an X function like XNextEvent, as the
|
// NOTE: We use select instead of an X function like XNextEvent, as the
|
||||||
// wait inside those are guarded by the mutex protecting the display
|
// wait inside those are guarded by the mutex protecting the display
|
||||||
// struct, locking out other threads from using X (including GLX)
|
// struct, locking out other threads from using X (including GLX)
|
||||||
select(fd + 1, &fds, NULL, NULL, timeout);
|
// NOTE: Only retry on EINTR if there is no timeout, as select is not
|
||||||
|
// required to update it for the time elapsed
|
||||||
|
// TODO: Update timeout value manually
|
||||||
|
do
|
||||||
|
{
|
||||||
|
result = select(fd + 1, &fds, NULL, NULL, timeout);
|
||||||
|
}
|
||||||
|
while (result == -1 && errno == EINTR && timeout == NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns whether the window is iconified
|
// Returns whether the window is iconified
|
||||||
|
Loading…
Reference in New Issue
Block a user