]> Dogcows Code - chaz/openbox/blobdiff - plugins/placement/placement.c
make the shadow offset 1
[chaz/openbox] / plugins / placement / placement.c
index 58c29a480039fc4d3469dd67a1ab29475832766f..8a5d995a620735ad2ee33ef992cd76d792ad0e95 100644 (file)
@@ -8,7 +8,7 @@
 
 gboolean history = TRUE;
 
-void place_random(Client *c)
+static void place_random(Client *c)
 {
     int l, r, t, b;
     int x, y;
@@ -31,19 +31,22 @@ void place_random(Client *c)
                      TRUE, TRUE);
 }
 
-void place_event(ObEvent *e, void *foo)
+static void event(ObEvent *e, void *foo)
 {
     g_assert(e->type == Event_Client_New);
 
     if (ob_state == State_Starting) return;
 
+    /* requested a position */
+    if (e->data.c.client->positioned) return;
+
     if (!place_history(e->data.c.client))
         place_random(e->data.c.client);
 }
 
 void plugin_startup()
 {
-    dispatch_register(Event_Client_New, (EventHandler)place_event, NULL);
+    dispatch_register(Event_Client_New, (EventHandler)event, NULL);
 
     history_startup();
 }
This page took 0.023307 seconds and 4 git commands to generate.