dwm.c
changeset 1276 98213209a570
parent 1275 e121660425a0
child 1277 7784be22f092
equal deleted inserted replaced
1275:e121660425a0 1276:98213209a570
    58 enum { CurNormal, CurResize, CurMove, CurLast };        /* cursor */
    58 enum { CurNormal, CurResize, CurMove, CurLast };        /* cursor */
    59 enum { ColBorder, ColFG, ColBG, ColLast };              /* color */
    59 enum { ColBorder, ColFG, ColBG, ColLast };              /* color */
    60 enum { NetSupported, NetWMName, NetLast };              /* EWMH atoms */
    60 enum { NetSupported, NetWMName, NetLast };              /* EWMH atoms */
    61 enum { WMProtocols, WMDelete, WMName, WMState, WMLast };/* default atoms */
    61 enum { WMProtocols, WMDelete, WMName, WMState, WMLast };/* default atoms */
    62 enum { ClkLtSymbol = 64, ClkStatusText, ClkWinTitle,
    62 enum { ClkLtSymbol = 64, ClkStatusText, ClkWinTitle,
    63        ClkClientWin, ClkRootWin, ClkLast };             /* clicks */
    63        ClkClientWin, ClkLast };                         /* clicks */
    64 
    64 
    65 /* typedefs */
    65 /* typedefs */
    66 typedef unsigned int uint;
    66 typedef unsigned int uint;
    67 typedef unsigned long ulong;
    67 typedef unsigned long ulong;
    68 
    68 
   310 buttonpress(XEvent *e) {
   310 buttonpress(XEvent *e) {
   311 	uint i, x, click;
   311 	uint i, x, click;
   312 	Client *c;
   312 	Client *c;
   313 	XButtonPressedEvent *ev = &e->xbutton;
   313 	XButtonPressedEvent *ev = &e->xbutton;
   314 
   314 
   315 	click = ClkRootWin;
   315 	click = ClkLast;
   316 	if(ev->window == barwin) {
   316 	if(ev->window == barwin) {
   317 		i = x = 0;
   317 		i = x = 0;
   318 		do
   318 		do
   319 			x += TEXTW(tags[i]);
   319 			x += TEXTW(tags[i]);
   320 		while(ev->x >= x && ++i < LENGTH(tags));
   320 		while(ev->x >= x && ++i < LENGTH(tags));