Add focus-floating/tiling actions

This commit is contained in:
Ivan Molodetskikh
2024-12-28 10:14:02 +03:00
parent ad50dd21fe
commit 5b4750a009
5 changed files with 52 additions and 0 deletions
+12
View File
@@ -1157,6 +1157,18 @@ impl<W: LayoutElement> Workspace<W> {
self.toggle_window_floating(id);
}
pub fn focus_floating(&mut self) {
if !self.floating_is_active.get() {
self.switch_focus_floating_tiling();
}
}
pub fn focus_tiling(&mut self) {
if self.floating_is_active.get() {
self.switch_focus_floating_tiling();
}
}
pub fn switch_focus_floating_tiling(&mut self) {
if self.floating.is_empty() {
// If floating is empty, keep focus on scrolling.