diff options
| author | Anselm R Garbe <garbeam@gmail.com> | 2008-06-15 10:52:57 +0100 |
|---|---|---|
| committer | Anselm R Garbe <garbeam@gmail.com> | 2008-06-15 10:52:57 +0100 |
| commit | a06b9193c7dcbed307c163ab778ad3bf66807af3 (patch) | |
| tree | 9b250d2fcad13eff87817315301d145caa50aaf2 | |
| parent | removed explicit warp in movemouse (diff) | |
| download | dwm-a06b9193c7dcbed307c163ab778ad3bf66807af3.tar.gz dwm-a06b9193c7dcbed307c163ab778ad3bf66807af3.zip | |
minor fixes towards 5.0
| -rw-r--r-- | dwm.c | 14 |
1 files changed, 8 insertions, 6 deletions
| @@ -60,7 +60,7 @@ 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, ClkLast }; /* clicks */ | 63 | ClkClientWin, ClkRootWin, ClkLast }; /* clicks */ |
| 64 | 64 | ||
| 65 | /* typedefs */ | 65 | /* typedefs */ |
| 66 | typedef unsigned int uint; | 66 | typedef unsigned int uint; |
| @@ -84,12 +84,12 @@ typedef struct { | |||
| 84 | typedef struct Client Client; | 84 | typedef struct Client Client; |
| 85 | struct Client { | 85 | struct Client { |
| 86 | char name[256]; | 86 | char name[256]; |
| 87 | float mina, maxa; | ||
| 87 | int x, y, w, h; | 88 | int x, y, w, h; |
| 88 | int basew, baseh, incw, inch, maxw, maxh, minw, minh; | 89 | int basew, baseh, incw, inch, maxw, maxh, minw, minh; |
| 89 | float mina, maxa; | ||
| 90 | int bw, oldbw; | 90 | int bw, oldbw; |
| 91 | Bool isbanned, isfixed, isfloating, ismoved, isurgent; | ||
| 92 | uint tags; | 91 | uint tags; |
| 92 | Bool isbanned, isfixed, isfloating, ismoved, isurgent; | ||
| 93 | Client *next; | 93 | Client *next; |
| 94 | Client *snext; | 94 | Client *snext; |
| 95 | Window win; | 95 | Window win; |
| @@ -312,7 +312,7 @@ buttonpress(XEvent *e) { | |||
| 312 | Client *c; | 312 | Client *c; |
| 313 | XButtonPressedEvent *ev = &e->xbutton; | 313 | XButtonPressedEvent *ev = &e->xbutton; |
| 314 | 314 | ||
| 315 | click = ClkLast; | 315 | click = ClkRootWin; |
| 316 | if(ev->window == barwin) { | 316 | if(ev->window == barwin) { |
| 317 | i = x = 0; | 317 | i = x = 0; |
| 318 | do | 318 | do |
| @@ -327,8 +327,10 @@ buttonpress(XEvent *e) { | |||
| 327 | else | 327 | else |
| 328 | click = ClkWinTitle; | 328 | click = ClkWinTitle; |
| 329 | } | 329 | } |
| 330 | else if((c = getclient(ev->window))) | 330 | else if((c = getclient(ev->window))) { |
| 331 | focus(c); | ||
| 331 | click = ClkClientWin; | 332 | click = ClkClientWin; |
| 333 | } | ||
| 332 | 334 | ||
| 333 | for(i = 0; i < LENGTH(buttons); i++) | 335 | for(i = 0; i < LENGTH(buttons); i++) |
| 334 | if(click == buttons[i].click && buttons[i].func && buttons[i].button == ev->button | 336 | if(click == buttons[i].click && buttons[i].func && buttons[i].button == ev->button |
| @@ -1374,7 +1376,7 @@ setup(void) { | |||
| 1374 | PropModeReplace, (unsigned char *) netatom, NetLast); | 1376 | PropModeReplace, (unsigned char *) netatom, NetLast); |
| 1375 | 1377 | ||
| 1376 | /* select for events */ | 1378 | /* select for events */ |
| 1377 | wa.event_mask = SubstructureRedirectMask|SubstructureNotifyMask | 1379 | wa.event_mask = SubstructureRedirectMask|SubstructureNotifyMask|ButtonPressMask |
| 1378 | |EnterWindowMask|LeaveWindowMask|StructureNotifyMask; | 1380 | |EnterWindowMask|LeaveWindowMask|StructureNotifyMask; |
| 1379 | XChangeWindowAttributes(dpy, root, CWEventMask|CWCursor, &wa); | 1381 | XChangeWindowAttributes(dpy, root, CWEventMask|CWCursor, &wa); |
| 1380 | XSelectInput(dpy, root, wa.event_mask); | 1382 | XSelectInput(dpy, root, wa.event_mask); |
