]> Dogcows Code - chaz/openbox/blobdiff - openbox/place.c
maybe this makes everyone happy, only select first entry in menus if it's not a subme...
[chaz/openbox] / openbox / place.c
index a098921d8792bd1b0a0e4a737a7df8109cac14c8..6669a28e4c5fa42723c064e3acb527ed2c8f5ffc 100644 (file)
@@ -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
This page took 0.024137 seconds and 4 git commands to generate.