diff options
| author | Dana Jansens <danakj@orodu.net> | 2008-01-31 12:36:06 -0500 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2008-01-31 12:51:38 -0500 |
| commit | 20b8fcfa33feeade5946bc7f3046705da5d164fe (patch) | |
| tree | 5199d13a9f18aa90ce51244c3c3eb6685d7673ab /openbox/place.c | |
| parent | dc94a241c30484611688a8bfb5515577f017529e (diff) | |
| parent | d11ac82062d729be5d63c9c40c5c2bb312a8b8f1 (diff) | |
Merge branch 'backport' into work
Conflicts:
openbox/client.c
openbox/config.c
openbox/event.c
openbox/extensions.c
openbox/focus_cycle_indicator.c
openbox/focus_cycle_popup.c
openbox/menuframe.c
openbox/moveresize.c
openbox/openbox.c
openbox/screen.c
openbox/stacking.c
openbox/startupnotify.c
Diffstat (limited to 'openbox/place.c')
| -rw-r--r-- | openbox/place.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/openbox/place.c b/openbox/place.c index 058bbfbe..81fb9752 100644 --- a/openbox/place.c +++ b/openbox/place.c @@ -108,7 +108,10 @@ static Rect **pick_head(ObClient *c) } } - if (focus_client && client_normal(focus_client)) { + /* skip this if placing by the mouse position */ + if (focus_client && client_normal(focus_client) && + config_place_monitor != OB_PLACE_MONITOR_MOUSE) + { add_choice(choice, client_monitor(focus_client)); ob_debug("placement adding choice %d for normal focused window\n", client_monitor(focus_client)); @@ -146,7 +149,8 @@ static gboolean place_random(ObClient *client, gint *x, gint *y) guint i; areas = pick_head(client); - i = config_place_active ? 0 : g_random_int_range(0, screen_num_monitors); + i = (config_place_monitor != OB_PLACE_MONITOR_ANY) ? + 0 : g_random_int_range(0, screen_num_monitors); l = areas[i]->x; t = areas[i]->y; @@ -255,9 +259,9 @@ static gboolean place_nooverlap(ObClient *c, gint *x, gint *y) /* try ignoring different things to find empty space */ for (ignore = 0; ignore < IGNORE_END && !ret; ignore++) { /* try all monitors in order of preference, but only the first one - if config_place_active is true */ - for (i = 0; (i < (config_place_active ? 1 : screen_num_monitors) && - !ret); ++i) + if config_place_monitor is MOUSE or ACTIVE */ + for (i = 0; (i < (config_place_monitor != OB_PLACE_MONITOR_ANY ? + 1 : screen_num_monitors) && !ret); ++i) { GList *it; |
