[hackers] [wmii] Fix /ctl reads.

From: Kris Maglione <jg_AT_suckless.org>
Date: Thu Jun 28 16:59:30 2007

changeset: 2173:3d702f74193a
tag: tip
user: Kris Maglione <jg_AT_suckless.org>
date: Thu Jun 28 10:57:24 2007 -0400
summary: Fix /ctl reads.

diff -r 3a439a38ca71 -r 3d702f74193a cmd/wmii/client.c
--- a/cmd/wmii/client.c Wed Jun 27 21:47:55 2007 -0400
+++ b/cmd/wmii/client.c Thu Jun 28 10:57:24 2007 -0400
@@ -222,10 +222,10 @@ gravclient(Client *c, Rectangle rd) {
                         r = c->sel->r;
                 else
                         r = c->sel->revert;
- r = gravitate(r, c->r, h->grav);
+ r = gravitate(c->r, r, h->grav);
                 if(h->gravstatic)
                         r = rectaddpt(r, sp);
- return frame2client(c->sel, r);
+ return frame2client(nil, r);
         }else {
                 r = client2frame(nil, rd);
                 r = gravitate(r, rd, h->grav);
diff -r 3a439a38ca71 -r 3d702f74193a cmd/wmii/message.c
--- a/cmd/wmii/message.c Wed Jun 27 21:47:55 2007 -0400
+++ b/cmd/wmii/message.c Thu Jun 28 10:57:24 2007 -0400
@@ -351,7 +351,7 @@ read_root_ctl(void) {
 
         b = buffer;
         e = b + sizeof(buffer);
-#define print(...) if(b < e) snprintf(b, e-b, __VA_ARGS__)
+#define print(...) if(b < e) b += snprintf(b, e-b, __VA_ARGS__)
         print("view %s\n", screen->sel->name);
         print("focuscolors %s\n", def.focuscolor.colstr);
         print("normcolors %s\n", def.normcolor.colstr);
diff -r 3a439a38ca71 -r 3d702f74193a cmd/wmii/x11.c
--- a/cmd/wmii/x11.c Wed Jun 27 21:47:55 2007 -0400
+++ b/cmd/wmii/x11.c Thu Jun 28 10:57:24 2007 -0400
@@ -805,5 +805,5 @@ gravitate(Rectangle rc, Rectangle rf, Po
         d = divpt(d, Pt(2, 2));
         d = mulpt(d, grav);
 
- return rectsubpt(rc, d);
-}
+ return rectaddpt(rc, d);
+}
Received on Thu Jun 28 2007 - 16:59:30 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:57:25 UTC