diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-07-04 20:10:47 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-07-04 20:10:47 +1000 |
commit | f156a25e64736909fd0f33942a0a4dba202c431c (patch) | |
tree | a7821c3dc0f035a85f9d7d21795ea9bc6ce99b28 | |
parent | Merge pull request #2202 from RyanDwyer/fix-focus-damage (diff) | |
download | sway-f156a25e64736909fd0f33942a0a4dba202c431c.tar.gz sway-f156a25e64736909fd0f33942a0a4dba202c431c.tar.zst sway-f156a25e64736909fd0f33942a0a4dba202c431c.zip |
Only call view_set_tiled when switching floating mode
Otherwise it repeatedly sets the view's border to the config's default.
-rw-r--r-- | sway/tree/container.c | 1 | ||||
-rw-r--r-- | sway/tree/view.c | 4 |
2 files changed, 1 insertions, 4 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c index 6f6137c4..d19c857c 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c | |||
@@ -935,6 +935,7 @@ void container_set_floating(struct sway_container *container, bool enable) { | |||
935 | container_add_child(workspace->sway_workspace->floating, container); | 935 | container_add_child(workspace->sway_workspace->floating, container); |
936 | if (container->type == C_VIEW) { | 936 | if (container->type == C_VIEW) { |
937 | view_init_floating(container->sway_view); | 937 | view_init_floating(container->sway_view); |
938 | view_set_tiled(container->sway_view, true); | ||
938 | } | 939 | } |
939 | seat_set_focus(seat, seat_get_focus_inactive(seat, container)); | 940 | seat_set_focus(seat, seat_get_focus_inactive(seat, container)); |
940 | container_reap_empty_recursive(workspace); | 941 | container_reap_empty_recursive(workspace); |
diff --git a/sway/tree/view.c b/sway/tree/view.c index 06e9edc5..c2826f6f 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c | |||
@@ -164,9 +164,6 @@ void view_init_floating(struct sway_view *view) { | |||
164 | view->border_left = view->border_right = true; | 164 | view->border_left = view->border_right = true; |
165 | 165 | ||
166 | container_set_geometry_from_floating_view(view->swayc); | 166 | container_set_geometry_from_floating_view(view->swayc); |
167 | |||
168 | // Don't maximize floating windows | ||
169 | view_set_tiled(view, false); | ||
170 | } | 167 | } |
171 | 168 | ||
172 | void view_autoconfigure(struct sway_view *view) { | 169 | void view_autoconfigure(struct sway_view *view) { |
@@ -278,7 +275,6 @@ void view_autoconfigure(struct sway_view *view) { | |||
278 | view->y = y; | 275 | view->y = y; |
279 | view->width = width; | 276 | view->width = width; |
280 | view->height = height; | 277 | view->height = height; |
281 | view_set_tiled(view, true); | ||
282 | } | 278 | } |
283 | 279 | ||
284 | void view_set_activated(struct sway_view *view, bool activated) { | 280 | void view_set_activated(struct sway_view *view, bool activated) { |