1
0
Fork 0
forked from wry/wry

config: make focus-follows-mouse optional

This commit is contained in:
Julian Orth 2024-04-27 11:19:19 +02:00
parent fe2663fca3
commit a12065a915
14 changed files with 96 additions and 6 deletions

View file

@ -390,6 +390,21 @@ impl Seat {
pub fn consume(self) {
self.set_forward(false)
}
/// Sets the focus-follows-mouse mode.
pub fn set_focus_follows_mouse_mode(self, mode: FocusFollowsMouseMode) {
get!().set_focus_follows_mouse_mode(self, mode);
}
}
/// A focus-follows-mouse mode.
#[derive(Serialize, Deserialize, Copy, Clone, Debug, Hash, Eq, PartialEq)]
pub enum FocusFollowsMouseMode {
/// When the mouse moves and enters a toplevel, that toplevel gets the keyboard focus.
True,
/// The keyboard focus changes only when clicking on a window or the previously
/// focused window becomes invisible.
False,
}
/// Returns all seats.