Merge pull request #184 from pop-os/focus-across-monitors_jammy
Fix NextOutput and PreviousOutput when Shell::activate returns None
This commit is contained in:
commit
0b057f153e
1 changed files with 36 additions and 24 deletions
|
|
@ -1187,7 +1187,8 @@ impl State {
|
|||
.cloned()
|
||||
{
|
||||
let idx = self.common.shell.workspaces.active_num(&next_output).1;
|
||||
if let Ok(Some(new_pos)) = self.common.shell.activate(&next_output, idx) {
|
||||
match self.common.shell.activate(&next_output, idx) {
|
||||
Ok(Some(new_pos)) => {
|
||||
seat.set_active_output(&next_output);
|
||||
if let Some(ptr) = seat.get_pointer() {
|
||||
ptr.motion(
|
||||
|
|
@ -1201,6 +1202,11 @@ impl State {
|
|||
);
|
||||
}
|
||||
}
|
||||
Ok(None) => {
|
||||
seat.set_active_output(&next_output);
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
}
|
||||
Action::PreviousOutput => {
|
||||
|
|
@ -1217,7 +1223,8 @@ impl State {
|
|||
.cloned()
|
||||
{
|
||||
let idx = self.common.shell.workspaces.active_num(&prev_output).1;
|
||||
if let Ok(Some(new_pos)) = self.common.shell.activate(&prev_output, idx) {
|
||||
match self.common.shell.activate(&prev_output, idx) {
|
||||
Ok(Some(new_pos)) => {
|
||||
seat.set_active_output(&prev_output);
|
||||
if let Some(ptr) = seat.get_pointer() {
|
||||
ptr.motion(
|
||||
|
|
@ -1231,6 +1238,11 @@ impl State {
|
|||
);
|
||||
}
|
||||
}
|
||||
Ok(None) => {
|
||||
seat.set_active_output(&prev_output);
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
}
|
||||
x @ Action::MoveToNextOutput | x @ Action::SendToNextOutput => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue