[client] displayserver: support external event sources

Allow display servers to dispatch a caller-owned event source on their
native event thread. This lets background input readers marshal events
to the thread that owns application and display-server state.

Poll X11 fairly when native events remain continuously available, and
use bounded polling if the external descriptor cannot be registered.
This commit is contained in:
Geoffrey McRae
2026-08-21 05:43:11 +10:00
parent 71733433ed
commit 8b38546049
5 changed files with 89 additions and 26 deletions

View File

@@ -101,10 +101,11 @@ struct X11DSState
int xValuator;
int yValuator;
X11Input input;
LG_Lock pointerLock;
_Atomic(bool) captureActive;
bool fullscreen;
X11Input input;
LG_DSEventSource eventSource;
LG_Lock pointerLock;
_Atomic(bool) captureActive;
bool fullscreen;
struct Rect rect;
struct Border border;