Xinqi Bao's Git
projects
/
dwm.git
/ commitdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
patch
|
inline
| side by side (parent:
61c3095
)
some minor changes
author
Anselm R Garbe <
[email protected]
>
Wed, 8 Jul 2009 16:05:20 +0000
(17:05 +0100)
committer
Anselm R Garbe <
[email protected]
>
Wed, 8 Jul 2009 16:05:20 +0000
(17:05 +0100)
dwm.c
patch
|
blob
|
history
diff --git
a/dwm.c
b/dwm.c
index
267659f
..
b089fe9
100644
(file)
--- a/
dwm.c
+++ b/
dwm.c
@@
-177,7
+177,7
@@
static void focusin(XEvent *e);
static void focusmon(const Arg *arg);
static void focusstack(const Arg *arg);
static unsigned long getcolor(const char *colstr);
static void focusmon(const Arg *arg);
static void focusstack(const Arg *arg);
static unsigned long getcolor(const char *colstr);
-static Bool getrootp
ointe
r(int *x, int *y);
+static Bool getrootp
t
r(int *x, int *y);
static long getstate(Window w);
static Bool gettextprop(Window w, Atom atom, char *text, unsigned int size);
static void grabbuttons(Client *c, Bool focused);
static long getstate(Window w);
static Bool gettextprop(Window w, Atom atom, char *text, unsigned int size);
static void grabbuttons(Client *c, Bool focused);
@@
-192,7
+192,7
@@
static void maprequest(XEvent *e);
static void monocle(Monitor *m);
static void movemouse(const Arg *arg);
static Client *nexttiled(Client *c);
static void monocle(Monitor *m);
static void movemouse(const Arg *arg);
static Client *nexttiled(Client *c);
-static Monitor *p
ointe
rtomon(int x, int y);
+static Monitor *p
t
rtomon(int x, int y);
static void propertynotify(XEvent *e);
static void quit(const Arg *arg);
static void resize(Client *c, int x, int y, int w, int h, Bool interact);
static void propertynotify(XEvent *e);
static void quit(const Arg *arg);
static void resize(Client *c, int x, int y, int w, int h, Bool interact);
@@
-862,7
+862,7
@@
getcolor(const char *colstr) {
}
Bool
}
Bool
-getrootp
ointe
r(int *x, int *y) {
+getrootp
t
r(int *x, int *y) {
int di;
unsigned int dui;
Window dummy;
int di;
unsigned int dui;
Window dummy;
@@
-1147,7
+1147,7
@@
movemouse(const Arg *arg) {
if(XGrabPointer(dpy, root, False, MOUSEMASK, GrabModeAsync, GrabModeAsync,
None, cursor[CurMove], CurrentTime) != GrabSuccess)
return;
if(XGrabPointer(dpy, root, False, MOUSEMASK, GrabModeAsync, GrabModeAsync,
None, cursor[CurMove], CurrentTime) != GrabSuccess)
return;
- if(!getrootp
ointe
r(&x, &y))
+ if(!getrootp
t
r(&x, &y))
return;
do {
XMaskEvent(dpy, MOUSEMASK|ExposureMask|SubstructureRedirectMask, &ev);
return;
do {
XMaskEvent(dpy, MOUSEMASK|ExposureMask|SubstructureRedirectMask, &ev);
@@
-1181,7
+1181,7
@@
movemouse(const Arg *arg) {
}
while(ev.type != ButtonRelease);
XUngrabPointer(dpy, CurrentTime);
}
while(ev.type != ButtonRelease);
XUngrabPointer(dpy, CurrentTime);
- if((m = p
ointe
rtomon(c->x + c->w / 2, c->y + c->h / 2)) != selmon) {
+ if((m = p
t
rtomon(c->x + c->w / 2, c->y + c->h / 2)) != selmon) {
sendmon(c, m);
selmon = m;
focus(NULL);
sendmon(c, m);
selmon = m;
focus(NULL);
@@
-1195,7
+1195,7
@@
nexttiled(Client *c) {
}
Monitor *
}
Monitor *
-p
ointe
rtomon(int x, int y) {
+p
t
rtomon(int x, int y) {
Monitor *m;
for(m = mons; m; m = m->next)
Monitor *m;
for(m = mons; m; m = m->next)
@@
-1302,7
+1302,7
@@
resizemouse(const Arg *arg) {
XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w + c->bw - 1, c->h + c->bw - 1);
XUngrabPointer(dpy, CurrentTime);
while(XCheckMaskEvent(dpy, EnterWindowMask, &ev));
XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w + c->bw - 1, c->h + c->bw - 1);
XUngrabPointer(dpy, CurrentTime);
while(XCheckMaskEvent(dpy, EnterWindowMask, &ev));
- if((m = p
ointe
rtomon(c->x + c->w / 2, c->y + c->h / 2)) != selmon) {
+ if((m = p
t
rtomon(c->x + c->w / 2, c->y + c->h / 2)) != selmon) {
sendmon(c, m);
selmon = m;
focus(NULL);
sendmon(c, m);
selmon = m;
focus(NULL);
@@
-1329,6
+1329,7
@@
restack(Monitor *m) {
wc.sibling = c->win;
}
}
wc.sibling = c->win;
}
}
+ XLowerWindow(dpy, m->barwin);
XSync(dpy, False);
while(XCheckMaskEvent(dpy, EnterWindowMask, &ev));
}
XSync(dpy, False);
while(XCheckMaskEvent(dpy, EnterWindowMask, &ev));
}
@@
-1339,10
+1340,9
@@
run(void) {
/* main event loop */
XSync(dpy, False);
/* main event loop */
XSync(dpy, False);
- while(running && !XNextEvent(dpy, &ev))
{
+ while(running && !XNextEvent(dpy, &ev))
if(handler[ev.type])
(handler[ev.type])(&ev); /* call handler */
if(handler[ev.type])
(handler[ev.type])(&ev); /* call handler */
- }
}
void
}
void
@@
-1870,8
+1870,8
@@
wintomon(Window w) {
Client *c;
Monitor *m;
Client *c;
Monitor *m;
- if(w == root && getrootp
ointe
r(&x, &y))
- return p
ointe
rtomon(x, y);
+ if(w == root && getrootp
t
r(&x, &y))
+ return p
t
rtomon(x, y);
for(m = mons; m; m = m->next)
if(w == m->barwin)
return m;
for(m = mons; m; m = m->next)
if(w == m->barwin)
return m;