config: add mouse-follows-focus option
This commit is contained in:
parent
0d4ee299d4
commit
216d104b73
14 changed files with 134 additions and 6 deletions
|
|
@ -1108,6 +1108,10 @@ impl ConfigClient {
|
|||
self.send(&ClientMessage::SeatEnableUnicodeInput { seat });
|
||||
}
|
||||
|
||||
pub fn seat_set_mouse_follows_focus(&self, seat: Seat, enabled: bool) {
|
||||
self.send(&ClientMessage::SeatSetMouseFollowsFocus { seat, enabled });
|
||||
}
|
||||
|
||||
pub fn set_show_float_pin_icon(&self, show: bool) {
|
||||
self.send(&ClientMessage::SetShowFloatPinIcon { show });
|
||||
}
|
||||
|
|
|
|||
|
|
@ -871,6 +871,10 @@ pub enum ClientMessage<'a> {
|
|||
dx2: i32,
|
||||
dy2: i32,
|
||||
},
|
||||
SeatSetMouseFollowsFocus {
|
||||
seat: Seat,
|
||||
enabled: bool,
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
|
|
|
|||
|
|
@ -655,6 +655,15 @@ impl Seat {
|
|||
pub fn resize(self, dx1: i32, dy1: i32, dx2: i32, dy2: i32) {
|
||||
self.window().resize(dx1, dy1, dx2, dy2);
|
||||
}
|
||||
|
||||
/// Sets whether the cursor should automatically move to the center of a window
|
||||
/// when focus changes via keyboard commands (move-left, focus-right, show-workspace, etc.).
|
||||
///
|
||||
/// The default is `false`.
|
||||
#[deprecated = "This setting is unstable and might be removed in the future"]
|
||||
pub fn unstable_set_mouse_follows_focus(self, enabled: bool) {
|
||||
get!().seat_set_mouse_follows_focus(self, enabled)
|
||||
}
|
||||
}
|
||||
|
||||
/// A focus-follows-mouse mode.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue