Skip to content

Commit

Permalink
Only call view_set_tiled when switching floating mode
Browse files Browse the repository at this point in the history
Otherwise it repeatedly sets the view's border to the config's default.
  • Loading branch information
RyanDwyer committed Jul 4, 2018
1 parent 4afa18a commit f156a25
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
1 change: 1 addition & 0 deletions sway/tree/container.c
Original file line number Diff line number Diff line change
Expand Up @@ -935,6 +935,7 @@ void container_set_floating(struct sway_container *container, bool enable) {
container_add_child(workspace->sway_workspace->floating, container);
if (container->type == C_VIEW) {
view_init_floating(container->sway_view);
view_set_tiled(container->sway_view, true);
}
seat_set_focus(seat, seat_get_focus_inactive(seat, container));
container_reap_empty_recursive(workspace);
Expand Down
4 changes: 0 additions & 4 deletions sway/tree/view.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,6 @@ void view_init_floating(struct sway_view *view) {
view->border_left = view->border_right = true;

container_set_geometry_from_floating_view(view->swayc);

// Don't maximize floating windows
view_set_tiled(view, false);
}

void view_autoconfigure(struct sway_view *view) {
Expand Down Expand Up @@ -278,7 +275,6 @@ void view_autoconfigure(struct sway_view *view) {
view->y = y;
view->width = width;
view->height = height;
view_set_tiled(view, true);
}

void view_set_activated(struct sway_view *view, bool activated) {
Expand Down

0 comments on commit f156a25

Please sign in to comment.