X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=openbox%2Fplace.c;h=071e44be0ca163551f65197a3f6efd0c3e93365e;hb=1fbc70da580b94dfcfe1a8549ed512eb02c5b73a;hp=95763d06341ea57c5c21f780183867c5dfd2f003;hpb=f07b18cf3a9d5be1445f6aac9f1380da374fa7f4;p=chaz%2Fopenbox diff --git a/openbox/place.c b/openbox/place.c index 95763d06..071e44be 100644 --- a/openbox/place.c +++ b/openbox/place.c @@ -1,6 +1,7 @@ /* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*- place.c for the Openbox window manager + Copyright (c) 2006 Mikael Magnusson Copyright (c) 2003 Ben Jansens This program is free software; you can redistribute it and/or modify @@ -412,21 +413,24 @@ static gboolean place_transient(ObClient *client, gint *x, gint *y) return FALSE; } -void place_client(ObClient *client, gint *x, gint *y, ObAppSettings *settings) +/* Return TRUE if we want client.c to enforce on-screen-keeping */ +gboolean place_client(ObClient *client, gint *x, gint *y, ObAppSettings *settings) { + gboolean ret = FALSE; if (client->positioned) - return; - if (place_transient(client, x, y) || + return FALSE; + if (place_transient(client, x, y)) + ret = TRUE; + else if (!( place_per_app_setting(client, x, y, settings) || ((config_place_policy == OB_PLACE_POLICY_MOUSE) ? place_under_mouse(client, x, y) : place_smart(client, x, y, SMART_FULL) || place_smart(client, x, y, SMART_GROUP) || place_smart(client, x, y, SMART_FOCUSED) || - place_random(client, x, y))) - { - /* get where the client should be */ - frame_frame_gravity(client->frame, x, y); - } else + place_random(client, x, y)))) g_assert_not_reached(); /* the last one better succeed */ + /* get where the client should be */ + frame_frame_gravity(client->frame, x, y); + return ret; }