X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fopenbox;a=blobdiff_plain;f=openbox%2Fplace_overlap.c;h=5cca1bc2d74647871b0db4c7aca618d3a59e27ff;hp=ef73bd8d906d2f754fbcb26da882d9fe2b9379c9;hb=f6fb70a4b95d0289aa642bc4c2dd0fba31511e94;hpb=782b2864b1cc5ffab426dfb784a973576a98de18 diff --git a/openbox/place_overlap.c b/openbox/place_overlap.c index ef73bd8d..5cca1bc2 100644 --- a/openbox/place_overlap.c +++ b/openbox/place_overlap.c @@ -43,33 +43,33 @@ void place_overlap_find_least_placement(const Rect* client_rects, int overlap = G_MAXINT; int max_edges = 2 * (n_client_rects + 1); - int x_edges[max_edges]; - int y_edges[max_edges]; - make_grid(client_rects, n_client_rects, bound, - x_edges, y_edges, max_edges); - int i; - for (i = 0; i < max_edges; ++i) { - if (x_edges[i] == G_MAXINT) - break; - int j; - for (j = 0; j < max_edges; ++j) { - if (y_edges[j] == G_MAXINT) - break; - Point grid_point = {.x = x_edges[i], .y = y_edges[j]}; - Point best_top_left; - int this_overlap = - best_direction(&grid_point, client_rects, n_client_rects, - bound, req_size, &best_top_left); - if (this_overlap < overlap) { - overlap = this_overlap; - *result = best_top_left; - } - if (overlap == 0) - break; - } - if (overlap == 0) - break; - } + int x_edges[max_edges]; + int y_edges[max_edges]; + make_grid(client_rects, n_client_rects, bound, + x_edges, y_edges, max_edges); + int i; + for (i = 0; i < max_edges; ++i) { + if (x_edges[i] == G_MAXINT) + break; + int j; + for (j = 0; j < max_edges; ++j) { + if (y_edges[j] == G_MAXINT) + break; + Point grid_point = {.x = x_edges[i], .y = y_edges[j]}; + Point best_top_left; + int this_overlap = + best_direction(&grid_point, client_rects, n_client_rects, + bound, req_size, &best_top_left); + if (this_overlap < overlap) { + overlap = this_overlap; + *result = best_top_left; + } + if (overlap == 0) + break; + } + if (overlap == 0) + break; + } } static int compare_ints(const void* a, const void* b)