From 52420cc24d61db8d22cf0d391f1f84b37bf087d5 Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Mon, 16 Apr 2018 20:36:40 +1000 Subject: Implement fullscreen. --- sway/input/seat.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'sway/input') 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); -- cgit v1.2.3