IGNORE_FULLSCREEN = 1 << 0,
IGNORE_MAXIMIZED = 1 << 1,
IGNORE_MENUTOOL = 1 << 2,
- IGNORE_SHADED = 1 << 3,
- IGNORE_NONGROUP = 1 << 4,
- IGNORE_BELOW = 1 << 5,
+ /*IGNORE_SHADED = 1 << 3,*/
+ IGNORE_NONGROUP = 1 << 3,
+ IGNORE_BELOW = 1 << 4,
+ IGNORE_NONFOCUS = 1 << 5,
IGNORE_END = 1 << 6
};
/* try all monitors in order of preference */
for (i = 0; i < screen_num_monitors && !ret; ++i) {
+ GList *it;
+
/* add the whole monitor */
spaces = area_add(spaces, areas[i]);
/* go thru all the windows */
- for (sit = client_list; sit; sit = g_slist_next(sit)) {
- ObClient *test = sit->data;
+ for (it = client_list; it; it = g_list_next(it)) {
+ ObClient *test = it->data;
/* should we ignore this client? */
if (screen_showing_desktop) continue;
(test->type == OB_CLIENT_TYPE_MENU ||
test->type == OB_CLIENT_TYPE_TOOLBAR) &&
client_has_parent(c)) continue;
+ /*
if ((ignore & IGNORE_SHADED) &&
test->shaded) continue;
+ */
if ((ignore & IGNORE_NONGROUP) &&
- client_has_group_siblings(test) &&
+ client_has_group_siblings(c) &&
test->group != c->group) continue;
if ((ignore & IGNORE_BELOW) &&
test->layer < c->layer) continue;
+ if ((ignore & IGNORE_NONFOCUS) &&
+ focus_client != test) continue;
/* don't ignore this window, so remove it from the available
area */
gint px, py;
Rect *area;
+ if (!screen_pointer_pos(&px, &py))
+ return FALSE;
area = pick_pointer_head(client);
- screen_pointer_pos(&px, &py);
l = area->x;
t = area->y;
(config_place_policy == OB_PLACE_POLICY_MOUSE &&
place_under_mouse(client, x, y)) ||
place_nooverlap(client, x, y) ||
+ place_under_mouse(client, x, y) ||
place_random(client, x, y);
g_assert(ret);