mirror of
https://github.com/swaywm/sway.git
synced 2025-11-07 13:29:56 -05:00
Fix switching between focused outputs
This commit is contained in:
parent
868cb3ca71
commit
a64b10df83
3 changed files with 32 additions and 1 deletions
|
|
@ -174,6 +174,17 @@ void workspace_prev() {
|
|||
}
|
||||
|
||||
void workspace_switch(swayc_t *workspace) {
|
||||
if (!workspace) {
|
||||
return;
|
||||
}
|
||||
sway_log(L_DEBUG, "Switching to workspace %p:%s", workspace, workspace->name);
|
||||
|
||||
// Remove focus from current view
|
||||
swayc_t *current = get_focused_view(&root_container);
|
||||
if (current && current->type == C_VIEW) {
|
||||
wlc_view_set_state(current->handle, WLC_BIT_ACTIVATED, false);
|
||||
}
|
||||
|
||||
set_focused_container(workspace);
|
||||
active_workspace = workspace;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue