diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-01-03 20:02:12 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2020-01-03 20:02:12 +0000 |
| commit | 0ea0323d0fb3130e5bc1782812e70993e5cdb742 (patch) | |
| tree | 531d73f9eac77d385122c94a1879ae4b30af7cbd /scripts | |
| parent | selection: remove unneeded wayland display roundtrips (diff) | |
wayland: don't use wl_display_dispatch()
wl_display_dispatch() calls poll(), which is unnecessary since we
already know the FD is readable.
Use the more lower level wl_display_read_events() +
wl_display_dispatch_pending().
These require wl_display_prepare_read() to have been called.
The idea is to call wl_display_prepare_read() **before** calling
poll().
Thus, we do this more or less last in wayl_init(), and at the **end**
of the FDM handler.
However, having taking this lock also means we no longer can call
wl_display_roundtrip() directly (it will hang).
So, add a wrapper, wayl_roundtrip(), that cancels the read intent,
does the roundtrip, and then re-acquires the read intent.
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions
