diff options
| author | Mikael Magnusson <mikachu@comhem.se> | 2006-08-21 20:39:42 +0000 |
|---|---|---|
| committer | Mikael Magnusson <mikachu@comhem.se> | 2006-08-21 20:39:42 +0000 |
| commit | c234ed9ecd9d5228744aae018768ff0c04f2d217 (patch) | |
| tree | 650452f2936c8356a52b6f424975e80dcac2e18f /openbox/place.c | |
| parent | 997a68aaaec3e72b56ab0b8da0e1800fd5984c4f (diff) | |
maybe fix transients placed offscreen under certain conditions
Diffstat (limited to 'openbox/place.c')
| -rw-r--r-- | openbox/place.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/openbox/place.c b/openbox/place.c index 95763d06..a76086e0 100644 --- a/openbox/place.c +++ b/openbox/place.c @@ -412,21 +412,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; } |
