diff options
author | 2015-08-17 10:34:39 -0500 | |
---|---|---|
committer | 2015-08-17 10:34:39 -0500 | |
commit | c9ce8bf1bd0f4cfb459bcb7d3ec45429c0a81293 (patch) | |
tree | f9da3981625cd2235961f8efee7c4f3a94649241 /sway | |
parent | Minor fix to do proper floating refocuses (diff) | |
download | sway-c9ce8bf1bd0f4cfb459bcb7d3ec45429c0a81293.tar.gz sway-c9ce8bf1bd0f4cfb459bcb7d3ec45429c0a81293.tar.zst sway-c9ce8bf1bd0f4cfb459bcb7d3ec45429c0a81293.zip |
Style and other minor fixes
Diffstat (limited to 'sway')
-rw-r--r-- | sway/container.c | 4 | ||||
-rw-r--r-- | sway/handlers.c | 12 |
2 files changed, 8 insertions, 8 deletions
diff --git a/sway/container.c b/sway/container.c index 1f93d4dc..231876c5 100644 --- a/sway/container.c +++ b/sway/container.c | |||
@@ -170,8 +170,8 @@ swayc_t *new_floating_view(wlc_handle handle) { | |||
170 | view->width = geometry->size.w; | 170 | view->width = geometry->size.w; |
171 | view->height = geometry->size.h; | 171 | view->height = geometry->size.h; |
172 | 172 | ||
173 | view->desired_width = -1; | 173 | view->desired_width = view->width; |
174 | view->desired_height = -1; | 174 | view->desired_height = view->height; |
175 | 175 | ||
176 | view->is_floating = true; | 176 | view->is_floating = true; |
177 | 177 | ||
diff --git a/sway/handlers.c b/sway/handlers.c index 85df09f7..77e8f237 100644 --- a/sway/handlers.c +++ b/sway/handlers.c | |||
@@ -167,16 +167,16 @@ static void handle_view_geometry_request(wlc_handle handle, const struct wlc_geo | |||
167 | // This will not do anything for the time being as WLC improperly sends geometry requests | 167 | // This will not do anything for the time being as WLC improperly sends geometry requests |
168 | swayc_t *view = get_swayc_for_handle(handle, &root_container); | 168 | swayc_t *view = get_swayc_for_handle(handle, &root_container); |
169 | if (view) { | 169 | if (view) { |
170 | view->desired_width = geometry->size.w; | ||
171 | view->desired_height = geometry->size.h; | ||
172 | |||
170 | if (view->is_floating) { | 173 | if (view->is_floating) { |
171 | view->width = geometry->size.w; | 174 | view->width = view->desired_width; |
172 | view->height = geometry->size.h; | 175 | view->height = view->desired_height; |
173 | view->x = geometry->origin.x; | 176 | view->x = geometry->origin.x; |
174 | view->y = geometry->origin.y; | 177 | view->y = geometry->origin.y; |
175 | arrange_windows(view->parent, -1, -1); | 178 | arrange_windows(view->parent, -1, -1); |
176 | } else { | 179 | } |
177 | view->desired_width = geometry->size.w; | ||
178 | view->desired_height = geometry->size.h; | ||
179 | } | ||
180 | } | 180 | } |
181 | } | 181 | } |
182 | 182 | ||