diff options
Diffstat (limited to 'sway')
-rw-r--r-- | sway/tree/workspace.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/sway/tree/workspace.c b/sway/tree/workspace.c index 18746430..b0c440c1 100644 --- a/sway/tree/workspace.c +++ b/sway/tree/workspace.c | |||
@@ -389,13 +389,11 @@ bool workspace_switch(struct sway_workspace *workspace, | |||
389 | struct sway_output *next_output = workspace->output; | 389 | struct sway_output *next_output = workspace->output; |
390 | struct sway_workspace *next_output_prev_ws = | 390 | struct sway_workspace *next_output_prev_ws = |
391 | output_get_active_workspace(next_output); | 391 | output_get_active_workspace(next_output); |
392 | bool has_sticky = false; | ||
393 | if (workspace != next_output_prev_ws) { | 392 | if (workspace != next_output_prev_ws) { |
394 | for (int i = 0; i < next_output_prev_ws->floating->length; ++i) { | 393 | for (int i = 0; i < next_output_prev_ws->floating->length; ++i) { |
395 | struct sway_container *floater = | 394 | struct sway_container *floater = |
396 | next_output_prev_ws->floating->items[i]; | 395 | next_output_prev_ws->floating->items[i]; |
397 | if (floater->is_sticky) { | 396 | if (floater->is_sticky) { |
398 | has_sticky = true; | ||
399 | container_detach(floater); | 397 | container_detach(floater); |
400 | workspace_add_floating(workspace, floater); | 398 | workspace_add_floating(workspace, floater); |
401 | if (&floater->node == focus) { | 399 | if (&floater->node == focus) { |
@@ -414,14 +412,6 @@ bool workspace_switch(struct sway_workspace *workspace, | |||
414 | if (next == NULL) { | 412 | if (next == NULL) { |
415 | next = &workspace->node; | 413 | next = &workspace->node; |
416 | } | 414 | } |
417 | if (has_sticky) { | ||
418 | // If there's a sticky container, we might be setting focus to the same | ||
419 | // container that's already focused, so seat_set_focus is effectively a | ||
420 | // no op. We therefore need to send the IPC event and clean up the old | ||
421 | // workspace here. | ||
422 | ipc_event_workspace(active_ws, workspace, "focus"); | ||
423 | workspace_consider_destroy(active_ws); | ||
424 | } | ||
425 | seat_set_focus(seat, next); | 415 | seat_set_focus(seat, next); |
426 | arrange_workspace(workspace); | 416 | arrange_workspace(workspace); |
427 | cursor_send_pointer_motion(seat->cursor, 0, true); | 417 | cursor_send_pointer_motion(seat->cursor, 0, true); |