diff options
| author | Dana Jansens <danakj@orodu.net> | 2007-05-10 23:22:54 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2007-05-10 23:22:54 +0000 |
| commit | 65d50861ada11f5409680de285f461f16e78c090 (patch) | |
| tree | 0850867dcb8aff31daecfffff634abeb71e48570 /openbox/screen.c | |
| parent | 3537e50141f7bd38012e08b68b43d76a146e83dc (diff) | |
when un-showing the desktop if a window is getting shown, iconify the others so just the one is shown
Diffstat (limited to 'openbox/screen.c')
| -rw-r--r-- | openbox/screen.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/openbox/screen.c b/openbox/screen.c index dddb788f..3819a3b1 100644 --- a/openbox/screen.c +++ b/openbox/screen.c @@ -906,7 +906,7 @@ void screen_update_desktop_names() screen_num_desktops); } -void screen_show_desktop(gboolean show, gboolean restore_focus) +void screen_show_desktop(gboolean show, ObClient *show_only) { GList *it; @@ -915,19 +915,25 @@ void screen_show_desktop(gboolean show, gboolean restore_focus) screen_showing_desktop = show; if (show) { - /* bottom to top */ + /* hide windows bottom to top */ for (it = g_list_last(stacking_list); it; it = g_list_previous(it)) { if (WINDOW_IS_CLIENT(it->data)) { ObClient *client = it->data; client_showhide(client); } } - } else { - /* top to bottom */ + } + else { + /* restore windows top to bottom */ for (it = stacking_list; it; it = g_list_next(it)) { if (WINDOW_IS_CLIENT(it->data)) { ObClient *client = it->data; - client_showhide(client); + if (client_should_show(client)) { + if (!show_only || client == show_only) + client_show(client); + else + client_iconify(client, TRUE, FALSE, TRUE); + } } } } @@ -941,7 +947,8 @@ void screen_show_desktop(gboolean show, gboolean restore_focus) client_focus(it->data)) break; } - } else if (restore_focus) { + } + else if (!show_only) { ObClient *c; /* use NULL for the "old" argument because the desktop was focused |
