# HG changeset patch # User Anselm R. Garbe # Date 1156864297 -7200 # Node ID 2ec9cead84a726737cc99a4664603c58c54916af # Parent 76b62c0c8c117c73fd8694eaca7be7ba3d03b131 applied patch similiar proposed by dave tweed diff -r 76b62c0c8c11 -r 2ec9cead84a7 tag.c --- a/tag.c Tue Aug 29 15:28:29 2006 +0200 +++ b/tag.c Tue Aug 29 17:11:37 2006 +0200 @@ -30,6 +30,17 @@ static RReg *rreg = NULL; static unsigned int len = 0; +static void +applytag() +{ + /* asserts sel != NULL */ + settitle(sel); + if(!isvisible(sel)) + arrange(NULL); + else + drawstatus(); +} + /* extern */ Client * @@ -121,11 +132,7 @@ for(i = 0; i < ntags; i++) sel->tags[i] = False; sel->tags[arg->i] = True; - settitle(sel); - if(!isvisible(sel)) - arrange(NULL); - else - drawstatus(); + applytag(); } void @@ -140,9 +147,5 @@ for(i = 0; i < ntags && !sel->tags[i]; i++); if(i == ntags) sel->tags[arg->i] = True; - settitle(sel); - if(!isvisible(sel)) - arrange(NULL); - else - drawstatus(); + applytag(); }