Merge branch 'master' into effective-damage

This commit is contained in:
Drew DeVault 2018-11-05 21:21:47 +01:00 committed by GitHub
commit 25bea8f6a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 29 additions and 16 deletions

View file

@ -16,4 +16,5 @@ complete -c swaymsg -s t -l type -fra 'get_bar_config' --description "Get a JSON
complete -c swaymsg -s t -l type -fra 'get_version' --description "Get JSON-encoded version information for the running instance of sway."
complete -c swaymsg -s t -l type -fra 'get_binding_modes' --description "Gets a JSON-encoded list of currently configured binding modes."
complete -c swaymsg -s t -l type -fra 'get_config' --description "Gets a JSON-encoded copy of the current configuration."
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."
complete -c swaymsg -s t -l type -fra 'send_tick' --description "Sends a tick event to all subscribed clients."

View file

@ -15,7 +15,7 @@
struct cmd_results *cmd_exec_always(int argc, char **argv) {
struct cmd_results *error = NULL;
if (!config->active) return cmd_results_new(CMD_DEFER, NULL, NULL);
if (!config->active || config->validating) return cmd_results_new(CMD_DEFER, NULL, NULL);
if ((error = checkarg(argc, argv[-1], EXPECTED_AT_LEAST, 1))) {
return error;
}

View file

@ -156,6 +156,14 @@ static struct sway_node *node_get_in_direction(struct sway_container *container,
if (new_output) {
return get_node_in_output_direction(new_output, dir);
}
// If there is a wrap candidate, return its focus inactive view
if (wrap_candidate) {
struct sway_container *wrap_inactive = seat_get_focus_inactive_view(
seat, &wrap_candidate->node);
return &wrap_inactive->node;
}
return NULL;
}

View file

@ -149,16 +149,17 @@ struct cmd_results *cmd_gaps(int argc, char **argv) {
return error;
}
bool config_loading = !config->active || config->reloading;
if (argc == 2) {
return gaps_set_defaults(argc, argv);
}
if (argc == 4) {
if (config->active) {
return gaps_set_runtime(argc, argv);
} else {
return cmd_results_new(CMD_INVALID, "gaps",
"This syntax can only be used when sway is running");
}
if (argc == 4 && !config_loading) {
return gaps_set_runtime(argc, argv);
}
if (config_loading) {
return cmd_results_new(CMD_INVALID, "gaps",
"Expected 'gaps inner|outer <px>'");
}
return cmd_results_new(CMD_INVALID, "gaps",
"Expected 'gaps inner|outer <px>' or "

View file

@ -389,7 +389,8 @@ bool load_main_config(const char *file, bool is_active, bool validating) {
config_defaults(config);
config->validating = validating;
if (is_active) {
wlr_log(WLR_DEBUG, "Performing configuration file reload");
wlr_log(WLR_DEBUG, "Performing configuration file %s",
validating ? "validation" : "reload");
config->reloading = true;
config->active = true;

View file

@ -55,9 +55,6 @@ void seat_destroy(struct sway_seat *seat) {
free(seat);
}
static struct sway_seat_node *seat_node_from_node(
struct sway_seat *seat, struct sway_node *node);
static void seat_node_destroy(struct sway_seat_node *seat_node) {
wl_list_remove(&seat_node->destroy.link);
wl_list_remove(&seat_node->link);

View file

@ -133,6 +133,10 @@ They are expected to be used with *bindsym* or at runtime through *swaymsg*(1).
*fullscreen*
Toggles fullscreen for the focused view.
*gaps* inner|outer all|current set|plus|minus <amount>
Changes the _inner_ or _outer_ gaps for either _all_ workspaces or the
_current_ workspace.
*layout* default|splith|splitv|stacking|tabbed
Sets the layout mode of the focused container.
@ -364,6 +368,7 @@ The default colors are:
: #000000
: #0c0c0c
*debuglog* on|off|toggle
Enables, disables or toggles debug logging. _toggle_ cannot be used in the
configuration file.
@ -433,10 +438,6 @@ The default colors are:
This affects new workspaces only, and is used when the workspace doesn't
have its own gaps settings (see: workspace <ws> gaps inner|outer <amount>).
*gaps* inner|outer all|current set|plus|minus <amount>
Changes the _inner_ or _outer_ gaps for either _all_ workspaces or the
_current_ workspace.
*hide\_edge\_borders* none|vertical|horizontal|both|smart|smart\_no\_gaps
Hides window borders adjacent to the screen edges. Default is _none_.

View file

@ -50,6 +50,10 @@ _swaymsg_ [options...] [message]
Gets a JSON-encoded layout tree of all open windows, containers, outputs,
workspaces, and so on.
*get\_seats*
Gets a JSON-encoded list of all seats,
its properties and all assigned devices.
*get\_marks*
Get a JSON-encoded list of marks.