Struct leftwm_core::models::FocusManager
source · pub struct FocusManager {
pub behaviour: FocusBehaviour,
pub focus_new_windows: bool,
pub workspace_history: VecDeque<usize>,
pub window_history: VecDeque<Option<WindowHandle>>,
pub tag_history: VecDeque<TagId>,
pub tags_last_window: HashMap<TagId, WindowHandle>,
pub sloppy_mouse_follows_focus: bool,
pub last_mouse_position: Option<(i32, i32)>,
}Fields§
§behaviour: FocusBehaviour§focus_new_windows: bool§workspace_history: VecDeque<usize>§window_history: VecDeque<Option<WindowHandle>>§tag_history: VecDeque<TagId>§sloppy_mouse_follows_focus: bool§last_mouse_position: Option<(i32, i32)>Implementations§
source§impl FocusManager
impl FocusManager
pub fn new(config: &impl Config) -> Self
sourcepub fn workspace<'a, 'b>(
&self,
workspaces: &'a [Workspace]
) -> Option<&'b Workspace>where
'a: 'b,
pub fn workspace<'a, 'b>(
&self,
workspaces: &'a [Workspace]
) -> Option<&'b Workspace>where
'a: 'b,
Return the currently focused workspace.
sourcepub fn workspace_mut<'a, 'b>(
&self,
workspaces: &'a mut [Workspace]
) -> Option<&'b mut Workspace>where
'a: 'b,
pub fn workspace_mut<'a, 'b>(
&self,
workspaces: &'a mut [Workspace]
) -> Option<&'b mut Workspace>where
'a: 'b,
Return the currently focused workspace.
sourcepub fn tag(&self, offset: usize) -> Option<TagId>
pub fn tag(&self, offset: usize) -> Option<TagId>
Return the currently focused tag if the offset is 0. Offset is used to reach further down the history.
sourcepub fn window<'a, 'b>(&self, windows: &'a [Window]) -> Option<&'b Window>where
'a: 'b,
pub fn window<'a, 'b>(&self, windows: &'a [Window]) -> Option<&'b Window>where
'a: 'b,
Return the currently focused window.
sourcepub fn window_mut<'a, 'b>(
&self,
windows: &'a mut [Window]
) -> Option<&'b mut Window>where
'a: 'b,
pub fn window_mut<'a, 'b>(
&self,
windows: &'a mut [Window]
) -> Option<&'b mut Window>where
'a: 'b,
Return the currently focused window.
Trait Implementations§
source§impl Clone for FocusManager
impl Clone for FocusManager
source§fn clone(&self) -> FocusManager
fn clone(&self) -> FocusManager
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for FocusManager
impl Debug for FocusManager
source§impl<'de> Deserialize<'de> for FocusManager
impl<'de> Deserialize<'de> for FocusManager
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more