not everything in the stacking_list is a client anymore

This commit is contained in:
Dana Jansens 2003-05-11 20:19:00 +00:00
parent 81cc0749f8
commit 7e9ad37587

View file

@ -296,17 +296,21 @@ void screen_set_desktop(guint num)
/* show windows from top to bottom */ /* show windows from top to bottom */
for (it = stacking_list; it != NULL; it = it->next) { for (it = stacking_list; it != NULL; it = it->next) {
if (WINDOW_IS_CLIENT(it->data)) {
Client *c = it->data; Client *c = it->data;
if (!c->frame->visible && client_should_show(c)) if (!c->frame->visible && client_should_show(c))
frame_show(c->frame); frame_show(c->frame);
} }
}
/* hide windows from bottom to top */ /* hide windows from bottom to top */
for (it = g_list_last(stacking_list); it != NULL; it = it->prev) { for (it = g_list_last(stacking_list); it != NULL; it = it->prev) {
if (WINDOW_IS_CLIENT(it->data)) {
Client *c = it->data; Client *c = it->data;
if (c->frame->visible && !client_should_show(c)) if (c->frame->visible && !client_should_show(c))
frame_hide(c->frame); frame_hide(c->frame);
} }
}
/* focus the last focused window on the desktop, and ignore enter events /* focus the last focused window on the desktop, and ignore enter events
from the switch so it doesnt mess with the focus */ from the switch so it doesnt mess with the focus */
@ -418,18 +422,22 @@ void screen_show_desktop(gboolean show)
if (show) { if (show) {
/* bottom to top */ /* bottom to top */
for (it = g_list_last(stacking_list); it != NULL; it = it->prev) { for (it = g_list_last(stacking_list); it != NULL; it = it->prev) {
if (WINDOW_IS_CLIENT(it->data)) {
Client *client = it->data; Client *client = it->data;
if (client->frame->visible && !client_should_show(client)) if (client->frame->visible && !client_should_show(client))
frame_hide(client->frame); frame_hide(client->frame);
} }
}
} else { } else {
/* top to bottom */ /* top to bottom */
for (it = stacking_list; it != NULL; it = it->next) { for (it = stacking_list; it != NULL; it = it->next) {
if (WINDOW_IS_CLIENT(it->data)) {
Client *client = it->data; Client *client = it->data;
if (!client->frame->visible && client_should_show(client)) if (!client->frame->visible && client_should_show(client))
frame_show(client->frame); frame_show(client->frame);
} }
} }
}
if (show) { if (show) {
/* focus desktop */ /* focus desktop */