Merge branch 'master' into patch-1

This commit is contained in:
Arnaud Vallette d'Osia 2018-10-23 08:32:50 +02:00 committed by GitHub
commit db23f95dc8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 19 additions and 10 deletions

View file

@ -94,7 +94,7 @@ static void calculate_constraints(int *min_width, int *max_width,
*min_height = config->floating_minimum_height; *min_height = config->floating_minimum_height;
} }
if (config->floating_maximum_width == -1) { // no maximum if (config->floating_maximum_width == -1 || !con->workspace) { // no max
*max_width = INT_MAX; *max_width = INT_MAX;
} else if (config->floating_maximum_width == 0) { // automatic } else if (config->floating_maximum_width == 0) { // automatic
*max_width = con->workspace->width; *max_width = con->workspace->width;
@ -102,7 +102,7 @@ static void calculate_constraints(int *min_width, int *max_width,
*max_width = config->floating_maximum_width; *max_width = config->floating_maximum_width;
} }
if (config->floating_maximum_height == -1) { // no maximum if (config->floating_maximum_height == -1 || !con->workspace) { // no max
*max_height = INT_MAX; *max_height = INT_MAX;
} else if (config->floating_maximum_height == 0) { // automatic } else if (config->floating_maximum_height == 0) { // automatic
*max_height = con->workspace->height; *max_height = con->workspace->height;

View file

@ -584,13 +584,11 @@ static int detect_brace_on_following_line(FILE *file, char *line,
char *peeked = NULL; char *peeked = NULL;
long position = 0; long position = 0;
do { do {
wlr_log(WLR_DEBUG, "Peeking line %d", line_number + lines + 1);
free(peeked); free(peeked);
peeked = peek_line(file, lines, &position); peeked = peek_line(file, lines, &position);
if (peeked) { if (peeked) {
peeked = strip_whitespace(peeked); peeked = strip_whitespace(peeked);
} }
wlr_log(WLR_DEBUG, "Peeked line: `%s`", peeked);
lines++; lines++;
} while (peeked && strlen(peeked) == 0); } while (peeked && strlen(peeked) == 0);
@ -695,7 +693,6 @@ bool read_config(FILE *file, struct sway_config *config,
free(line); free(line);
return false; return false;
} }
wlr_log(WLR_DEBUG, "Expanded line: %s", expanded);
struct cmd_results *res; struct cmd_results *res;
if (block && strcmp(block, "<commands>") == 0) { if (block && strcmp(block, "<commands>") == 0) {
// Special case // Special case

View file

@ -239,7 +239,7 @@ static bool wants_floating(struct sway_view *view) {
struct wlr_xwayland_surface_size_hints *size_hints = surface->size_hints; struct wlr_xwayland_surface_size_hints *size_hints = surface->size_hints;
if (size_hints != NULL && if (size_hints != NULL &&
size_hints->min_width != 0 && size_hints->min_height != 0 && size_hints->min_width > 0 && size_hints->min_height > 0 &&
(size_hints->max_width == size_hints->min_width || (size_hints->max_width == size_hints->min_width ||
size_hints->max_height == size_hints->min_height)) { size_hints->max_height == size_hints->min_height)) {
return true; return true;

View file

@ -69,7 +69,7 @@ The following commands may only be used in the configuration file.
*swaybg\_command* <command> *swaybg\_command* <command>
Executes custom background _command_. Default is _swaybg_. Refer to Executes custom background _command_. Default is _swaybg_. Refer to
*output* below for more information. *sway-output*(5) for more information.
It can be disabled by setting the command to a single dash: It can be disabled by setting the command to a single dash:
_swaybg\_command -_ _swaybg\_command -_
@ -495,6 +495,12 @@ The default colors are:
Prevents windows matching <criteria> from being focused automatically when Prevents windows matching <criteria> from being focused automatically when
they're created. This has no effect on the first window in a workspace. they're created. This has no effect on the first window in a workspace.
*output* <output\_name> <output-subcommands...>
For details on output subcommands, see *sway-output*(5).
\* may be used in lieu of a specific output name to configure all outputs.
A list of output names may be obtained via *swaymsg -t get\_outputs*.
*popup\_during\_fullscreen* smart|ignore|leave\_fullscreen *popup\_during\_fullscreen* smart|ignore|leave\_fullscreen
Determines what to do when a fullscreen view opens a dialog. Determines what to do when a fullscreen view opens a dialog.
If _smart_ (the default), the dialog will be displayed. If _ignore_, the If _smart_ (the default), the dialog will be displayed. If _ignore_, the
@ -669,4 +675,4 @@ The following attributes may be matched with:
# SEE ALSO # SEE ALSO
*sway*(1) *sway-input*(5) *sway-bar*(5) *sway*(1) *sway-input*(5) *sway-output*(5) *sway-bar*(5)

View file

@ -727,8 +727,14 @@ void container_set_geometry_from_floating_view(struct sway_container *con) {
} }
bool container_is_floating(struct sway_container *container) { bool container_is_floating(struct sway_container *container) {
return !container->parent && container->workspace && if (!container->parent && container->workspace &&
list_find(container->workspace->floating, container) != -1; list_find(container->workspace->floating, container) != -1) {
return true;
}
if (container->scratchpad) {
return true;
}
return false;
} }
void container_get_box(struct sway_container *container, struct wlr_box *box) { void container_get_box(struct sway_container *container, struct wlr_box *box) {