Style and other minor fixes

This commit is contained in:
Luminarys 2015-08-17 10:34:39 -05:00
parent 3f475f5009
commit c9ce8bf1bd
3 changed files with 12 additions and 12 deletions

View file

@ -170,8 +170,8 @@ swayc_t *new_floating_view(wlc_handle handle) {
view->width = geometry->size.w; view->width = geometry->size.w;
view->height = geometry->size.h; view->height = geometry->size.h;
view->desired_width = -1; view->desired_width = view->width;
view->desired_height = -1; view->desired_height = view->height;
view->is_floating = true; view->is_floating = true;

View file

@ -167,15 +167,15 @@ static void handle_view_geometry_request(wlc_handle handle, const struct wlc_geo
// This will not do anything for the time being as WLC improperly sends geometry requests // This will not do anything for the time being as WLC improperly sends geometry requests
swayc_t *view = get_swayc_for_handle(handle, &root_container); swayc_t *view = get_swayc_for_handle(handle, &root_container);
if (view) { if (view) {
view->desired_width = geometry->size.w;
view->desired_height = geometry->size.h;
if (view->is_floating) { if (view->is_floating) {
view->width = geometry->size.w; view->width = view->desired_width;
view->height = geometry->size.h; view->height = view->desired_height;
view->x = geometry->origin.x; view->x = geometry->origin.x;
view->y = geometry->origin.y; view->y = geometry->origin.y;
arrange_windows(view->parent, -1, -1); arrange_windows(view->parent, -1, -1);
} else {
view->desired_width = geometry->size.w;
view->desired_height = geometry->size.h;
} }
} }
} }