Refactor linux backend event loops

Allow waiting for events on an arbitrary number of fds. Needed
for async DBUS integration.
This commit is contained in:
Kovid Goyal
2018-07-09 13:28:51 +05:30
parent 3a4b614ae0
commit e91eb27e56
10 changed files with 161 additions and 70 deletions

6
glfw/x11_platform.h vendored
View File

@@ -53,6 +53,7 @@
// The libxkb library is used for improved keyboard support
#include "xkb_glfw.h"
#include "backend_utils.h"
typedef XRRCrtcGamma* (* PFN_XRRAllocGamma)(int);
typedef void (* PFN_XRRFreeCrtcInfo)(XRRCrtcInfo*);
@@ -383,10 +384,7 @@ typedef struct _GLFWlibraryX11
PFN_XRenderFindVisualFormat FindVisualFormat;
} xrender;
struct {
struct pollfd fds[3];
int wakeupFds[2];
} eventLoopData;
EventLoopData eventLoopData;
} _GLFWlibraryX11;