mirror of
https://github.com/swaywm/sway.git
synced 2025-11-15 06:59:50 -05:00
Allow running commands on containers without focusing them
This adds a `con` argument to `execute_command` which allows you to specify the container to execute the command on. In most cases it leaves it as `NULL` which makes it use the focused node. We only set it when executing `for_window` criteria such as when a view maps. This means we don't send unnecessary IPC focus events, and fixes a crash when the criteria command is `move scratchpad` (because we can't give focus to a hidden scratchpad container). Each of the shell map handlers now check to see if the view has a workspace. It won't have a workspace if criteria has moved it to the scratchpad.
This commit is contained in:
parent
082488a81c
commit
cb66bbea42
9 changed files with 28 additions and 19 deletions
|
|
@ -394,7 +394,7 @@ static void handle_map(struct wl_listener *listener, void *data) {
|
|||
} else {
|
||||
if (view->container->parent) {
|
||||
arrange_container(view->container->parent);
|
||||
} else {
|
||||
} else if (view->container->workspace) {
|
||||
arrange_workspace(view->container->workspace);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue