aboutsummaryrefslogtreecommitdiff
path: root/sway/input/seat.c
diff options
context:
space:
mode:
authorRyan Dwyer <ryandwyer1@gmail.com>2018-04-16 20:36:40 +1000
committerRyan Dwyer <ryandwyer1@gmail.com>2018-04-16 20:36:40 +1000
commit52420cc24d61db8d22cf0d391f1f84b37bf087d5 (patch)
treef975a3708c0d1562a8d2fcdceaed9a76aadbf1f4 /sway/input/seat.c
parentdbc36935ee857375669e7ab3d0f20f1b5b098d23 (diff)
Implement fullscreen.
Diffstat (limited to 'sway/input/seat.c')
-rw-r--r--sway/input/seat.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c
index 09927a1a..f60c43b5 100644
--- a/sway/input/seat.c
+++ b/sway/input/seat.c
@@ -448,6 +448,20 @@ void seat_set_focus_warp(struct sway_seat *seat,
return;
}
+ struct sway_container *last_workspace = last_focus;
+ if (last_workspace && last_workspace->type != C_WORKSPACE) {
+ last_workspace = container_parent(last_workspace, C_WORKSPACE);
+ }
+ struct sway_container *new_workspace = container;
+ if (new_workspace && new_workspace->type != C_WORKSPACE) {
+ new_workspace = container_parent(new_workspace, C_WORKSPACE);
+ }
+
+ if (last_workspace == new_workspace && last_workspace->fullscreen
+ && !container->sway_view->is_fullscreen) {
+ return;
+ }
+
struct sway_container *last_output = last_focus;
if (last_output && last_output->type != C_OUTPUT) {
last_output = container_parent(last_output, C_OUTPUT);