diff options
Diffstat (limited to 'sway/input/seat.c')
-rw-r--r-- | sway/input/seat.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c index 09927a1a..23b7ef76 100644 --- a/sway/input/seat.c +++ b/sway/input/seat.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include "sway/output.h" | 18 | #include "sway/output.h" |
19 | #include "sway/tree/container.h" | 19 | #include "sway/tree/container.h" |
20 | #include "sway/tree/view.h" | 20 | #include "sway/tree/view.h" |
21 | #include "sway/tree/workspace.h" | ||
21 | #include "log.h" | 22 | #include "log.h" |
22 | 23 | ||
23 | static void seat_device_destroy(struct sway_seat_device *seat_device) { | 24 | static void seat_device_destroy(struct sway_seat_device *seat_device) { |
@@ -448,6 +449,21 @@ void seat_set_focus_warp(struct sway_seat *seat, | |||
448 | return; | 449 | return; |
449 | } | 450 | } |
450 | 451 | ||
452 | struct sway_container *last_workspace = last_focus; | ||
453 | if (last_workspace && last_workspace->type != C_WORKSPACE) { | ||
454 | last_workspace = container_parent(last_workspace, C_WORKSPACE); | ||
455 | } | ||
456 | struct sway_container *new_workspace = container; | ||
457 | if (new_workspace && new_workspace->type != C_WORKSPACE) { | ||
458 | new_workspace = container_parent(new_workspace, C_WORKSPACE); | ||
459 | } | ||
460 | |||
461 | if (last_workspace == new_workspace | ||
462 | && last_workspace->sway_workspace->fullscreen | ||
463 | && !container->sway_view->is_fullscreen) { | ||
464 | return; | ||
465 | } | ||
466 | |||
451 | struct sway_container *last_output = last_focus; | 467 | struct sway_container *last_output = last_focus; |
452 | if (last_output && last_output->type != C_OUTPUT) { | 468 | if (last_output && last_output->type != C_OUTPUT) { |
453 | last_output = container_parent(last_output, C_OUTPUT); | 469 | last_output = container_parent(last_output, C_OUTPUT); |