diff options
author | Drew DeVault <sir@cmpwn.com> | 2019-01-27 18:06:50 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-27 18:06:50 -0500 |
commit | 783fadab284c79c8e13625e5e2a2eefae02c75d3 (patch) | |
tree | 795c5c69a7fcfc9336115ac157a41b943190f206 /sway/commands/focus.c | |
parent | 897250c65fb4d7123361dc6f77c2824179ed8885 (diff) | |
parent | 20aa8ee67dc528299dbc8735220a1c081c7ff9f6 (diff) |
Merge pull request #3423 from RyanDwyer/fullscreen-global
Implement fullscreen global
Diffstat (limited to 'sway/commands/focus.c')
-rw-r--r-- | sway/commands/focus.c | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/sway/commands/focus.c b/sway/commands/focus.c index 0622f2e8..87fe6cf3 100644 --- a/sway/commands/focus.c +++ b/sway/commands/focus.c @@ -89,19 +89,23 @@ static struct sway_node *get_node_in_output_direction( static struct sway_node *node_get_in_direction(struct sway_container *container, struct sway_seat *seat, enum wlr_direction dir) { - if (container->is_fullscreen) { - // Fullscreen container with a direction - go straight to outputs - struct sway_output *output = container->workspace->output; - struct sway_output *new_output = output_get_in_direction(output, dir); - if (!new_output) { - return NULL; - } - return get_node_in_output_direction(new_output, dir); - } - struct sway_container *wrap_candidate = NULL; struct sway_container *current = container; while (current) { + if (current->fullscreen_mode == FULLSCREEN_WORKSPACE) { + // Fullscreen container with a direction - go straight to outputs + struct sway_output *output = current->workspace->output; + struct sway_output *new_output = + output_get_in_direction(output, dir); + if (!new_output) { + return NULL; + } + return get_node_in_output_direction(new_output, dir); + } + if (current->fullscreen_mode == FULLSCREEN_GLOBAL) { + return NULL; + } + bool can_move = false; int desired; int idx = container_sibling_index(current); @@ -227,7 +231,7 @@ static struct cmd_results *focus_output(struct sway_seat *seat, static struct cmd_results *focus_parent(void) { struct sway_seat *seat = config->handler_context.seat; struct sway_container *con = config->handler_context.container; - if (!con || con->is_fullscreen) { + if (!con || con->fullscreen_mode) { return cmd_results_new(CMD_SUCCESS, NULL); } struct sway_node *parent = node_get_parent(&con->node); |