diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-01-04 22:33:50 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2020-01-04 22:33:50 +0000 |
| commit | 11d381f0c3b9a76868b979a7ef7fceb27a64f7b1 (patch) | |
| tree | 0adfcc808c72986a2554f37f589da0a3a82ae80d | |
| parent | wayland: only call wl_display_prepare_read() if we read any events (diff) | |
wayland: add comment
| -rw-r--r-- | wayland.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -1045,6 +1045,10 @@ wayl_roundtrip(struct wayland *wayl) wl_display_cancel_read(wayl->display); wl_display_roundtrip(wayl->display); + /* I suspect the roundtrip above clears the pending queue, and + * that prepare_read() will always succeed in the first call. But, + * better safe than sorry... */ + while (wl_display_prepare_read(wayl->display) != 0) wl_display_dispatch_pending(wayl->display); wayl_flush(wayl); |
