]> Dogcows Code - chaz/openbox/commitdiff
test + not wrong
authorMikael Magnusson <mikachu@comhem.se>
Sun, 6 Feb 2005 01:54:21 +0000 (01:54 +0000)
committerMikael Magnusson <mikachu@comhem.se>
Sun, 6 Feb 2005 01:54:21 +0000 (01:54 +0000)
openbox/place.c

index a098921d8792bd1b0a0e4a737a7df8109cac14c8..29d58734c6601ada8d9814755779aa320770ae06 100644 (file)
@@ -375,10 +375,13 @@ static gboolean place_transient(ObClient *client, gint *x, gint *y)
 
 void place_client(ObClient *client, gint *x, gint *y)
 {
-    gint rude = 1;
+   /* 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 */
+    gint rude = client_normal(client) && !client->session;
     if (client->positioned)
         rude = 0;
-    if (place_transient(client, x, y)             ||
+    else if (place_transient(client, x, y)             ||
         ((config_place_policy == OB_PLACE_POLICY_MOUSE) ?
          place_under_mouse(client, x, y) :
          place_smart(client, x, y, SMART_FULL)    ||
@@ -386,17 +389,13 @@ 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
         g_assert_not_reached(); /* the last one better succeed */
+    /* make sure the window is visible. */
+    client_find_onscreen(client, x, y,
+                         client->frame->area.width,
+                         client->frame->area.height,
+                         rude);
 }
This page took 0.023764 seconds and 4 git commands to generate.