Xinqi Bao's Git
projects
/
dwm.git
/ diff
summary
|
log
|
commit
|
diff
|
tree
raw
|
patch
|
inline
| side by side (parent:
43bb77a
)
minor fixes towards 5.0
author
Anselm R Garbe <
[email protected]
>
Sun, 15 Jun 2008 09:52:57 +0000
(10:52 +0100)
committer
Anselm R Garbe <
[email protected]
>
Sun, 15 Jun 2008 09:52:57 +0000
(10:52 +0100)
dwm.c
diff
|
blob
|
history
diff --git
a/dwm.c
b/dwm.c
index
c992860
..
64bafb7
100644
(file)
--- a/
dwm.c
+++ b/
dwm.c
@@
-60,7
+60,7
@@
enum { ColBorder, ColFG, ColBG, ColLast }; /* color */
enum { NetSupported, NetWMName, NetLast }; /* EWMH atoms */
enum { WMProtocols, WMDelete, WMName, WMState, WMLast };/* default atoms */
enum { ClkLtSymbol = 64, ClkStatusText, ClkWinTitle,
enum { NetSupported, NetWMName, NetLast }; /* EWMH atoms */
enum { WMProtocols, WMDelete, WMName, WMState, WMLast };/* default atoms */
enum { ClkLtSymbol = 64, ClkStatusText, ClkWinTitle,
- ClkClientWin, Clk
Last };
/* clicks */
+ ClkClientWin, Clk
RootWin, ClkLast };
/* clicks */
/* typedefs */
typedef unsigned int uint;
/* typedefs */
typedef unsigned int uint;
@@
-84,12
+84,12
@@
typedef struct {
typedef struct Client Client;
struct Client {
char name[256];
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;
int x, y, w, h;
int basew, baseh, incw, inch, maxw, maxh, minw, minh;
- float mina, maxa;
int bw, oldbw;
int bw, oldbw;
- Bool isbanned, isfixed, isfloating, ismoved, isurgent;
uint tags;
uint tags;
+ Bool isbanned, isfixed, isfloating, ismoved, isurgent;
Client *next;
Client *snext;
Window win;
Client *next;
Client *snext;
Window win;
@@
-312,7
+312,7
@@
buttonpress(XEvent *e) {
Client *c;
XButtonPressedEvent *ev = &e->xbutton;
Client *c;
XButtonPressedEvent *ev = &e->xbutton;
- click = Clk
Last
;
+ click = Clk
RootWin
;
if(ev->window == barwin) {
i = x = 0;
do
if(ev->window == barwin) {
i = x = 0;
do
@@
-327,8
+327,10
@@
buttonpress(XEvent *e) {
else
click = ClkWinTitle;
}
else
click = ClkWinTitle;
}
- else if((c = getclient(ev->window)))
+ else if((c = getclient(ev->window))) {
+ focus(c);
click = ClkClientWin;
click = ClkClientWin;
+ }
for(i = 0; i < LENGTH(buttons); i++)
if(click == buttons[i].click && buttons[i].func && buttons[i].button == ev->button
for(i = 0; i < LENGTH(buttons); i++)
if(click == buttons[i].click && buttons[i].func && buttons[i].button == ev->button
@@
-1374,7
+1376,7
@@
setup(void) {
PropModeReplace, (unsigned char *) netatom, NetLast);
/* select for events */
PropModeReplace, (unsigned char *) netatom, NetLast);
/* select for events */
- wa.event_mask = SubstructureRedirectMask|SubstructureNotifyMask
+ wa.event_mask = SubstructureRedirectMask|SubstructureNotifyMask
|ButtonPressMask
|EnterWindowMask|LeaveWindowMask|StructureNotifyMask;
XChangeWindowAttributes(dpy, root, CWEventMask|CWCursor, &wa);
XSelectInput(dpy, root, wa.event_mask);
|EnterWindowMask|LeaveWindowMask|StructureNotifyMask;
XChangeWindowAttributes(dpy, root, CWEventMask|CWCursor, &wa);
XSelectInput(dpy, root, wa.event_mask);