From: Dana Jansens Date: Fri, 28 Mar 2003 08:23:18 +0000 (+0000) Subject: was not moving the window between desktop focus lists sometimes. bad news. now i... X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=b749cd5ec47040c4568beac5ad5121c05b4bcf61;p=chaz%2Fopenbox was not moving the window between desktop focus lists sometimes. bad news. now i always do. yay! --- diff --git a/openbox/client.c b/openbox/client.c index 278ee38e..209f5f96 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -1730,19 +1730,20 @@ void client_set_desktop(Client *self, guint target, gboolean donthide) if (old == DESKTOP_ALL) { for (i = 0; i < screen_num_desktops; ++i) focus_order[i] = g_list_remove(focus_order[i], self); + } else + focus_order[old] = g_list_remove(focus_order[old], self); + if (target == DESKTOP_ALL) { + for (i = 0; i < screen_num_desktops; ++i) { + if (focus_new.bool) + focus_order[i] = g_list_prepend(focus_order[i], self); + else + focus_order[i] = g_list_append(focus_order[i], self); + } + } else { if (focus_new.bool) focus_order[target] = g_list_prepend(focus_order[target], self); else focus_order[target] = g_list_append(focus_order[target], self); - } else { - focus_order[old] = g_list_remove(focus_order[old], self); - if (target == DESKTOP_ALL) - for (i = 0; i < screen_num_desktops; ++i) { - if (focus_new.bool) - focus_order[i] = g_list_prepend(focus_order[i], self); - else - focus_order[i] = g_list_append(focus_order[i], self); - } } dispatch_client(Event_Client_Desktop, self, target, old);