mirror of
https://github.com/swaywm/sway.git
synced 2024-12-30 17:06:40 +01:00
ipc: fix workspace::focus event behaviour
This commit is contained in:
parent
3edaf2ce2a
commit
b2ac234569
2 changed files with 4 additions and 2 deletions
|
@ -739,7 +739,9 @@ void seat_set_focus_warp(struct sway_seat *seat,
|
||||||
|
|
||||||
if (last_focus) {
|
if (last_focus) {
|
||||||
if (last_workspace) {
|
if (last_workspace) {
|
||||||
ipc_event_workspace(last_workspace, container, "focus");
|
if (last_workspace != new_workspace) {
|
||||||
|
ipc_event_workspace(last_workspace, new_workspace, "focus");
|
||||||
|
}
|
||||||
if (!workspace_is_visible(last_workspace)
|
if (!workspace_is_visible(last_workspace)
|
||||||
&& workspace_is_empty(last_workspace)) {
|
&& workspace_is_empty(last_workspace)) {
|
||||||
if (last_workspace == last_focus) {
|
if (last_workspace == last_focus) {
|
||||||
|
|
|
@ -598,7 +598,7 @@ void container_move(struct sway_container *container,
|
||||||
next_ws = container_parent(next_ws, C_WORKSPACE);
|
next_ws = container_parent(next_ws, C_WORKSPACE);
|
||||||
}
|
}
|
||||||
if (last_ws && next_ws && last_ws != next_ws) {
|
if (last_ws && next_ws && last_ws != next_ws) {
|
||||||
ipc_event_workspace(last_ws, container, "focus");
|
ipc_event_workspace(last_ws, next_ws, "focus");
|
||||||
workspace_detect_urgent(last_ws);
|
workspace_detect_urgent(last_ws);
|
||||||
workspace_detect_urgent(next_ws);
|
workspace_detect_urgent(next_ws);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue