[wmfs.c] Fix tag 0 bug

This commit is contained in:
Martin Duquesnoy
2008-09-14 14:10:06 +02:00
parent 53f0fafa20
commit f6f697a109

11
wmfs.c
View File

@@ -879,6 +879,9 @@ tag(char *cmd)
{ {
int tmp = atoi(cmd); int tmp = atoi(cmd);
if(!tmp)
tmp = 1;
if(cmd[0] == '+' || cmd[0] == '-') if(cmd[0] == '+' || cmd[0] == '-')
{ {
if(tmp + seltag < 1 if(tmp + seltag < 1
@@ -906,6 +909,10 @@ tagtransfert(char *cmd)
if(!sel) if(!sel)
return; return;
if(!n)
n = 1;
sel->tag = n; sel->tag = n;
arrange(); arrange();
} }
@@ -1304,6 +1311,10 @@ main(int argc,char **argv)
updatebar(); updatebar();
getevent(); getevent();
updateall(); updateall();
printf("X :");
debug(event.xbutton.x);
printf("T :");
debug(seltag);
} }
XCloseDisplay(dpy); XCloseDisplay(dpy);