shell: Make activate/end_workspace_swipe return Err if no set
It doesn't seem like there's really a need to have `Err(_)` and `Ok(None)`. `Err(_)` means the set exists for the output, but doesn't have the appropriate workspace index. It's a bit odd that the set not even existing becomes `Ok(None)`. Instead, just return `Err(InvalidWorkspaceIndex)` in either case.
This commit is contained in:
parent
6f5a14e95c
commit
8aa501c0e0
3 changed files with 17 additions and 22 deletions
|
|
@ -90,7 +90,7 @@ impl ToplevelManagementHandler for State {
|
|||
|
||||
if seat.active_output() != *output {
|
||||
match res {
|
||||
Ok(Some(new_pos)) => {
|
||||
Ok(new_pos) => {
|
||||
seat.set_active_output(&output);
|
||||
if let Some(ptr) = seat.get_pointer() {
|
||||
let serial = SERIAL_COUNTER.next_serial();
|
||||
|
|
@ -106,9 +106,6 @@ impl ToplevelManagementHandler for State {
|
|||
ptr.frame(self);
|
||||
}
|
||||
}
|
||||
Ok(None) => {
|
||||
seat.set_active_output(&output);
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue