[hackers] [wmii] Fix stupid window sizing bug. (Also, make build work with gmake -j (no such problem with BSD make)).

From: Kris Maglione <jg_AT_suckless.org>
Date: Sat Feb 09 00:17:50 2008

changeset: 2282:d8e0b52185e4
tag: tip
user: Kris Maglione <jg_AT_suckless.org>
date: Fri Feb 08 18:17:08 2008 -0500
summary: Fix stupid window sizing bug. (Also, make build work with gmake -j (no such problem with BSD make)).

diff -r a59b47a1ea39 -r d8e0b52185e4 cmd/wmii/client.c
--- a/cmd/wmii/client.c Mon Feb 04 18:33:57 2008 -0500
+++ b/cmd/wmii/client.c Fri Feb 08 18:17:08 2008 -0500
@@ -97,7 +97,8 @@ client_create(XWindow w, XWindowAttribut
         c->border = wa->border_width;
 
         c->r.min = Pt(wa->x, wa->y);
- c->r.max = addpt(c->r.min, Pt(wa->width, wa->height));
+ c->r.max = addpt(c->r.min,
+ Pt(wa->width, wa->height));
 
         c->w.type = WWindow;
         c->w.w = w;
@@ -193,7 +194,8 @@ client_manage(Client *c) {
         bool newgroup = !c->group
                      || c->group->ref == 1
                      || selclient() && (selclient()->group == c->group)
- || group_leader(c->group) && !client_viewframe(group_leader(c->group), c->sel->view);
+ || group_leader(c->group) && !client_viewframe(group_leader(c->group),
+ c->sel->view);
 
         f = c->sel;
         if(!(c->w.ewmh.type & TypeSplash))
diff -r a59b47a1ea39 -r d8e0b52185e4 cmd/wmii/float.c
--- a/cmd/wmii/float.c Mon Feb 04 18:33:57 2008 -0500
+++ b/cmd/wmii/float.c Fri Feb 08 18:17:08 2008 -0500
@@ -88,7 +88,7 @@ float_placeframe(Frame *f) {
                 return;
         */
         if(c->fullscreen || c->w.hints->position || starting) {
- f->r = client_grav(c, c->r);
+ f->r = f->floatr;
                 return;
         }
 
diff -r a59b47a1ea39 -r d8e0b52185e4 cmd/wmii/frame.c
--- a/cmd/wmii/frame.c Mon Feb 04 18:33:57 2008 -0500
+++ b/cmd/wmii/frame.c Fri Feb 08 18:17:08 2008 -0500
@@ -29,8 +29,8 @@ frame_create(Client *c, View *v) {
         if(c->sel) {
                 f->floatr = c->sel->floatr;
                 f->r = c->sel->r;
- }else{
- f->r = client_grav(c, ZR);
+ }else {
+ f->r = client_grav(c, c->r);
                 f->floatr = f->r;
                 c->sel = f;
         }
diff -r a59b47a1ea39 -r d8e0b52185e4 mk/dir.mk
--- a/mk/dir.mk Mon Feb 04 18:33:57 2008 -0500
+++ b/mk/dir.mk Fri Feb 08 18:17:08 2008 -0500
@@ -1,23 +1,24 @@ MKSUBDIR = targ=$@; targ=$${targ\#d}; \
 MKSUBDIR = targ=$@; targ=$${targ\#d}; \
         for i in $$dirs; do \
+ export BASE=$(BASE)$$i/; \
                 if [ ! -d $$i ]; then \
                         echo Skipping nonexistent directory: $$i 1>&2; \
                 else \
- echo MAKE $$targ $(BASE)$$i/; \
- (cd $$i && $(MAKE) BASE="$(BASE)$$i/" $$targ) || exit $?; \
+ echo MAKE $$targ $$BASE; \
+ (cd $$i && $(MAKE) $$targ) || exit $?; \
                 fi; \
         done
 
 dall:
- dirs="$(DIRS)"; $(MKSUBDIR)
+ +dirs="$(DIRS)"; $(MKSUBDIR)
 dclean:
- dirs="$(DIRS)"; $(MKSUBDIR)
+ +dirs="$(DIRS)"; $(MKSUBDIR)
 dinstall:
- dirs="$(INSTDIRS)"; $(MKSUBDIR)
+ +dirs="$(INSTDIRS)"; $(MKSUBDIR)
 duninstall:
- dirs="$(INSTDIRS)"; $(MKSUBDIR)
+ +dirs="$(INSTDIRS)"; $(MKSUBDIR)
 ddepend:
- dirs="$(DIRS)"; $(MKSUBDIR)
+ +dirs="$(DIRS)"; $(MKSUBDIR)
 
 all: dall
 clean: dclean
diff -r a59b47a1ea39 -r d8e0b52185e4 mk/hdr.mk
--- a/mk/hdr.mk Mon Feb 04 18:33:57 2008 -0500
+++ b/mk/hdr.mk Fri Feb 08 18:17:08 2008 -0500
@@ -36,8 +36,8 @@ all:
         $(LINK) $@ $<
 
 .c.O:
- ${COMPILE} ${<:.c=.o} $<
- ${LINK} $@ ${<:.c=.o}
+ $(COMPILE) ${<:.c=.o} $<
+ $(LINK) $@ ${<:.c=.o}
 
 .sh.O:
         echo FILTER $(BASE)$<
Received on Sat Feb 09 2008 - 00:17:50 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:59:19 UTC