dont put windows below by default

This commit is contained in:
Dana Jansens 2003-10-13 03:47:52 +00:00
parent 420e6f87a6
commit 2bf58d8fb3

View file

@ -851,15 +851,14 @@ static void client_get_state(ObClient *self)
} }
if (!(self->above || self->below)) { if (!(self->above || self->below)) {
if (client_has_group_siblings(self)) { if (self->group) {
/* apply stuff from the group */ /* apply stuff from the group */
GSList *it; GSList *it;
gint layer = -1; gint layer = -2;
for (it = self->group->members; it; it = g_slist_next(it)) { for (it = self->group->members; it; it = g_slist_next(it)) {
ObClient *c = it->data; ObClient *c = it->data;
if (c != self && !client_search_transient(self, c) && if (c != self && !client_search_transient(self, c))
client_normal(c) == client_normal(self))
{ {
layer = MAX(layer, layer = MAX(layer,
(c->above ? 1 : (c->below ? -1 : 0))); (c->above ? 1 : (c->below ? -1 : 0)));
@ -869,6 +868,7 @@ static void client_get_state(ObClient *self)
case -1: case -1:
self->below = TRUE; self->below = TRUE;
break; break;
case -2:
case 0: case 0:
break; break;
case 1: case 1:
@ -1096,6 +1096,9 @@ void client_update_normal_hints(ObClient *self)
/* get the hints from the window */ /* get the hints from the window */
if (XGetWMNormalHints(ob_display, self->window, &size, &ret)) { if (XGetWMNormalHints(ob_display, self->window, &size, &ret)) {
/* normal windows can't request placement! har har
if (!client_normal(self))
*/
self->positioned = !!(size.flags & (PPosition|USPosition)); self->positioned = !!(size.flags & (PPosition|USPosition));
if (size.flags & PWinGravity) { if (size.flags & PWinGravity) {
@ -1796,13 +1799,32 @@ void client_calc_layer(ObClient *self)
gboolean client_should_show(ObClient *self) gboolean client_should_show(ObClient *self)
{ {
if (self->iconic) return FALSE; if (self->iconic)
else if (!(self->desktop == screen_desktop || return FALSE;
self->desktop == DESKTOP_ALL)) return FALSE; if (client_normal(self) && screen_showing_desktop)
else if (client_normal(self) && screen_showing_desktop) return FALSE; return FALSE;
/*
if (self->transient_for) {
if (self->transient_for != OB_TRAN_GROUP)
return client_should_show(self->transient_for);
else {
GSList *it;
for (it = self->group->members; it; it = g_slist_next(it)) {
ObClient *c = it->data;
if (c != self && !c->transient_for) {
if (client_should_show(c))
return TRUE; return TRUE;
} }
}
}
}
*/
if (self->desktop == screen_desktop || self->desktop == DESKTOP_ALL)
return TRUE;
return FALSE;
}
static void client_showhide(ObClient *self) static void client_showhide(ObClient *self)
{ {