From b749cd5ec47040c4568beac5ad5121c05b4bcf61 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Fri, 28 Mar 2003 08:23:18 +0000 Subject: [PATCH] was not moving the window between desktop focus lists sometimes. bad news. now i always do. yay! --- openbox/client.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) 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); -- 2.45.2