b = areas[i]->y + areas[i]->height - client->frame->area.height;
if (r > l) *x = g_random_int_range(l, r + 1);
- else *x = 0;
+ else *x = areas[i]->x;
if (b > t) *y = g_random_int_range(t, b + 1);
- else *y = 0;
+ else *y = areas[i]->y;
g_free(areas);
if (WINDOW_IS_CLIENT(it->data)) {
c = it->data;
- if (c->fullscreen)
+ if (c->fullscreen || (c->max_vert && c->max_horz))
continue;
} else
continue;
if (WINDOW_IS_CLIENT(it->data)) {
c = it->data;
- if (c->fullscreen)
+ if (c->fullscreen || (c->max_vert && c->max_horz))
continue;
} else
continue;
place_random(client, x, y))))
g_assert_not_reached(); /* the last one better succeed */
/* get where the client should be */
- frame_frame_gravity(client->frame, x, y);
+ frame_frame_gravity(client->frame, x, y,
+ client->area.width, client->area.height);
return ret;
}