From a7b122a2e18580ebb8f3e458c935a1fe40b892c3 Mon Sep 17 00:00:00 2001 From: V Date: Mon, 8 Apr 2024 04:35:27 +0200 Subject: [PATCH] Fix pointer todos --- window/src/os/wayland/pointer.rs | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/window/src/os/wayland/pointer.rs b/window/src/os/wayland/pointer.rs index ebc349f80..3436d17f4 100644 --- a/window/src/os/wayland/pointer.rs +++ b/window/src/os/wayland/pointer.rs @@ -1,5 +1,6 @@ use std::cell::RefCell; use std::sync::{Arc, Mutex}; +use std::time::Duration; use smithay_client_toolkit::compositor::SurfaceData; use smithay_client_toolkit::reexports::csd_frame::{DecorationsFrame, FrameClick}; @@ -220,17 +221,23 @@ impl WaylandState { match evt.kind { PointerEventKind::Enter { .. } => { - inner - .window_frame - .click_point_moved(todo!(), &evt.surface.id(), x, y); + inner.window_frame.click_point_moved( + Duration::ZERO, + &evt.surface.id(), + x, + y, + ); } PointerEventKind::Leave { .. } => { inner.window_frame.click_point_left(); } PointerEventKind::Motion { .. } => { - inner - .window_frame - .click_point_moved(todo!(), &evt.surface.id(), x, y); + inner.window_frame.click_point_moved( + Duration::ZERO, + &evt.surface.id(), + x, + y, + ); } PointerEventKind::Press { button, serial, .. } | PointerEventKind::Release { button, serial, .. } => { @@ -244,7 +251,9 @@ impl WaylandState { 0x111 => FrameClick::Alternate, _ => continue, }; - if let Some(action) = inner.window_frame.on_click(todo!(), click, pressed) { + if let Some(action) = + inner.window_frame.on_click(Duration::ZERO, click, pressed) + { inner.frame_action(pointer, serial, action); } }