when restoring from show-desktop mode because a window is going to be focused, then don't restore focus how it was before showing the desktop.
This commit is contained in:
parent
9389c7e6c8
commit
fde5ca09e9
5 changed files with 8 additions and 8 deletions
|
@ -1932,17 +1932,17 @@ void action_toggle_dockautohide(union ActionData *data)
|
||||||
|
|
||||||
void action_toggle_show_desktop(union ActionData *data)
|
void action_toggle_show_desktop(union ActionData *data)
|
||||||
{
|
{
|
||||||
screen_show_desktop(!screen_showing_desktop);
|
screen_show_desktop(!screen_showing_desktop, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void action_show_desktop(union ActionData *data)
|
void action_show_desktop(union ActionData *data)
|
||||||
{
|
{
|
||||||
screen_show_desktop(TRUE);
|
screen_show_desktop(TRUE, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void action_unshow_desktop(union ActionData *data)
|
void action_unshow_desktop(union ActionData *data)
|
||||||
{
|
{
|
||||||
screen_show_desktop(FALSE);
|
screen_show_desktop(FALSE, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void action_break_chroot(union ActionData *data)
|
void action_break_chroot(union ActionData *data)
|
||||||
|
|
|
@ -3261,7 +3261,7 @@ void client_activate(ObClient *self, gboolean here, gboolean user)
|
||||||
event_halt_focus_delay();
|
event_halt_focus_delay();
|
||||||
|
|
||||||
if (client_normal(self) && screen_showing_desktop)
|
if (client_normal(self) && screen_showing_desktop)
|
||||||
screen_show_desktop(FALSE);
|
screen_show_desktop(FALSE, FALSE);
|
||||||
if (self->iconic)
|
if (self->iconic)
|
||||||
client_iconify(self, FALSE, here);
|
client_iconify(self, FALSE, here);
|
||||||
if (self->desktop != DESKTOP_ALL &&
|
if (self->desktop != DESKTOP_ALL &&
|
||||||
|
|
|
@ -604,7 +604,7 @@ static void event_handle_root(XEvent *e)
|
||||||
if (d > 0)
|
if (d > 0)
|
||||||
screen_set_num_desktops(d);
|
screen_set_num_desktops(d);
|
||||||
} else if (msgtype == prop_atoms.net_showing_desktop) {
|
} else if (msgtype == prop_atoms.net_showing_desktop) {
|
||||||
screen_show_desktop(e->xclient.data.l[0] != 0);
|
screen_show_desktop(e->xclient.data.l[0] != 0, TRUE);
|
||||||
} else if (msgtype == prop_atoms.ob_control) {
|
} else if (msgtype == prop_atoms.ob_control) {
|
||||||
if (e->xclient.data.l[0] == 1)
|
if (e->xclient.data.l[0] == 1)
|
||||||
ob_reconfigure();
|
ob_reconfigure();
|
||||||
|
|
|
@ -860,7 +860,7 @@ void screen_update_desktop_names()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void screen_show_desktop(gboolean show)
|
void screen_show_desktop(gboolean show, gboolean restore_focus)
|
||||||
{
|
{
|
||||||
GList *it;
|
GList *it;
|
||||||
|
|
||||||
|
@ -895,7 +895,7 @@ void screen_show_desktop(gboolean show)
|
||||||
client_focus(it->data))
|
client_focus(it->data))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else if (restore_focus) {
|
||||||
ObClient *c;
|
ObClient *c;
|
||||||
|
|
||||||
/* use NULL for the "old" argument because the desktop was focused
|
/* use NULL for the "old" argument because the desktop was focused
|
||||||
|
|
|
@ -76,7 +76,7 @@ void screen_desktop_popup(guint d, gboolean show);
|
||||||
|
|
||||||
/*! Shows and focuses the desktop and hides all the client windows, or
|
/*! Shows and focuses the desktop and hides all the client windows, or
|
||||||
returns to the normal state, showing client windows. */
|
returns to the normal state, showing client windows. */
|
||||||
void screen_show_desktop(gboolean show);
|
void screen_show_desktop(gboolean show, gboolean restore_focus);
|
||||||
|
|
||||||
/*! Updates the desktop layout from the root property if available */
|
/*! Updates the desktop layout from the root property if available */
|
||||||
void screen_update_layout();
|
void screen_update_layout();
|
||||||
|
|
Loading…
Reference in a new issue