- 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, monitor,
+ 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,
+ monitor, req_size, &best_top_left);
+ if (this_overlap < overlap) {
+ overlap = this_overlap;
+ *result = best_top_left;
+ }
+ if (overlap == 0)
+ break;
+ }
+ if (overlap == 0)
+ break;
+ }