1
0
Fork 0
forked from wry/wry

config: make ui dragging configurable

This commit is contained in:
Julian Orth 2024-10-01 11:18:25 +02:00
parent 1dd20fb87b
commit d8ee1ac19c
19 changed files with 255 additions and 12 deletions

View file

@ -586,10 +586,7 @@ impl ContainerNode {
match op.kind {
SeatOpKind::Move => {
if let CursorType::Seat(_) = id {
const DRAG_DIST: i32 = 10;
let dx = x - op.x;
let dy = y - op.y;
if dx * dx + dy * dy > DRAG_DIST * DRAG_DIST {
if self.state.ui_drag_threshold_reached((x, y), (op.x, op.y)) {
let node = op.child.node.clone();
drop(seats);
seat.start_tile_drag(&node);