From 105f89a58bbeca140c9285d72e32c0e7efdda5d8 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Mon, 4 Feb 2008 14:32:06 +0100 Subject: [PATCH] fix was_selected tag attribute handling --- tag.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tag.c b/tag.c index 339f3580f..bb75d1b34 100644 --- a/tag.c +++ b/tag.c @@ -321,6 +321,7 @@ tag_view_only_byindex(int screen, int dindex) void tag_view(Tag *tag, Bool view) { + tag->was_selected = tag->selected; tag->selected = view; ewmh_update_net_current_desktop(get_phys_screen(tag->screen)); widget_invalidate_cache(tag->screen, WIDGET_CACHE_TAGS); @@ -354,14 +355,9 @@ void uicb_tag_prev_selected(int screen, char *arg __attribute__ ((unused))) { Tag *tag; - Bool t; - for(tag = globalconf.screens[screen].tags; tag; tag = tag->next) - { - t = tag->selected; + for(tag = globalconf.screens[screen].tags; tag; tag = tag->next) tag_view(tag, tag->was_selected); - tag->was_selected = t; - } } /** View next tag