minor fixes towards 5.0
a06b9193
1 file(s) · +8 −6
| 60 | 60 | enum { NetSupported, NetWMName, NetLast }; /* EWMH atoms */ |
|
| 61 | 61 | enum { WMProtocols, WMDelete, WMName, WMState, WMLast };/* default atoms */ |
|
| 62 | 62 | enum { ClkLtSymbol = 64, ClkStatusText, ClkWinTitle, |
|
| 63 | - | ClkClientWin, ClkLast }; /* clicks */ |
|
| 63 | + | ClkClientWin, ClkRootWin, ClkLast }; /* clicks */ |
|
| 64 | 64 | ||
| 65 | 65 | /* typedefs */ |
|
| 66 | 66 | typedef unsigned int uint; |
|
| 84 | 84 | typedef struct Client Client; |
|
| 85 | 85 | struct Client { |
|
| 86 | 86 | char name[256]; |
|
| 87 | + | float mina, maxa; |
|
| 87 | 88 | int x, y, w, h; |
|
| 88 | 89 | int basew, baseh, incw, inch, maxw, maxh, minw, minh; |
|
| 89 | - | float mina, maxa; |
|
| 90 | 90 | int bw, oldbw; |
|
| 91 | - | Bool isbanned, isfixed, isfloating, ismoved, isurgent; |
|
| 92 | 91 | uint tags; |
|
| 92 | + | Bool isbanned, isfixed, isfloating, ismoved, isurgent; |
|
| 93 | 93 | Client *next; |
|
| 94 | 94 | Client *snext; |
|
| 95 | 95 | Window win; |
|
| 312 | 312 | Client *c; |
|
| 313 | 313 | XButtonPressedEvent *ev = &e->xbutton; |
|
| 314 | 314 | ||
| 315 | - | click = ClkLast; |
|
| 315 | + | click = ClkRootWin; |
|
| 316 | 316 | if(ev->window == barwin) { |
|
| 317 | 317 | i = x = 0; |
|
| 318 | 318 | do |
|
| 327 | 327 | else |
|
| 328 | 328 | click = ClkWinTitle; |
|
| 329 | 329 | } |
|
| 330 | - | else if((c = getclient(ev->window))) |
|
| 330 | + | else if((c = getclient(ev->window))) { |
|
| 331 | + | focus(c); |
|
| 331 | 332 | click = ClkClientWin; |
|
| 333 | + | } |
|
| 332 | 334 | ||
| 333 | 335 | for(i = 0; i < LENGTH(buttons); i++) |
|
| 334 | 336 | if(click == buttons[i].click && buttons[i].func && buttons[i].button == ev->button |
|
| 1374 | 1376 | PropModeReplace, (unsigned char *) netatom, NetLast); |
|
| 1375 | 1377 | ||
| 1376 | 1378 | /* select for events */ |
|
| 1377 | - | wa.event_mask = SubstructureRedirectMask|SubstructureNotifyMask |
|
| 1379 | + | wa.event_mask = SubstructureRedirectMask|SubstructureNotifyMask|ButtonPressMask |
|
| 1378 | 1380 | |EnterWindowMask|LeaveWindowMask|StructureNotifyMask; |
|
| 1379 | 1381 | XChangeWindowAttributes(dpy, root, CWEventMask|CWCursor, &wa); |
|
| 1380 | 1382 | XSelectInput(dpy, root, wa.event_mask); |
|