X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=openbox%2Fplace.c;h=6669a28e4c5fa42723c064e3acb527ed2c8f5ffc;hb=5648f0d75c22c817c740a9345e50dfd2ac2f6ffc;hp=a098921d8792bd1b0a0e4a737a7df8109cac14c8;hpb=bdf5d409e5c10cc4b37658491ccbba75978c5141;p=chaz%2Fopenbox diff --git a/openbox/place.c b/openbox/place.c index a098921d..6669a28e 100644 --- a/openbox/place.c +++ b/openbox/place.c @@ -324,9 +324,9 @@ static gboolean place_under_mouse(ObClient *client, gint *x, gint *y) b = area->y + area->height - client->frame->area.height; *x = px - client->area.width / 2 - client->frame->size.left; -// *x = MIN(MAX(*x, l), r); + *x = MIN(MAX(*x, l), r); *y = py - client->area.height / 2 - client->frame->size.top; -// *y = MIN(MAX(*y, t), b); + *y = MIN(MAX(*y, t), b); return TRUE; } @@ -375,9 +375,8 @@ static gboolean place_transient(ObClient *client, gint *x, gint *y) void place_client(ObClient *client, gint *x, gint *y) { - gint rude = 1; if (client->positioned) - rude = 0; + return; if (place_transient(client, x, y) || ((config_place_policy == OB_PLACE_POLICY_MOUSE) ? place_under_mouse(client, x, y) : @@ -386,15 +385,6 @@ void place_client(ObClient *client, gint *x, gint *y) place_smart(client, x, y, SMART_FOCUSED) || place_random(client, x, y))) { - /* make sure the window is visible. */ - client_find_onscreen(client, x, y, - client->frame->area.width, - client->frame->area.height, - /* non-normal clients has less rules, and - windows that are being restored from a session - do also. we can assume you want it back where - you saved it */ - client_normal(client) && !client->session); /* get where the client should be */ frame_frame_gravity(client->frame, x, y); } else