static void focusmon(const Arg *arg);
static void focusstack(const Arg *arg);
static unsigned long getcolor(const char *colstr);
-static Bool getrootpointer(int *x, int *y);
+static Bool getrootptr(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 void monocle(Monitor *m);
static void movemouse(const Arg *arg);
static Client *nexttiled(Client *c);
-static Monitor *pointertomon(int x, int y);
+static Monitor *ptrtomon(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);
}
Bool
-getrootpointer(int *x, int *y) {
+getrootptr(int *x, int *y) {
int di;
unsigned int dui;
Window dummy;
if(XGrabPointer(dpy, root, False, MOUSEMASK, GrabModeAsync, GrabModeAsync,
None, cursor[CurMove], CurrentTime) != GrabSuccess)
return;
- if(!getrootpointer(&x, &y))
+ if(!getrootptr(&x, &y))
return;
do {
XMaskEvent(dpy, MOUSEMASK|ExposureMask|SubstructureRedirectMask, &ev);
}
while(ev.type != ButtonRelease);
XUngrabPointer(dpy, CurrentTime);
- if((m = pointertomon(c->x + c->w / 2, c->y + c->h / 2)) != selmon) {
+ if((m = ptrtomon(c->x + c->w / 2, c->y + c->h / 2)) != selmon) {
sendmon(c, m);
selmon = m;
focus(NULL);
}
Monitor *
-pointertomon(int x, int y) {
+ptrtomon(int x, int y) {
Monitor *m;
for(m = mons; m; m = m->next)
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 = pointertomon(c->x + c->w / 2, c->y + c->h / 2)) != selmon) {
+ if((m = ptrtomon(c->x + c->w / 2, c->y + c->h / 2)) != selmon) {
sendmon(c, m);
selmon = m;
focus(NULL);
wc.sibling = c->win;
}
}
+ XLowerWindow(dpy, m->barwin);
XSync(dpy, False);
while(XCheckMaskEvent(dpy, EnterWindowMask, &ev));
}
/* 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 */
- }
}
void
Client *c;
Monitor *m;
- if(w == root && getrootpointer(&x, &y))
- return pointertomon(x, y);
+ if(w == root && getrootptr(&x, &y))
+ return ptrtomon(x, y);
for(m = mons; m; m = m->next)
if(w == m->barwin)
return m;