1
1
mirror of https://github.com/wez/wezterm.git synced 2024-09-11 14:25:57 +03:00

Fix pointer todos

This commit is contained in:
V 2024-04-08 04:35:27 +02:00 committed by Wez Furlong
parent 42e47ad920
commit a7b122a2e1
No known key found for this signature in database
GPG Key ID: 7A7F66A31EC9B387

View File

@ -1,5 +1,6 @@
use std::cell::RefCell; use std::cell::RefCell;
use std::sync::{Arc, Mutex}; use std::sync::{Arc, Mutex};
use std::time::Duration;
use smithay_client_toolkit::compositor::SurfaceData; use smithay_client_toolkit::compositor::SurfaceData;
use smithay_client_toolkit::reexports::csd_frame::{DecorationsFrame, FrameClick}; use smithay_client_toolkit::reexports::csd_frame::{DecorationsFrame, FrameClick};
@ -220,17 +221,23 @@ impl WaylandState {
match evt.kind { match evt.kind {
PointerEventKind::Enter { .. } => { PointerEventKind::Enter { .. } => {
inner inner.window_frame.click_point_moved(
.window_frame Duration::ZERO,
.click_point_moved(todo!(), &evt.surface.id(), x, y); &evt.surface.id(),
x,
y,
);
} }
PointerEventKind::Leave { .. } => { PointerEventKind::Leave { .. } => {
inner.window_frame.click_point_left(); inner.window_frame.click_point_left();
} }
PointerEventKind::Motion { .. } => { PointerEventKind::Motion { .. } => {
inner inner.window_frame.click_point_moved(
.window_frame Duration::ZERO,
.click_point_moved(todo!(), &evt.surface.id(), x, y); &evt.surface.id(),
x,
y,
);
} }
PointerEventKind::Press { button, serial, .. } PointerEventKind::Press { button, serial, .. }
| PointerEventKind::Release { button, serial, .. } => { | PointerEventKind::Release { button, serial, .. } => {
@ -244,7 +251,9 @@ impl WaylandState {
0x111 => FrameClick::Alternate, 0x111 => FrameClick::Alternate,
_ => continue, _ => 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); inner.frame_action(pointer, serial, action);
} }
} }