aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2024-12-15 09:41:08 +0300
committerIvan Molodetskikh <yalterz@gmail.com>2024-12-30 20:12:37 +0300
commitc2e4cfd832953a9974572e3e1805bfbe4c3375ef (patch)
tree918382646c18a562d2cbf22c96c028c55a5039c1 /src
parentc008e1c5bcab360425780997f70818fa4252c938 (diff)
downloadniri-c2e4cfd832953a9974572e3e1805bfbe4c3375ef.tar.gz
niri-c2e4cfd832953a9974572e3e1805bfbe4c3375ef.tar.bz2
niri-c2e4cfd832953a9974572e3e1805bfbe4c3375ef.zip
Stub out actions when floating is active
Make sure they don't go to the unfocused scrolling layout at least.
Diffstat (limited to 'src')
-rw-r--r--src/layout/workspace.rs84
1 files changed, 84 insertions, 0 deletions
diff --git a/src/layout/workspace.rs b/src/layout/workspace.rs
index bfecfcde..9ad72cd1 100644
--- a/src/layout/workspace.rs
+++ b/src/layout/workspace.rs
@@ -747,74 +747,140 @@ impl<W: LayoutElement> Workspace<W> {
}
pub fn focus_left(&mut self) -> bool {
+ // TODO
+ if self.floating_is_active {
+ return true;
+ }
self.scrolling.focus_left()
}
pub fn focus_right(&mut self) -> bool {
+ // TODO
+ if self.floating_is_active {
+ return true;
+ }
self.scrolling.focus_right()
}
pub fn focus_column_first(&mut self) {
+ // TODO
+ if self.floating_is_active {
+ return;
+ }
self.scrolling.focus_column_first();
}
pub fn focus_column_last(&mut self) {
+ // TODO
+ if self.floating_is_active {
+ return;
+ }
self.scrolling.focus_column_last();
}
pub fn focus_column_right_or_first(&mut self) {
+ // TODO
+ if self.floating_is_active {
+ return;
+ }
self.scrolling.focus_column_right_or_first();
}
pub fn focus_column_left_or_last(&mut self) {
+ // TODO
+ if self.floating_is_active {
+ return;
+ }
self.scrolling.focus_column_left_or_last();
}
pub fn focus_down(&mut self) -> bool {
+ // TODO
+ if self.floating_is_active {
+ return true;
+ }
self.scrolling.focus_down()
}
pub fn focus_up(&mut self) -> bool {
+ // TODO
+ if self.floating_is_active {
+ return true;
+ }
self.scrolling.focus_up()
}
pub fn focus_down_or_left(&mut self) {
+ // TODO
+ if self.floating_is_active {
+ return;
+ }
self.scrolling.focus_down_or_left();
}
pub fn focus_down_or_right(&mut self) {
+ // TODO
+ if self.floating_is_active {
+ return;
+ }
self.scrolling.focus_down_or_right();
}
pub fn focus_up_or_left(&mut self) {
+ // TODO
+ if self.floating_is_active {
+ return;
+ }
self.scrolling.focus_up_or_left();
}
pub fn focus_up_or_right(&mut self) {
+ // TODO
+ if self.floating_is_active {
+ return;
+ }
self.scrolling.focus_up_or_right();
}
pub fn move_left(&mut self) -> bool {
+ if self.floating_is_active {
+ return true;
+ }
self.scrolling.move_left()
}
pub fn move_right(&mut self) -> bool {
+ if self.floating_is_active {
+ return true;
+ }
self.scrolling.move_right()
}
pub fn move_column_to_first(&mut self) {
+ if self.floating_is_active {
+ return;
+ }
self.scrolling.move_column_to_first();
}
pub fn move_column_to_last(&mut self) {
+ if self.floating_is_active {
+ return;
+ }
self.scrolling.move_column_to_last();
}
pub fn move_down(&mut self) -> bool {
+ if self.floating_is_active {
+ return true;
+ }
self.scrolling.move_down()
}
pub fn move_up(&mut self) -> bool {
+ if self.floating_is_active {
+ return true;
+ }
self.scrolling.move_up()
}
@@ -833,22 +899,40 @@ impl<W: LayoutElement> Workspace<W> {
}
pub fn consume_into_column(&mut self) {
+ if self.floating_is_active {
+ return;
+ }
self.scrolling.consume_into_column();
}
pub fn expel_from_column(&mut self) {
+ if self.floating_is_active {
+ return;
+ }
self.scrolling.expel_from_column();
}
pub fn center_column(&mut self) {
+ // TODO
+ if self.floating_is_active {
+ return;
+ }
self.scrolling.center_column();
}
pub fn toggle_width(&mut self) {
+ // TODO
+ if self.floating_is_active {
+ return;
+ }
self.scrolling.toggle_width();
}
pub fn toggle_full_width(&mut self) {
+ // TODO
+ if self.floating_is_active {
+ return;
+ }
self.scrolling.toggle_full_width();
}