X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fscreen.c;h=82e51f4b04c3787b27255c7c7c443b030a63d6e3;hb=4502cad55033f4a703cb562d27d637f41a05c5c6;hp=01cca6539536d467ee5397cc9c59a3681c5acbee;hpb=d4601cd0348caa9fdb7643a99f025dddbe5a34c9;p=chaz%2Fopenbox diff --git a/openbox/screen.c b/openbox/screen.c index 01cca653..82e51f4b 100644 --- a/openbox/screen.c +++ b/openbox/screen.c @@ -377,24 +377,16 @@ void screen_update_desktop_names() void screen_show_desktop(gboolean show) { GList *it; - static Window saved_focus = 0; if (show == screen_showing_desktop) return; /* no change */ - /* save the window focus, and restore it when leaving the show-desktop - mode */ - if (show && focus_client) - saved_focus = focus_client->window; - screen_showing_desktop = show; if (show) { /* bottom to top */ for (it = g_list_last(stacking_list); it != NULL; it = it->prev) { Client *client = it->data; - if (client->type == Type_Desktop) - client_focus(client); - else if (client->frame->visible && !client_should_show(client)) + if (client->frame->visible && !client_should_show(client)) engine_frame_hide(client->frame); } } else { @@ -406,15 +398,6 @@ void screen_show_desktop(gboolean show) } } - if (!show) { - Client *f = focus_client; - if (!f || f->type == Type_Desktop) { - Client *c = g_hash_table_lookup(client_map, - (gpointer)saved_focus); - if (c) client_focus(c); - } - } - show = !!show; /* make it boolean */ PROP_SET32(ob_root, net_showing_desktop, cardinal, show); @@ -449,7 +432,7 @@ void screen_update_struts() g_free(strut); strut = g_new0(Strut, screen_num_desktops + 1); - for (it = client_list; it; it = it->next) { + for (it = client_list; it != NULL; it = it->next) { Client *c = it->data; if (c->iconic) continue; /* these dont count in the strut */