diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-11-05 21:21:47 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-05 21:21:47 +0100 |
commit | 25bea8f6a538edf47ab7e0625f24cdf31e28473f (patch) | |
tree | 96296f5d755a728e8999b072bfd5ce8ee9c4d79e | |
parent | Use wlr_surface_get_effective_damage (diff) | |
parent | Merge pull request #3078 from Emantor/fix/exec_always_double_load (diff) | |
download | sway-25bea8f6a538edf47ab7e0625f24cdf31e28473f.tar.gz sway-25bea8f6a538edf47ab7e0625f24cdf31e28473f.tar.zst sway-25bea8f6a538edf47ab7e0625f24cdf31e28473f.zip |
Merge branch 'master' into effective-damage
-rw-r--r-- | completions/fish/swaymsg.fish | 1 | ||||
-rw-r--r-- | sway/commands/exec_always.c | 2 | ||||
-rw-r--r-- | sway/commands/focus.c | 8 | ||||
-rw-r--r-- | sway/commands/gaps.c | 15 | ||||
-rw-r--r-- | sway/config.c | 3 | ||||
-rw-r--r-- | sway/input/seat.c | 3 | ||||
-rw-r--r-- | sway/sway.5.scd | 9 | ||||
-rw-r--r-- | swaymsg/swaymsg.1.scd | 4 |
8 files changed, 29 insertions, 16 deletions
diff --git a/completions/fish/swaymsg.fish b/completions/fish/swaymsg.fish index 1e5bf3da..fd577413 100644 --- a/completions/fish/swaymsg.fish +++ b/completions/fish/swaymsg.fish | |||
@@ -16,4 +16,5 @@ complete -c swaymsg -s t -l type -fra 'get_bar_config' --description "Get a JSON | |||
16 | complete -c swaymsg -s t -l type -fra 'get_version' --description "Get JSON-encoded version information for the running instance of sway." | 16 | complete -c swaymsg -s t -l type -fra 'get_version' --description "Get JSON-encoded version information for the running instance of sway." |
17 | complete -c swaymsg -s t -l type -fra 'get_binding_modes' --description "Gets a JSON-encoded list of currently configured binding modes." | 17 | complete -c swaymsg -s t -l type -fra 'get_binding_modes' --description "Gets a JSON-encoded list of currently configured binding modes." |
18 | complete -c swaymsg -s t -l type -fra 'get_config' --description "Gets a JSON-encoded copy of the current configuration." | 18 | complete -c swaymsg -s t -l type -fra 'get_config' --description "Gets a JSON-encoded copy of the current configuration." |
19 | complete -c swaymsg -s t -l type -fra 'get_seats' --description "Gets a JSON-encoded list of all seats, its properties and all assigned devices." | ||
19 | complete -c swaymsg -s t -l type -fra 'send_tick' --description "Sends a tick event to all subscribed clients." | 20 | complete -c swaymsg -s t -l type -fra 'send_tick' --description "Sends a tick event to all subscribed clients." |
diff --git a/sway/commands/exec_always.c b/sway/commands/exec_always.c index 8bdeceeb..7a15709b 100644 --- a/sway/commands/exec_always.c +++ b/sway/commands/exec_always.c | |||
@@ -15,7 +15,7 @@ | |||
15 | 15 | ||
16 | struct cmd_results *cmd_exec_always(int argc, char **argv) { | 16 | struct cmd_results *cmd_exec_always(int argc, char **argv) { |
17 | struct cmd_results *error = NULL; | 17 | struct cmd_results *error = NULL; |
18 | if (!config->active) return cmd_results_new(CMD_DEFER, NULL, NULL); | 18 | if (!config->active || config->validating) return cmd_results_new(CMD_DEFER, NULL, NULL); |
19 | if ((error = checkarg(argc, argv[-1], EXPECTED_AT_LEAST, 1))) { | 19 | if ((error = checkarg(argc, argv[-1], EXPECTED_AT_LEAST, 1))) { |
20 | return error; | 20 | return error; |
21 | } | 21 | } |
diff --git a/sway/commands/focus.c b/sway/commands/focus.c index cef92144..f6338c55 100644 --- a/sway/commands/focus.c +++ b/sway/commands/focus.c | |||
@@ -156,6 +156,14 @@ static struct sway_node *node_get_in_direction(struct sway_container *container, | |||
156 | if (new_output) { | 156 | if (new_output) { |
157 | return get_node_in_output_direction(new_output, dir); | 157 | return get_node_in_output_direction(new_output, dir); |
158 | } | 158 | } |
159 | |||
160 | // If there is a wrap candidate, return its focus inactive view | ||
161 | if (wrap_candidate) { | ||
162 | struct sway_container *wrap_inactive = seat_get_focus_inactive_view( | ||
163 | seat, &wrap_candidate->node); | ||
164 | return &wrap_inactive->node; | ||
165 | } | ||
166 | |||
159 | return NULL; | 167 | return NULL; |
160 | } | 168 | } |
161 | 169 | ||
diff --git a/sway/commands/gaps.c b/sway/commands/gaps.c index ca8cb27a..3f0ef155 100644 --- a/sway/commands/gaps.c +++ b/sway/commands/gaps.c | |||
@@ -149,16 +149,17 @@ struct cmd_results *cmd_gaps(int argc, char **argv) { | |||
149 | return error; | 149 | return error; |
150 | } | 150 | } |
151 | 151 | ||
152 | bool config_loading = !config->active || config->reloading; | ||
153 | |||
152 | if (argc == 2) { | 154 | if (argc == 2) { |
153 | return gaps_set_defaults(argc, argv); | 155 | return gaps_set_defaults(argc, argv); |
154 | } | 156 | } |
155 | if (argc == 4) { | 157 | if (argc == 4 && !config_loading) { |
156 | if (config->active) { | 158 | return gaps_set_runtime(argc, argv); |
157 | return gaps_set_runtime(argc, argv); | 159 | } |
158 | } else { | 160 | if (config_loading) { |
159 | return cmd_results_new(CMD_INVALID, "gaps", | 161 | return cmd_results_new(CMD_INVALID, "gaps", |
160 | "This syntax can only be used when sway is running"); | 162 | "Expected 'gaps inner|outer <px>'"); |
161 | } | ||
162 | } | 163 | } |
163 | return cmd_results_new(CMD_INVALID, "gaps", | 164 | return cmd_results_new(CMD_INVALID, "gaps", |
164 | "Expected 'gaps inner|outer <px>' or " | 165 | "Expected 'gaps inner|outer <px>' or " |
diff --git a/sway/config.c b/sway/config.c index 9ec40367..7ef3ef38 100644 --- a/sway/config.c +++ b/sway/config.c | |||
@@ -389,7 +389,8 @@ bool load_main_config(const char *file, bool is_active, bool validating) { | |||
389 | config_defaults(config); | 389 | config_defaults(config); |
390 | config->validating = validating; | 390 | config->validating = validating; |
391 | if (is_active) { | 391 | if (is_active) { |
392 | wlr_log(WLR_DEBUG, "Performing configuration file reload"); | 392 | wlr_log(WLR_DEBUG, "Performing configuration file %s", |
393 | validating ? "validation" : "reload"); | ||
393 | config->reloading = true; | 394 | config->reloading = true; |
394 | config->active = true; | 395 | config->active = true; |
395 | 396 | ||
diff --git a/sway/input/seat.c b/sway/input/seat.c index 64419afa..54fdf40b 100644 --- a/sway/input/seat.c +++ b/sway/input/seat.c | |||
@@ -55,9 +55,6 @@ void seat_destroy(struct sway_seat *seat) { | |||
55 | free(seat); | 55 | free(seat); |
56 | } | 56 | } |
57 | 57 | ||
58 | static struct sway_seat_node *seat_node_from_node( | ||
59 | struct sway_seat *seat, struct sway_node *node); | ||
60 | |||
61 | static void seat_node_destroy(struct sway_seat_node *seat_node) { | 58 | static void seat_node_destroy(struct sway_seat_node *seat_node) { |
62 | wl_list_remove(&seat_node->destroy.link); | 59 | wl_list_remove(&seat_node->destroy.link); |
63 | wl_list_remove(&seat_node->link); | 60 | wl_list_remove(&seat_node->link); |
diff --git a/sway/sway.5.scd b/sway/sway.5.scd index b3d696f2..4a645837 100644 --- a/sway/sway.5.scd +++ b/sway/sway.5.scd | |||
@@ -133,6 +133,10 @@ They are expected to be used with *bindsym* or at runtime through *swaymsg*(1). | |||
133 | *fullscreen* | 133 | *fullscreen* |
134 | Toggles fullscreen for the focused view. | 134 | Toggles fullscreen for the focused view. |
135 | 135 | ||
136 | *gaps* inner|outer all|current set|plus|minus <amount> | ||
137 | Changes the _inner_ or _outer_ gaps for either _all_ workspaces or the | ||
138 | _current_ workspace. | ||
139 | |||
136 | *layout* default|splith|splitv|stacking|tabbed | 140 | *layout* default|splith|splitv|stacking|tabbed |
137 | Sets the layout mode of the focused container. | 141 | Sets the layout mode of the focused container. |
138 | 142 | ||
@@ -364,6 +368,7 @@ The default colors are: | |||
364 | : #000000 | 368 | : #000000 |
365 | : #0c0c0c | 369 | : #0c0c0c |
366 | 370 | ||
371 | |||
367 | *debuglog* on|off|toggle | 372 | *debuglog* on|off|toggle |
368 | Enables, disables or toggles debug logging. _toggle_ cannot be used in the | 373 | Enables, disables or toggles debug logging. _toggle_ cannot be used in the |
369 | configuration file. | 374 | configuration file. |
@@ -433,10 +438,6 @@ The default colors are: | |||
433 | This affects new workspaces only, and is used when the workspace doesn't | 438 | This affects new workspaces only, and is used when the workspace doesn't |
434 | have its own gaps settings (see: workspace <ws> gaps inner|outer <amount>). | 439 | have its own gaps settings (see: workspace <ws> gaps inner|outer <amount>). |
435 | 440 | ||
436 | *gaps* inner|outer all|current set|plus|minus <amount> | ||
437 | Changes the _inner_ or _outer_ gaps for either _all_ workspaces or the | ||
438 | _current_ workspace. | ||
439 | |||
440 | *hide\_edge\_borders* none|vertical|horizontal|both|smart|smart\_no\_gaps | 441 | *hide\_edge\_borders* none|vertical|horizontal|both|smart|smart\_no\_gaps |
441 | Hides window borders adjacent to the screen edges. Default is _none_. | 442 | Hides window borders adjacent to the screen edges. Default is _none_. |
442 | 443 | ||
diff --git a/swaymsg/swaymsg.1.scd b/swaymsg/swaymsg.1.scd index 8cf1b222..eaac8105 100644 --- a/swaymsg/swaymsg.1.scd +++ b/swaymsg/swaymsg.1.scd | |||
@@ -50,6 +50,10 @@ _swaymsg_ [options...] [message] | |||
50 | Gets a JSON-encoded layout tree of all open windows, containers, outputs, | 50 | Gets a JSON-encoded layout tree of all open windows, containers, outputs, |
51 | workspaces, and so on. | 51 | workspaces, and so on. |
52 | 52 | ||
53 | *get\_seats* | ||
54 | Gets a JSON-encoded list of all seats, | ||
55 | its properties and all assigned devices. | ||
56 | |||
53 | *get\_marks* | 57 | *get\_marks* |
54 | Get a JSON-encoded list of marks. | 58 | Get a JSON-encoded list of marks. |
55 | 59 | ||