mirror of git://git.suckless.org/dwm
final style fixes
This commit is contained in:
parent
da80487c07
commit
450b08dde2
8
dwm.c
8
dwm.c
|
@ -380,7 +380,6 @@ void
|
||||||
arrange(void) {
|
arrange(void) {
|
||||||
Monitor *m;
|
Monitor *m;
|
||||||
|
|
||||||
/* optimise two loops into one, check focus(NULL) */
|
|
||||||
for(m = mons; m; m = m->next)
|
for(m = mons; m; m = m->next)
|
||||||
showhide(m->stack);
|
showhide(m->stack);
|
||||||
focus(NULL);
|
focus(NULL);
|
||||||
|
@ -909,9 +908,7 @@ gettextprop(Window w, Atom atom, char *text, unsigned int size) {
|
||||||
if(name.encoding == XA_STRING)
|
if(name.encoding == XA_STRING)
|
||||||
strncpy(text, (char *)name.value, size - 1);
|
strncpy(text, (char *)name.value, size - 1);
|
||||||
else {
|
else {
|
||||||
if(XmbTextPropertyToTextList(dpy, &name, &list, &n) >= Success
|
if(XmbTextPropertyToTextList(dpy, &name, &list, &n) >= Success && n > 0 && *list) {
|
||||||
&& n > 0 && *list)
|
|
||||||
{
|
|
||||||
strncpy(text, *list, size - 1);
|
strncpy(text, *list, size - 1);
|
||||||
XFreeStringList(list);
|
XFreeStringList(list);
|
||||||
}
|
}
|
||||||
|
@ -1294,7 +1291,8 @@ resizemouse(const Arg *arg) {
|
||||||
nw = MAX(ev.xmotion.x - ocx - 2 * c->bw + 1, 1);
|
nw = MAX(ev.xmotion.x - ocx - 2 * c->bw + 1, 1);
|
||||||
nh = MAX(ev.xmotion.y - ocy - 2 * c->bw + 1, 1);
|
nh = MAX(ev.xmotion.y - ocy - 2 * c->bw + 1, 1);
|
||||||
if(snap && nw >= selmon->wx && nw <= selmon->wx + selmon->ww
|
if(snap && nw >= selmon->wx && nw <= selmon->wx + selmon->ww
|
||||||
&& nh >= selmon->wy && nh <= selmon->wy + selmon->wh) {
|
&& nh >= selmon->wy && nh <= selmon->wy + selmon->wh)
|
||||||
|
{
|
||||||
if(!c->isfloating && selmon->lt[selmon->sellt]->arrange
|
if(!c->isfloating && selmon->lt[selmon->sellt]->arrange
|
||||||
&& (abs(nw - c->w) > snap || abs(nh - c->h) > snap))
|
&& (abs(nw - c->w) > snap || abs(nh - c->h) > snap))
|
||||||
togglefloating(NULL);
|
togglefloating(NULL);
|
||||||
|
|
Loading…
Reference in New Issue