only put a transient for the group onto some other desktop if its whole group is over there
This commit is contained in:
parent
e2da966bcb
commit
689157e869
1 changed files with 18 additions and 6 deletions
|
@ -1139,15 +1139,27 @@ static void client_get_desktop(ObClient *self)
|
||||||
self->desktop = self->transient_for->desktop;
|
self->desktop = self->transient_for->desktop;
|
||||||
trdesk = TRUE;
|
trdesk = TRUE;
|
||||||
} else {
|
} else {
|
||||||
|
/* if all the group is on one desktop, then open it on the
|
||||||
|
same desktop */
|
||||||
GSList *it;
|
GSList *it;
|
||||||
|
gboolean first = TRUE;
|
||||||
|
guint all = screen_num_desktops; /* not a valid value */
|
||||||
|
|
||||||
for (it = self->group->members; it; it = g_slist_next(it))
|
for (it = self->group->members; it; it = g_slist_next(it)) {
|
||||||
if (it->data != self &&
|
ObClient *c = it->data;
|
||||||
!((ObClient*)it->data)->transient_for) {
|
if (c != self) {
|
||||||
self->desktop = ((ObClient*)it->data)->desktop;
|
if (first) {
|
||||||
trdesk = TRUE;
|
all = c->desktop;
|
||||||
break;
|
first = FALSE;
|
||||||
|
}
|
||||||
|
else if (all != c->desktop)
|
||||||
|
all = screen_num_desktops; /* make it invalid */
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if (all != screen_num_desktops) {
|
||||||
|
self->desktop = all;
|
||||||
|
trdesk = TRUE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!trdesk) {
|
if (!trdesk) {
|
||||||
|
|
Loading…
Reference in a new issue