fix: set the workspace of the activated token's surface to urgent if not focusing it
This commit is contained in:
parent
b33c1dc9f7
commit
495d772a38
1 changed files with 10 additions and 6 deletions
|
|
@ -117,11 +117,12 @@ impl XdgActivationHandler for State {
|
||||||
let current_output = seat.active_output();
|
let current_output = seat.active_output();
|
||||||
let current_workspace = self.common.shell.active_space_mut(¤t_output);
|
let current_workspace = self.common.shell.active_space_mut(¤t_output);
|
||||||
|
|
||||||
if current_workspace
|
let in_current_workspace = current_workspace
|
||||||
.floating_layer
|
.floating_layer
|
||||||
.mapped()
|
.mapped()
|
||||||
.any(|m| m == &element)
|
.any(|m| m == &element);
|
||||||
{
|
|
||||||
|
if in_current_workspace {
|
||||||
current_workspace
|
current_workspace
|
||||||
.floating_layer
|
.floating_layer
|
||||||
.space
|
.space
|
||||||
|
|
@ -143,11 +144,14 @@ impl XdgActivationHandler for State {
|
||||||
}
|
}
|
||||||
|
|
||||||
let target = element.into();
|
let target = element.into();
|
||||||
if workspace == ¤t_workspace.handle {
|
if workspace == ¤t_workspace.handle && in_current_workspace {
|
||||||
Shell::set_focus(self, Some(&target), &seat, None);
|
Shell::set_focus(self, Some(&target), &seat, None);
|
||||||
} else {
|
} else if let Some((w, _)) = target
|
||||||
|
.toplevel()
|
||||||
|
.and_then(|t| self.common.shell.workspace_for_surface(&t))
|
||||||
|
{
|
||||||
Shell::append_focus_stack(self, Some(&target), &seat);
|
Shell::append_focus_stack(self, Some(&target), &seat);
|
||||||
self.common.shell.set_urgent(workspace);
|
self.common.shell.set_urgent(&w);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue