diff --git a/vendor/winit/README.ink-notes.md b/vendor/winit/README.ink-notes.md index f002643..0ffaf53 100644 --- a/vendor/winit/README.ink-notes.md +++ b/vendor/winit/README.ink-notes.md @@ -18,6 +18,10 @@ docs of the original crate were removed. timestamp of each touch event (Started, Moved, Ended), so ink-notes measures the swipe speed for gliding with the real event times and not with the time it got around to handling them (Issue #28). +- `src/platform_impl/linux/wayland/event_loop/mod.rs`: every read from the Wayland socket wakes + the app (`AboutToWait`), also when the events belong to another queue on the same connection. + octotablet's pen events live on such a queue and only `dispatch_pending` it, so before, pen + strokes waited until something else woke the loop (Issue #53). - `Cargo.toml`: `[lints.rust] warnings = "allow"`, because a path dependency is not built with capped lints like a crates.io dependency. diff --git a/vendor/winit/src/platform_impl/linux/wayland/event_loop/mod.rs b/vendor/winit/src/platform_impl/linux/wayland/event_loop/mod.rs index 6a42547..eaafc12 100644 --- a/vendor/winit/src/platform_impl/linux/wayland/event_loop/mod.rs +++ b/vendor/winit/src/platform_impl/linux/wayland/event_loop/mod.rs @@ -105,10 +105,11 @@ impl EventLoop { let wayland_dispatcher = calloop::Dispatcher::new(wayland_source, |_, queue, winit_state: &mut WinitState| { let result = queue.dispatch_pending(winit_state); - if result.is_ok() - && (!winit_state.events_sink.is_empty() - || !winit_state.window_compositor_updates.is_empty()) - { + // ink-notes patch: wake the app for every read from the socket, not only for + // winit's own events. Events for other queues on the same connection (pen + // input from octotablet's queue) would otherwise wait until something else + // wakes the loop, so pen strokes appeared late or not at all (Issue #53). + if result.is_ok() { winit_state.dispatched_events = true; } result