Merge remote-tracking branch 'upstream/master'

This commit is contained in:
TheAvidDev 2020-10-26 10:39:46 -04:00
commit bc63517ed4
3 changed files with 7 additions and 3 deletions

View file

@ -537,7 +537,8 @@ static struct cmd_results *cmd_move_container(bool no_auto_back_and_forth,
struct sway_node *focus = seat_get_focus(seat);
// move container
if (container->scratchpad) {
if (container_is_scratchpad_hidden_or_child(container)) {
container_detach(container);
root_scratchpad_show(container);
}
switch (destination->type) {

View file

@ -1359,7 +1359,9 @@ void container_detach(struct sway_container *child) {
// We may have removed the last tiling child from the workspace. If the
// workspace layout was e.g. tabbed, then at this point it may be just
// H[]. So, reset it to the default (e.g. T[]) for next time.
if (!old_workspace->tiling->length) {
// But if we are evacuating a workspace with only sticky floating
// containers, the workspace will already be detached from the output.
if (old_workspace->output && !old_workspace->tiling->length) {
old_workspace->layout =
output_get_default_layout(old_workspace->output);
}

View file

@ -280,7 +280,8 @@ void view_autoconfigure(struct sway_view *view) {
(config->hide_edge_borders_smart == ESMART_NO_GAPS &&
!gaps_to_edge(view));
if (smart) {
bool show_border = !view_is_only_visible(view);
bool show_border = container_is_floating_or_child(con) ||
!view_is_only_visible(view);
con->border_left &= show_border;
con->border_right &= show_border;
con->border_top &= show_border;