fix was_selected tag attribute handling

This commit is contained in:
Julien Danjou 2008-02-04 14:32:06 +01:00
parent 2ad8e005ad
commit 105f89a58b
1 changed files with 2 additions and 6 deletions

8
tag.c
View File

@ -321,6 +321,7 @@ tag_view_only_byindex(int screen, int dindex)
void void
tag_view(Tag *tag, Bool view) tag_view(Tag *tag, Bool view)
{ {
tag->was_selected = tag->selected;
tag->selected = view; tag->selected = view;
ewmh_update_net_current_desktop(get_phys_screen(tag->screen)); ewmh_update_net_current_desktop(get_phys_screen(tag->screen));
widget_invalidate_cache(tag->screen, WIDGET_CACHE_TAGS); widget_invalidate_cache(tag->screen, WIDGET_CACHE_TAGS);
@ -354,14 +355,9 @@ void
uicb_tag_prev_selected(int screen, char *arg __attribute__ ((unused))) uicb_tag_prev_selected(int screen, char *arg __attribute__ ((unused)))
{ {
Tag *tag; Tag *tag;
Bool t;
for(tag = globalconf.screens[screen].tags; tag; tag = tag->next) for(tag = globalconf.screens[screen].tags; tag; tag = tag->next)
{
t = tag->selected;
tag_view(tag, tag->was_selected); tag_view(tag, tag->was_selected);
tag->was_selected = t;
}
} }
/** View next tag /** View next tag