config: add warp-mouse-to-focus action
This commit is contained in:
parent
107245d877
commit
aaf02dc4e1
13 changed files with 74 additions and 2 deletions
|
|
@ -407,6 +407,10 @@ impl ConfigClient {
|
|||
self.send(&ClientMessage::SeatMove { seat, direction });
|
||||
}
|
||||
|
||||
pub fn seat_warp_mouse_to_focus(&self, seat: Seat) {
|
||||
self.send(&ClientMessage::SeatWarpMouseToFocus { seat });
|
||||
}
|
||||
|
||||
pub fn window_move(&self, window: Window, direction: Direction) {
|
||||
self.send(&ClientMessage::WindowMove { window, direction });
|
||||
}
|
||||
|
|
|
|||
|
|
@ -858,6 +858,9 @@ pub enum ClientMessage<'a> {
|
|||
RemoveVirtualOutput {
|
||||
name: &'a str,
|
||||
},
|
||||
SeatWarpMouseToFocus {
|
||||
seat: Seat,
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
|
|
|
|||
|
|
@ -645,6 +645,11 @@ impl Seat {
|
|||
pub fn enable_unicode_input(self) {
|
||||
get!().seat_enable_unicode_input(self);
|
||||
}
|
||||
|
||||
/// Warps the cursor to the center of the currently focused window.
|
||||
pub fn warp_mouse_to_focus(self) {
|
||||
get!().seat_warp_mouse_to_focus(self)
|
||||
}
|
||||
}
|
||||
|
||||
/// A focus-follows-mouse mode.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue