commit fce91f19d8e948f37c8dbfc956d85e03e5a92037
parent 4107896be947e93ea6628f7f3bb640c0748b234f
Author: Kris Maglione <jg@suckless.org>
Date: Tue, 28 Oct 2008 17:32:08 -0400
Fix Wine sizing bug.
Diffstat:
3 files changed, 35 insertions(+), 32 deletions(-)
diff --git a/cmd/wmii/_util.c b/cmd/wmii/_util.c
@@ -188,16 +188,17 @@ backtrace(char *btarg) {
/* 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 --git a/cmd/wmii/client.c b/cmd/wmii/client.c
@@ -746,9 +746,11 @@ updatemwm(Client *c) {
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 --git a/cmd/wmii/mouse.c b/cmd/wmii/mouse.c
@@ -98,31 +98,31 @@ rect_morph(Rectangle *r, Point d, Align *mask) {
}
/* 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);
}