simplify proto

This commit is contained in:
Julien Danjou 2007-12-27 14:02:27 +01:00
parent 2404274066
commit a95694c177
3 changed files with 7 additions and 8 deletions

View File

@ -189,7 +189,7 @@ move_client_to_screen(Client *c, int new_screen, Bool doresize)
untag_client(c, tag, old_screen); untag_client(c, tag, old_screen);
/* tag client with new screen tags */ /* tag client with new screen tags */
tag_client_with_current_selected(c, new_screen); tag_client_with_current_selected(c);
c->screen = new_screen; c->screen = new_screen;

11
tag.c
View File

@ -94,17 +94,16 @@ is_client_tagged(Client *c, Tag *t, int screen)
} }
void void
tag_client_with_current_selected(Client *c, int screen) tag_client_with_current_selected(Client *c)
{ {
Tag *tag; Tag *tag;
VirtScreen vscreen; VirtScreen vscreen = globalconf.screens[c->screen];
vscreen = globalconf.screens[screen];
for(tag = vscreen.tags; tag; tag = tag->next) for(tag = vscreen.tags; tag; tag = tag->next)
if(tag->selected) if(tag->selected)
tag_client(c, tag, screen); tag_client(c, tag, c->screen);
else else
untag_client(c, tag, screen); untag_client(c, tag, c->screen);
} }
void void
@ -132,7 +131,7 @@ tag_client_with_rules(Client *c)
untag_client(c, tag, c->screen); untag_client(c, tag, c->screen);
if(!matched) if(!matched)
tag_client_with_current_selected(c, c->screen); tag_client_with_current_selected(c);
break; break;
} }
} }

2
tag.h
View File

@ -31,7 +31,7 @@ Tag ** get_current_tags(int );
void tag_client(Client *, Tag *, int); void tag_client(Client *, Tag *, int);
void untag_client(Client *, Tag *, int); void untag_client(Client *, Tag *, int);
Bool is_client_tagged(Client *, Tag *, int); Bool is_client_tagged(Client *, Tag *, int);
void tag_client_with_current_selected(Client *, int); void tag_client_with_current_selected(Client *);
void tag_client_with_rules(Client *); void tag_client_with_rules(Client *);
UICB_PROTO(uicb_client_tag); UICB_PROTO(uicb_client_tag);