Update to 6.8
This commit is contained in:
34
dwm.c
34
dwm.c
@@ -50,8 +50,7 @@
|
||||
#define INTERSECT(x,y,w,h,m) (MAX(0, MIN((x)+(w),(m)->wx+(m)->ww) - MAX((x),(m)->wx)) \
|
||||
* MAX(0, MIN((y)+(h),(m)->wy+(m)->wh) - MAX((y),(m)->wy)))
|
||||
#define ISVISIBLEONTAG(C, T) ((C->tags & T))
|
||||
#define ISVISIBLE(C) ((C->tags & C->mon->tagset[C->mon->seltags]) || C->issticky)
|
||||
#define LENGTH(X) (sizeof X / sizeof X[0])
|
||||
#define ISVISIBLE(C) ((C->tags & C->mon->tagset[C->mon->seltags]))
|
||||
#define MOUSEMASK (BUTTONMASK|PointerMotionMask)
|
||||
#define WIDTH(X) ((X)->w + 2 * (X)->bw)
|
||||
#define HEIGHT(X) ((X)->h + 2 * (X)->bw)
|
||||
@@ -539,7 +538,7 @@ cleanup(void)
|
||||
for (i = 0; i < CurLast; i++)
|
||||
drw_cur_free(drw, cursor[i]);
|
||||
for (i = 0; i < LENGTH(colors); i++)
|
||||
free(scheme[i]);
|
||||
drw_scm_free(drw, scheme[i], 3);
|
||||
free(scheme);
|
||||
XDestroyWindow(dpy, wmcheckwin);
|
||||
drw_free(drw);
|
||||
@@ -996,14 +995,15 @@ focusstack(const Arg *arg)
|
||||
Atom
|
||||
getatomprop(Client *c, Atom prop)
|
||||
{
|
||||
int di;
|
||||
unsigned long dl;
|
||||
int format;
|
||||
unsigned long nitems, dl;
|
||||
unsigned char *p = NULL;
|
||||
Atom da, atom = None;
|
||||
|
||||
if (XGetWindowProperty(dpy, c->win, prop, 0L, sizeof atom, False, XA_ATOM,
|
||||
&da, &di, &dl, &dl, &p) == Success && p) {
|
||||
atom = *(Atom *)p;
|
||||
&da, &format, &nitems, &dl, &p) == Success && p) {
|
||||
if (nitems > 0 && format == 32)
|
||||
atom = *(long *)p;
|
||||
XFree(p);
|
||||
}
|
||||
return atom;
|
||||
@@ -1029,10 +1029,10 @@ getstate(Window w)
|
||||
Atom real;
|
||||
|
||||
if (XGetWindowProperty(dpy, w, wmatom[WMState], 0L, 2L, False, wmatom[WMState],
|
||||
&real, &format, &n, &extra, (unsigned char **)&p) != Success)
|
||||
&real, &format, &n, &extra, &p) != Success)
|
||||
return -1;
|
||||
if (n != 0)
|
||||
result = *p;
|
||||
if (n != 0 && format == 32)
|
||||
result = *(long *)p;
|
||||
XFree(p);
|
||||
return result;
|
||||
}
|
||||
@@ -1316,7 +1316,7 @@ movemouse(const Arg *arg)
|
||||
handler[ev.type](&ev);
|
||||
break;
|
||||
case MotionNotify:
|
||||
if ((ev.xmotion.time - lasttime) <= (1000 / 60))
|
||||
if ((ev.xmotion.time - lasttime) <= (1000 / refreshrate))
|
||||
continue;
|
||||
lasttime = ev.xmotion.time;
|
||||
|
||||
@@ -1556,7 +1556,7 @@ resizemouse(const Arg *arg)
|
||||
handler[ev.type](&ev);
|
||||
break;
|
||||
case MotionNotify:
|
||||
if ((ev.xmotion.time - lasttime) <= (1000 / 60))
|
||||
if ((ev.xmotion.time - lasttime) <= (1000 / refreshrate))
|
||||
continue;
|
||||
lasttime = ev.xmotion.time;
|
||||
|
||||
@@ -1700,12 +1700,10 @@ sendevent(Client *c, Atom proto)
|
||||
void
|
||||
setfocus(Client *c)
|
||||
{
|
||||
if (!c->neverfocus) {
|
||||
if (!c->neverfocus)
|
||||
XSetInputFocus(dpy, c->win, RevertToPointerRoot, CurrentTime);
|
||||
XChangeProperty(dpy, root, netatom[NetActiveWindow],
|
||||
XA_WINDOW, 32, PropModeReplace,
|
||||
(unsigned char *) &(c->win), 1);
|
||||
}
|
||||
XChangeProperty(dpy, root, netatom[NetActiveWindow], XA_WINDOW, 32,
|
||||
PropModeReplace, (unsigned char *)&c->win, 1);
|
||||
sendevent(c, wmatom[WMTakeFocus]);
|
||||
}
|
||||
|
||||
@@ -2163,7 +2161,7 @@ updatebarpos(Monitor *m)
|
||||
}
|
||||
|
||||
void
|
||||
updateclientlist()
|
||||
updateclientlist(void)
|
||||
{
|
||||
Client *c;
|
||||
Monitor *m;
|
||||
|
||||
Reference in New Issue
Block a user