config: add Window
This commit is contained in:
parent
ab095b89cf
commit
9977f9dfdf
19 changed files with 1172 additions and 203 deletions
|
|
@ -10,6 +10,7 @@ use {
|
|||
input::{acceleration::AccelProfile, capability::Capability},
|
||||
keyboard::{Keymap, mods::Modifiers},
|
||||
video::Connector,
|
||||
window::Window,
|
||||
},
|
||||
serde::{Deserialize, Serialize},
|
||||
std::time::Duration,
|
||||
|
|
@ -478,6 +479,20 @@ impl Seat {
|
|||
pub fn toggle_float_pinned(self) {
|
||||
self.set_float_pinned(!self.float_pinned());
|
||||
}
|
||||
|
||||
/// Returns the focused window.
|
||||
///
|
||||
/// If no window is focused, [`Window::exists`] returns false.
|
||||
pub fn window(self) -> Window {
|
||||
get!(Window(0)).get_seat_keyboard_window(self)
|
||||
}
|
||||
|
||||
/// Puts the keyboard focus on the window.
|
||||
///
|
||||
/// This has no effect if the window is not visible.
|
||||
pub fn focus_window(self, window: Window) {
|
||||
get!().focus_window(self, window)
|
||||
}
|
||||
}
|
||||
|
||||
/// A focus-follows-mouse mode.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue