seat: add cursor groups
This commit is contained in:
parent
dc97827f7a
commit
efdca4de49
28 changed files with 629 additions and 401 deletions
|
|
@ -601,7 +601,7 @@ impl ContainerNode {
|
|||
};
|
||||
if new_cursor != mem::replace(&mut seat_state.cursor, new_cursor) {
|
||||
if seat_state.target {
|
||||
seat.set_known_cursor(new_cursor);
|
||||
seat.pointer_cursor().set_known(new_cursor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1315,7 +1315,7 @@ impl Node for ContainerNode {
|
|||
let mut seats = self.seats.borrow_mut();
|
||||
if let Some(seat_state) = seats.get_mut(&seat.id()) {
|
||||
seat_state.target = true;
|
||||
seat.set_known_cursor(seat_state.cursor);
|
||||
seat.pointer_cursor().set_known(seat_state.cursor);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -140,6 +140,6 @@ impl Node for DisplayNode {
|
|||
|
||||
fn node_on_pointer_focus(&self, seat: &Rc<WlSeatGlobal>) {
|
||||
// log::info!("display focus");
|
||||
seat.set_known_cursor(KnownCursor::Default);
|
||||
seat.pointer_cursor().set_known(KnownCursor::Default);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -334,7 +334,7 @@ impl FloatNode {
|
|||
seat_state.op_type = op_type;
|
||||
if new_cursor != mem::replace(&mut seat_state.cursor, new_cursor) {
|
||||
if seat_state.target {
|
||||
seat.set_known_cursor(new_cursor);
|
||||
seat.pointer_cursor().set_known(new_cursor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -564,7 +564,7 @@ impl Node for FloatNode {
|
|||
let mut seats = self.seats.borrow_mut();
|
||||
if let Some(seat_state) = seats.get_mut(&seat.id()) {
|
||||
seat_state.target = true;
|
||||
seat.set_known_cursor(seat_state.cursor);
|
||||
seat.pointer_cursor().set_known(seat_state.cursor);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -553,6 +553,10 @@ impl OutputNode {
|
|||
}
|
||||
}
|
||||
self.global.send_mode();
|
||||
for seat in self.state.globals.seats.lock().values() {
|
||||
seat.cursor_group().output_pos_changed(self)
|
||||
}
|
||||
self.state.tree_changed();
|
||||
}
|
||||
|
||||
pub fn find_layer_surface_at(
|
||||
|
|
@ -906,7 +910,7 @@ impl Node for OutputNode {
|
|||
|
||||
fn node_on_pointer_focus(&self, seat: &Rc<WlSeatGlobal>) {
|
||||
// log::info!("output focus");
|
||||
seat.set_known_cursor(KnownCursor::Default);
|
||||
seat.pointer_cursor().set_known(KnownCursor::Default);
|
||||
}
|
||||
|
||||
fn node_on_pointer_motion(self: Rc<Self>, seat: &Rc<WlSeatGlobal>, x: Fixed, y: Fixed) {
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ impl Node for PlaceholderNode {
|
|||
}
|
||||
|
||||
fn node_on_pointer_enter(self: Rc<Self>, seat: &Rc<WlSeatGlobal>, _x: Fixed, _y: Fixed) {
|
||||
seat.set_known_cursor(KnownCursor::Default);
|
||||
seat.pointer_cursor().set_known(KnownCursor::Default);
|
||||
seat.enter_toplevel(self.clone());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -274,7 +274,7 @@ impl Node for WorkspaceNode {
|
|||
|
||||
fn node_on_pointer_focus(&self, seat: &Rc<WlSeatGlobal>) {
|
||||
// log::info!("workspace focus");
|
||||
seat.set_known_cursor(KnownCursor::Default);
|
||||
seat.pointer_cursor().set_known(KnownCursor::Default);
|
||||
}
|
||||
|
||||
fn node_into_workspace(self: Rc<Self>) -> Option<Rc<WorkspaceNode>> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue