autocommit 2022-02-21 16:23:44 CET
This commit is contained in:
parent
9749f61018
commit
1cbc7a6445
8 changed files with 70 additions and 74 deletions
|
|
@ -149,11 +149,11 @@ impl PointerOwner for DefaultPointerOwner {
|
|||
if let Some(node) = found_tree.last() {
|
||||
node.node
|
||||
.clone()
|
||||
.motion(seat, x.apply_fract(node.x), y.apply_fract(node.y));
|
||||
.pointer_motion(seat, x.apply_fract(node.x), y.apply_fract(node.y));
|
||||
}
|
||||
} else {
|
||||
if let Some(last) = stack.last() {
|
||||
last.pointer_untarget(seat);
|
||||
last.pointer_unfocus(seat);
|
||||
}
|
||||
for old in stack.drain(divergence..).rev() {
|
||||
old.leave(seat);
|
||||
|
|
@ -163,19 +163,19 @@ impl PointerOwner for DefaultPointerOwner {
|
|||
if let Some(node) = found_tree.last() {
|
||||
node.node
|
||||
.clone()
|
||||
.motion(seat, x.apply_fract(node.x), y.apply_fract(node.y));
|
||||
.pointer_motion(seat, x.apply_fract(node.x), y.apply_fract(node.y));
|
||||
}
|
||||
} else {
|
||||
for new in found_tree.drain(divergence..) {
|
||||
new.node.seat_state().enter(seat);
|
||||
new.node
|
||||
.clone()
|
||||
.enter(seat, x.apply_fract(new.x), y.apply_fract(new.y));
|
||||
.pointer_enter(seat, x.apply_fract(new.x), y.apply_fract(new.y));
|
||||
stack.push(new.node);
|
||||
}
|
||||
}
|
||||
if let Some(node) = stack.last() {
|
||||
node.pointer_target(seat);
|
||||
node.pointer_focus(seat);
|
||||
}
|
||||
}
|
||||
found_tree.clear();
|
||||
|
|
@ -245,7 +245,7 @@ impl PointerOwner for GrabPointerOwner {
|
|||
let (x_int, y_int) = pos.translate(x.round_down(), y.round_down());
|
||||
self.node
|
||||
.clone()
|
||||
.motion(seat, x.apply_fract(x_int), y.apply_fract(y_int));
|
||||
.pointer_motion(seat, x.apply_fract(x_int), y.apply_fract(y_int));
|
||||
}
|
||||
|
||||
fn start_drag(
|
||||
|
|
|
|||
|
|
@ -705,11 +705,11 @@ impl Node for WlSurface {
|
|||
seat.leave_surface(self);
|
||||
}
|
||||
|
||||
fn enter(self: Rc<Self>, seat: &Rc<WlSeatGlobal>, x: Fixed, y: Fixed) {
|
||||
fn pointer_enter(self: Rc<Self>, seat: &Rc<WlSeatGlobal>, x: Fixed, y: Fixed) {
|
||||
seat.enter_surface(&self, x, y)
|
||||
}
|
||||
|
||||
fn motion(self: Rc<Self>, seat: &Rc<WlSeatGlobal>, x: Fixed, y: Fixed) {
|
||||
fn pointer_motion(self: Rc<Self>, seat: &Rc<WlSeatGlobal>, x: Fixed, y: Fixed) {
|
||||
seat.motion_surface(&*self, x, y)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -293,11 +293,11 @@ impl Node for XdgPopup {
|
|||
self.xdg.find_tree_at(x, y, tree)
|
||||
}
|
||||
|
||||
fn enter(self: Rc<Self>, seat: &Rc<WlSeatGlobal>, _x: Fixed, _y: Fixed) {
|
||||
fn pointer_enter(self: Rc<Self>, seat: &Rc<WlSeatGlobal>, _x: Fixed, _y: Fixed) {
|
||||
seat.enter_popup(&self);
|
||||
}
|
||||
|
||||
fn pointer_target(&self, seat: &Rc<WlSeatGlobal>) {
|
||||
fn pointer_focus(&self, seat: &Rc<WlSeatGlobal>) {
|
||||
seat.set_known_cursor(KnownCursor::Default);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -439,11 +439,11 @@ impl Node for XdgToplevel {
|
|||
self.xdg.find_tree_at(x, y, tree)
|
||||
}
|
||||
|
||||
fn enter(self: Rc<Self>, seat: &Rc<WlSeatGlobal>, _x: Fixed, _y: Fixed) {
|
||||
fn pointer_enter(self: Rc<Self>, seat: &Rc<WlSeatGlobal>, _x: Fixed, _y: Fixed) {
|
||||
seat.enter_toplevel(&self);
|
||||
}
|
||||
|
||||
fn pointer_target(&self, seat: &Rc<WlSeatGlobal>) {
|
||||
fn pointer_focus(&self, seat: &Rc<WlSeatGlobal>) {
|
||||
seat.set_known_cursor(KnownCursor::Default);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue