[hackers] [wmii] Fix Wine sizing bug. || Kris Maglione

From: <hg_AT_suckless.org>
Date: Tue, 28 Oct 2008 21:32:09 +0000 (UTC)

changeset: 2404:42e0bcc3b9ed
tag: tip
user: Kris Maglione <jg_AT_suckless.org>
date: Tue Oct 28 17:32:08 2008 -0400
files: cmd/wmii/_util.c cmd/wmii/client.c cmd/wmii/mouse.c
description:
Fix Wine sizing bug.

diff -r a7a2894a0268 -r 42e0bcc3b9ed cmd/wmii/_util.c
--- a/cmd/wmii/_util.c Mon Oct 27 22:37:36 2008 -0400
+++ b/cmd/wmii/_util.c Tue Oct 28 17:32:08 2008 -0400
@@ -188,16 +188,17 @@
         /* Fork so we can backtrace the child. Keep this stack
          * frame minimal, so the trace is fairly clean.
          */
- switch(pid = fork()) {
- case -1:
- return;
- case 0:
- kill(getpid(), SIGSTOP);
- _exit(0);
- default:
- _backtrace(pid, btarg);
- break;
- }
+ Debug(DStack)
+ switch(pid = fork()) {
+ case -1:
+ return;
+ case 0:
+ kill(getpid(), SIGSTOP);
+ _exit(0);
+ default:
+ _backtrace(pid, btarg);
+ break;
+ }
 
 }
 
diff -r a7a2894a0268 -r 42e0bcc3b9ed cmd/wmii/client.c
--- a/cmd/wmii/client.c Mon Oct 27 22:37:36 2008 -0400
+++ b/cmd/wmii/client.c Tue Oct 28 17:32:08 2008 -0400
@@ -746,9 +746,11 @@
         free(ret);
 
         if(c->sel) {
- r = client_grav(c, r);
- client_resize(c, r);
- frame_draw(c->sel);
+ c->sel->floatr = c->r;
+ if(c->sel->area->floating) {
+ client_resize(c, c->sel->floatr);
+ frame_draw(c->sel);
+ }
         }
 }
 
diff -r a7a2894a0268 -r 42e0bcc3b9ed cmd/wmii/mouse.c
--- a/cmd/wmii/mouse.c Mon Oct 27 22:37:36 2008 -0400
+++ b/cmd/wmii/mouse.c Tue Oct 28 17:32:08 2008 -0400
@@ -98,31 +98,31 @@
 }
 
 /* Yes, yes, macros are evil. So are patterns. */
-#define frob(xy, yx) \
- Rectangle *rp; \
- int i, txy; \
- \
- for(i=0; i < nrect; i++) { \
- rp = &rects[i]; \
- if((rp->min.yx <= r->max.yx) && (rp->max.yx >= r->min.yx)) { \
- txy = rp->min.xy; \
- if(abs(txy - xy) <= abs(dxy)) \
- dxy = txy - xy; \
- \
- txy = rp->max.xy; \
- if(abs(txy - xy) <= abs(dxy)) \
- dxy = txy - xy; \
- } \
- } \
- return dxy \
+#define frob(x, y) \
+ Rectangle *rp; \
+ int i, tx; \
+ \
+ for(i=0; i < nrect; i++) { \
+ rp = &rects[i]; \
+ if((rp->min.y <= r->max.y) && (rp->max.y >= r->min.y)) { \
+ tx = rp->min.x; \
+ if(abs(tx - x) <= abs(dx)) \
+ dx = tx - x; \
+ \
+ tx = rp->max.x; \
+ if(abs(tx - x) <= abs(dx)) \
+ dx = tx - x; \
+ } \
+ } \
+ return dx \
 
 static int
-snap_hline(Rectangle *rects, int nrect, int dxy, Rectangle *r, int y) {
+snap_hline(Rectangle *rects, int nrect, int dx, Rectangle *r, int y) {
         frob(y, x);
 }
 
 static int
-snap_vline(Rectangle *rects, int nrect, int dxy, Rectangle *r, int x) {
+snap_vline(Rectangle *rects, int nrect, int dx, Rectangle *r, int x) {
         frob(x, y);
 }
 
Received on Tue Oct 28 2008 - 21:32:09 UTC

This archive was generated by hypermail 2.2.0 : Tue Oct 28 2008 - 21:36:04 UTC