|
|
|
@@ -440,7 +440,7 @@ buttonpress(XEvent *e)
|
|
|
|
|
arg.ui = 1 << i;
|
|
|
|
|
} else if (ev->x < x + TEXTW(selmon->ltsymbol))
|
|
|
|
|
click = ClkLtSymbol;
|
|
|
|
|
else if (ev->x > selmon->ww - (int)TEXTW(stext))
|
|
|
|
|
else if (ev->x > selmon->ww - (int)TEXTW(stext) + lrpad - 2)
|
|
|
|
|
click = ClkStatusText;
|
|
|
|
|
else
|
|
|
|
|
click = ClkWinTitle;
|
|
|
|
@@ -863,15 +863,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) {
|
|
|
|
|
if (dl > 0)
|
|
|
|
|
atom = *(Atom *)p;
|
|
|
|
|
&da, &format, &nitems, &dl, &p) == Success && p) {
|
|
|
|
|
if (nitems > 0 && format == 32)
|
|
|
|
|
atom = *(long *)p;
|
|
|
|
|
XFree(p);
|
|
|
|
|
}
|
|
|
|
|
return atom;
|
|
|
|
@@ -897,10 +897,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;
|
|
|
|
|
}
|
|
|
|
@@ -1429,6 +1429,8 @@ sendmon(Client *c, Monitor *m)
|
|
|
|
|
c->tags = m->tagset[m->seltags]; /* assign tags of target monitor */
|
|
|
|
|
attach(c);
|
|
|
|
|
attachstack(c);
|
|
|
|
|
if (c->isfullscreen)
|
|
|
|
|
resizeclient(c, m->mx, m->my, m->mw, m->mh);
|
|
|
|
|
focus(NULL);
|
|
|
|
|
arrange(NULL);
|
|
|
|
|
}
|
|
|
|
@@ -1470,12 +1472,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]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|