tminor fixes towards 5.0 - dwm - [fork] customized build of dwm, the dynamic wi… | |
git clone git://src.adamsgaard.dk/dwm | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit a06b9193c7dcbed307c163ab778ad3bf66807af3 | |
parent 43bb77a569843e637afcf16462f139e96f8220ae | |
Author: Anselm R Garbe <[email protected]> | |
Date: Sun, 15 Jun 2008 10:52:57 +0100 | |
minor fixes towards 5.0 | |
Diffstat: | |
M dwm.c | 14 ++++++++------ | |
1 file changed, 8 insertions(+), 6 deletions(-) | |
--- | |
diff --git a/dwm.c b/dwm.c | |
t@@ -60,7 +60,7 @@ enum { ColBorder, ColFG, ColBG, ColLast }; /* c… | |
enum { NetSupported, NetWMName, NetLast }; /* EWMH atoms */ | |
enum { WMProtocols, WMDelete, WMName, WMState, WMLast };/* default atoms */ | |
enum { ClkLtSymbol = 64, ClkStatusText, ClkWinTitle, | |
- ClkClientWin, ClkLast }; /* clicks */ | |
+ ClkClientWin, ClkRootWin, ClkLast }; /* clicks */ | |
/* typedefs */ | |
typedef unsigned int uint; | |
t@@ -84,12 +84,12 @@ typedef struct { | |
typedef struct Client Client; | |
struct Client { | |
char name[256]; | |
+ float mina, maxa; | |
int x, y, w, h; | |
int basew, baseh, incw, inch, maxw, maxh, minw, minh; | |
- float mina, maxa; | |
int bw, oldbw; | |
- Bool isbanned, isfixed, isfloating, ismoved, isurgent; | |
uint tags; | |
+ Bool isbanned, isfixed, isfloating, ismoved, isurgent; | |
Client *next; | |
Client *snext; | |
Window win; | |
t@@ -312,7 +312,7 @@ buttonpress(XEvent *e) { | |
Client *c; | |
XButtonPressedEvent *ev = &e->xbutton; | |
- click = ClkLast; | |
+ click = ClkRootWin; | |
if(ev->window == barwin) { | |
i = x = 0; | |
do | |
t@@ -327,8 +327,10 @@ buttonpress(XEvent *e) { | |
else | |
click = ClkWinTitle; | |
} | |
- else if((c = getclient(ev->window))) | |
+ else if((c = getclient(ev->window))) { | |
+ focus(c); | |
click = ClkClientWin; | |
+ } | |
for(i = 0; i < LENGTH(buttons); i++) | |
if(click == buttons[i].click && buttons[i].func && buttons[i].… | |
t@@ -1374,7 +1376,7 @@ setup(void) { | |
PropModeReplace, (unsigned char *) netatom, NetLast); | |
/* select for events */ | |
- wa.event_mask = SubstructureRedirectMask|SubstructureNotifyMask | |
+ wa.event_mask = SubstructureRedirectMask|SubstructureNotifyMask|Button… | |
|EnterWindowMask|LeaveWindowMask|StructureNotifyMask; | |
XChangeWindowAttributes(dpy, root, CWEventMask|CWCursor, &wa); | |
XSelectInput(dpy, root, wa.event_mask); |