]> Dogcows Code - chaz/openbox/blobdiff - openbox/place.c
ratios are floats
[chaz/openbox] / openbox / place.c
index 66f367d4d9fbf45372c8cfdfb4d1affb67b8d64c..c30a27f947776eef381f5fd473f0ff4b2fb4b7ca 100644 (file)
@@ -217,11 +217,11 @@ enum {
     IGNORE_FULLSCREEN = 1 << 0,
     IGNORE_MAXIMIZED  = 1 << 1,
     IGNORE_MENUTOOL   = 1 << 2,
-    IGNORE_SHADED     = 1 << 3,
-    IGNORE_NONGROUP   = 1 << 4,
-    IGNORE_BELOW      = 1 << 5,
-    IGNORE_NONFOCUS   = 1 << 6,
-    IGNORE_END        = 1 << 7
+    /*IGNORE_SHADED     = 1 << 3,*/
+    IGNORE_NONGROUP   = 1 << 3,
+    IGNORE_BELOW      = 1 << 4,
+    IGNORE_NONFOCUS   = 1 << 5,
+    IGNORE_END        = 1 << 6
 };
 
 static gboolean place_nooverlap(ObClient *c, gint *x, gint *y)
@@ -275,10 +275,12 @@ static gboolean place_nooverlap(ObClient *c, gint *x, gint *y)
                     (test->type == OB_CLIENT_TYPE_MENU ||
                      test->type == OB_CLIENT_TYPE_TOOLBAR) &&
                     client_has_parent(c)) continue;
+                /*
                 if ((ignore & IGNORE_SHADED) &&
                     test->shaded) continue;
+                */
                 if ((ignore & IGNORE_NONGROUP) &&
-                    client_has_group_siblings(test) &&
+                    client_has_group_siblings(c) &&
                     test->group != c->group) continue;
                 if ((ignore & IGNORE_BELOW) &&
                     test->layer < c->layer) continue;
@@ -328,8 +330,9 @@ static gboolean place_under_mouse(ObClient *client, gint *x, gint *y)
     gint px, py;
     Rect *area;
 
+    if (!screen_pointer_pos(&px, &py))
+        return FALSE;
     area = pick_pointer_head(client);
-    screen_pointer_pos(&px, &py);
 
     l = area->x;
     t = area->y;
@@ -447,6 +450,7 @@ gboolean place_client(ObClient *client, gint *x, gint *y,
         (config_place_policy == OB_PLACE_POLICY_MOUSE &&
          place_under_mouse(client, x, y)) ||
         place_nooverlap(client, x, y) ||
+        place_under_mouse(client, x, y) ||
         place_random(client, x, y);
     g_assert(ret);
 
This page took 0.026432 seconds and 4 git commands to generate.