Closed DavidHusicka closed 4 months ago
When a mouse button is pressed, the event loop sends "Pressed, Pressed, Released, Released" events on the Linux platform. Sometimes it sends even more than just one duplicit event. This may cause unwanted multi-click in some applications.
To reproduce:
use tao::{ event::{Event, WindowEvent}, event_loop::{ControlFlow, EventLoop}, window::WindowBuilder, }; fn main() { let event_loop = EventLoop::new(); let window = WindowBuilder::new().build(&event_loop).unwrap(); event_loop.run(move |event, _, control_flow| { *control_flow = ControlFlow::Wait; match event { Event::WindowEvent { event: WindowEvent::CloseRequested, .. } => { println!("The close button was pressed; stopping"); *control_flow = ControlFlow::Exit } Event::MainEventsCleared => { window.request_redraw(); } Event::WindowEvent { window_id, event, .. } => { let WindowEvent::MouseInput { .. } = event else { return; }; dbg!(&window_id); dbg!(&event); } _ => (), } }); }
Expected behavior is receiving only one "Pressed" and one "Released" event to match the other platforms.
Platform and Versions: OS: Linux Rustc: cargo 1.81.0-nightly (4dcbca118 2024-06-11) Tao version: 0.28.1
When a mouse button is pressed, the event loop sends "Pressed, Pressed, Released, Released" events on the Linux platform. Sometimes it sends even more than just one duplicit event. This may cause unwanted multi-click in some applications.
To reproduce:
Expected behavior is receiving only one "Pressed" and one "Released" event to match the other platforms.
Platform and Versions: OS: Linux Rustc: cargo 1.81.0-nightly (4dcbca118 2024-06-11) Tao version: 0.28.1