dont focus anything in the kernel from showing-the-desktop mode
This commit is contained in:
parent
c5e902a7b1
commit
a822cbe13b
1 changed files with 1 additions and 18 deletions
|
@ -377,24 +377,16 @@ void screen_update_desktop_names()
|
||||||
void screen_show_desktop(gboolean show)
|
void screen_show_desktop(gboolean show)
|
||||||
{
|
{
|
||||||
GList *it;
|
GList *it;
|
||||||
static Window saved_focus = 0;
|
|
||||||
|
|
||||||
if (show == screen_showing_desktop) return; /* no change */
|
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;
|
screen_showing_desktop = 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) {
|
||||||
Client *client = it->data;
|
Client *client = it->data;
|
||||||
if (client->type == Type_Desktop)
|
if (client->frame->visible && !client_should_show(client))
|
||||||
client_focus(client);
|
|
||||||
else if (client->frame->visible && !client_should_show(client))
|
|
||||||
engine_frame_hide(client->frame);
|
engine_frame_hide(client->frame);
|
||||||
}
|
}
|
||||||
} else {
|
} 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 */
|
show = !!show; /* make it boolean */
|
||||||
PROP_SET32(ob_root, net_showing_desktop, cardinal, show);
|
PROP_SET32(ob_root, net_showing_desktop, cardinal, show);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue