Stub out actions when floating is active

Make sure they don't go to the unfocused scrolling layout at least.
This commit is contained in:
Ivan Molodetskikh
2024-12-15 09:41:08 +03:00
parent c008e1c5bc
commit c2e4cfd832
+84
View File
@@ -747,74 +747,140 @@ impl<W: LayoutElement> Workspace<W> {
} }
pub fn focus_left(&mut self) -> bool { pub fn focus_left(&mut self) -> bool {
// TODO
if self.floating_is_active {
return true;
}
self.scrolling.focus_left() self.scrolling.focus_left()
} }
pub fn focus_right(&mut self) -> bool { pub fn focus_right(&mut self) -> bool {
// TODO
if self.floating_is_active {
return true;
}
self.scrolling.focus_right() self.scrolling.focus_right()
} }
pub fn focus_column_first(&mut self) { pub fn focus_column_first(&mut self) {
// TODO
if self.floating_is_active {
return;
}
self.scrolling.focus_column_first(); self.scrolling.focus_column_first();
} }
pub fn focus_column_last(&mut self) { pub fn focus_column_last(&mut self) {
// TODO
if self.floating_is_active {
return;
}
self.scrolling.focus_column_last(); self.scrolling.focus_column_last();
} }
pub fn focus_column_right_or_first(&mut self) { pub fn focus_column_right_or_first(&mut self) {
// TODO
if self.floating_is_active {
return;
}
self.scrolling.focus_column_right_or_first(); self.scrolling.focus_column_right_or_first();
} }
pub fn focus_column_left_or_last(&mut self) { pub fn focus_column_left_or_last(&mut self) {
// TODO
if self.floating_is_active {
return;
}
self.scrolling.focus_column_left_or_last(); self.scrolling.focus_column_left_or_last();
} }
pub fn focus_down(&mut self) -> bool { pub fn focus_down(&mut self) -> bool {
// TODO
if self.floating_is_active {
return true;
}
self.scrolling.focus_down() self.scrolling.focus_down()
} }
pub fn focus_up(&mut self) -> bool { pub fn focus_up(&mut self) -> bool {
// TODO
if self.floating_is_active {
return true;
}
self.scrolling.focus_up() self.scrolling.focus_up()
} }
pub fn focus_down_or_left(&mut self) { pub fn focus_down_or_left(&mut self) {
// TODO
if self.floating_is_active {
return;
}
self.scrolling.focus_down_or_left(); self.scrolling.focus_down_or_left();
} }
pub fn focus_down_or_right(&mut self) { pub fn focus_down_or_right(&mut self) {
// TODO
if self.floating_is_active {
return;
}
self.scrolling.focus_down_or_right(); self.scrolling.focus_down_or_right();
} }
pub fn focus_up_or_left(&mut self) { pub fn focus_up_or_left(&mut self) {
// TODO
if self.floating_is_active {
return;
}
self.scrolling.focus_up_or_left(); self.scrolling.focus_up_or_left();
} }
pub fn focus_up_or_right(&mut self) { pub fn focus_up_or_right(&mut self) {
// TODO
if self.floating_is_active {
return;
}
self.scrolling.focus_up_or_right(); self.scrolling.focus_up_or_right();
} }
pub fn move_left(&mut self) -> bool { pub fn move_left(&mut self) -> bool {
if self.floating_is_active {
return true;
}
self.scrolling.move_left() self.scrolling.move_left()
} }
pub fn move_right(&mut self) -> bool { pub fn move_right(&mut self) -> bool {
if self.floating_is_active {
return true;
}
self.scrolling.move_right() self.scrolling.move_right()
} }
pub fn move_column_to_first(&mut self) { pub fn move_column_to_first(&mut self) {
if self.floating_is_active {
return;
}
self.scrolling.move_column_to_first(); self.scrolling.move_column_to_first();
} }
pub fn move_column_to_last(&mut self) { pub fn move_column_to_last(&mut self) {
if self.floating_is_active {
return;
}
self.scrolling.move_column_to_last(); self.scrolling.move_column_to_last();
} }
pub fn move_down(&mut self) -> bool { pub fn move_down(&mut self) -> bool {
if self.floating_is_active {
return true;
}
self.scrolling.move_down() self.scrolling.move_down()
} }
pub fn move_up(&mut self) -> bool { pub fn move_up(&mut self) -> bool {
if self.floating_is_active {
return true;
}
self.scrolling.move_up() self.scrolling.move_up()
} }
@@ -833,22 +899,40 @@ impl<W: LayoutElement> Workspace<W> {
} }
pub fn consume_into_column(&mut self) { pub fn consume_into_column(&mut self) {
if self.floating_is_active {
return;
}
self.scrolling.consume_into_column(); self.scrolling.consume_into_column();
} }
pub fn expel_from_column(&mut self) { pub fn expel_from_column(&mut self) {
if self.floating_is_active {
return;
}
self.scrolling.expel_from_column(); self.scrolling.expel_from_column();
} }
pub fn center_column(&mut self) { pub fn center_column(&mut self) {
// TODO
if self.floating_is_active {
return;
}
self.scrolling.center_column(); self.scrolling.center_column();
} }
pub fn toggle_width(&mut self) { pub fn toggle_width(&mut self) {
// TODO
if self.floating_is_active {
return;
}
self.scrolling.toggle_width(); self.scrolling.toggle_width();
} }
pub fn toggle_full_width(&mut self) { pub fn toggle_full_width(&mut self) {
// TODO
if self.floating_is_active {
return;
}
self.scrolling.toggle_full_width(); self.scrolling.toggle_full_width();
} }