applied Peters patch, applied yiyus hint to initfont
This commit is contained in:
parent
08c2d92480
commit
1fafcb1820
20
dwm.c
20
dwm.c
|
@ -334,10 +334,10 @@ buttonpress(XEvent *e) {
|
||||||
if(CLEANMASK(ev->state) != MODKEY)
|
if(CLEANMASK(ev->state) != MODKEY)
|
||||||
return;
|
return;
|
||||||
if(ev->button == Button1) {
|
if(ev->button == Button1) {
|
||||||
if(!isarrange(floating) && !c->isfloating)
|
if(isarrange(floating) || c->isfloating)
|
||||||
togglefloating(NULL);
|
|
||||||
else
|
|
||||||
restack();
|
restack();
|
||||||
|
else
|
||||||
|
togglefloating(NULL);
|
||||||
movemouse(c);
|
movemouse(c);
|
||||||
}
|
}
|
||||||
else if(ev->button == Button2) {
|
else if(ev->button == Button2) {
|
||||||
|
@ -347,10 +347,10 @@ buttonpress(XEvent *e) {
|
||||||
zoom(NULL);
|
zoom(NULL);
|
||||||
}
|
}
|
||||||
else if(ev->button == Button3 && !c->isfixed) {
|
else if(ev->button == Button3 && !c->isfixed) {
|
||||||
if(!isarrange(floating) && !c->isfloating)
|
if(isarrange(floating) || c->isfloating)
|
||||||
togglefloating(NULL);
|
|
||||||
else
|
|
||||||
restack();
|
restack();
|
||||||
|
else
|
||||||
|
togglefloating(NULL);
|
||||||
resizemouse(c);
|
resizemouse(c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -883,7 +883,7 @@ initfont(const char *fontstr) {
|
||||||
XFreeFont(dpy, dc.font.xfont);
|
XFreeFont(dpy, dc.font.xfont);
|
||||||
dc.font.xfont = NULL;
|
dc.font.xfont = NULL;
|
||||||
if(!(dc.font.xfont = XLoadQueryFont(dpy, fontstr))
|
if(!(dc.font.xfont = XLoadQueryFont(dpy, fontstr))
|
||||||
|| !(dc.font.xfont = XLoadQueryFont(dpy, "fixed")))
|
&& !(dc.font.xfont = XLoadQueryFont(dpy, "fixed")))
|
||||||
eprint("error, cannot load font: '%s'\n", fontstr);
|
eprint("error, cannot load font: '%s'\n", fontstr);
|
||||||
dc.font.ascent = dc.font.xfont->ascent;
|
dc.font.ascent = dc.font.xfont->ascent;
|
||||||
dc.font.descent = dc.font.xfont->descent;
|
dc.font.descent = dc.font.xfont->descent;
|
||||||
|
@ -1404,10 +1404,10 @@ setmwfact(const char *arg) {
|
||||||
if(arg == NULL)
|
if(arg == NULL)
|
||||||
mwfact = MWFACT;
|
mwfact = MWFACT;
|
||||||
else if(1 == sscanf(arg, "%lf", &delta)) {
|
else if(1 == sscanf(arg, "%lf", &delta)) {
|
||||||
if(arg[0] != '+' && arg[0] != '-')
|
if(arg[0] == '+' || arg[0] == '-')
|
||||||
mwfact = delta;
|
|
||||||
else
|
|
||||||
mwfact += delta;
|
mwfact += delta;
|
||||||
|
else
|
||||||
|
mwfact = delta;
|
||||||
if(mwfact < 0.1)
|
if(mwfact < 0.1)
|
||||||
mwfact = 0.1;
|
mwfact = 0.1;
|
||||||
else if(mwfact > 0.9)
|
else if(mwfact > 0.9)
|
||||||
|
|
Loading…
Reference in New Issue