diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-08-02 06:27:05 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-08-02 06:27:05 +0000 |
| commit | cb3c457b8270df540c53400ba999517f919a0121 (patch) | |
| tree | 440b082dd7f154d08b25d178269fc176931ee25c /plugins | |
| parent | 4cd886e5188549ab48a11b70cb40b65efe916b6c (diff) | |
place transients better
Diffstat (limited to 'plugins')
| -rw-r--r-- | plugins/placement/placement.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/placement/placement.c b/plugins/placement/placement.c index d03fb4b3..ea1a21e3 100644 --- a/plugins/placement/placement.c +++ b/plugins/placement/placement.c @@ -56,16 +56,13 @@ static void event(ObEvent *e, void *foo) { g_assert(e->type == Event_Client_New); - /* requested a position */ - if (e->data.c.client->positioned) return; - if (e->data.c.client->transient_for) { if (e->data.c.client->transient_for != OB_TRAN_GROUP) { ObClient *c = e->data.c.client; ObClient *p = e->data.c.client->transient_for; - int x = (c->frame->area.width - p->frame->area.width) / 2 + + int x = (p->frame->area.width - c->frame->area.width) / 2 + p->frame->area.x; - int y = (c->frame->area.height - p->frame->area.height) / 2 + + int y = (p->frame->area.height - c->frame->area.height) / 2 + p->frame->area.y; client_configure(c, OB_CORNER_TOPLEFT, x, y, c->area.width, c->area.height, @@ -104,6 +101,9 @@ static void event(ObEvent *e, void *foo) } } + /* requested a position */ + if (e->data.c.client->positioned) return; + if (!history || !place_history(e->data.c.client)) place_random(e->data.c.client); } |
