input: Add minimize shortcut
This commit is contained in:
parent
32424d156a
commit
9540005577
2 changed files with 10 additions and 0 deletions
|
|
@ -188,6 +188,7 @@ pub enum Action {
|
|||
Resizing(ResizeDirection),
|
||||
#[serde(skip)]
|
||||
_ResizingInternal(ResizeDirection, ResizeEdge, KeyState),
|
||||
Minimize,
|
||||
Maximize,
|
||||
Spawn(String),
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2025,6 +2025,15 @@ impl State {
|
|||
}
|
||||
}
|
||||
}
|
||||
Action::Minimize => {
|
||||
let current_output = seat.active_output();
|
||||
let workspace = self.common.shell.active_space_mut(¤t_output);
|
||||
let focus_stack = workspace.focus_stack.get(seat);
|
||||
let focused_window = focus_stack.last().cloned();
|
||||
if let Some(window) = focused_window {
|
||||
self.common.shell.minimize_request(&window);
|
||||
}
|
||||
}
|
||||
Action::Maximize => {
|
||||
let current_output = seat.active_output();
|
||||
let workspace = self.common.shell.active_space_mut(¤t_output);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue