changeset: 2514:10caf8c39257
tag: tip
user: Kris Maglione <jg_AT_suckless.org>
date: Fri Oct 02 16:21:12 2009 -0400
files: cmd/wmii/column.c
description:
Fix returning from fullscreen. Closes issue #104. Closes issue #22.
diff -r b7cf943c8c72 -r 10caf8c39257 cmd/wmii/column.c
--- a/cmd/wmii/column.c Fri Oct 02 16:12:22 2009 -0400
+++ b/cmd/wmii/column.c Fri Oct 02 16:21:12 2009 -0400
@@ -295,23 +295,14 @@
pos = nil;
for(fp=a->frame; fp; pos=fp, fp=fp->anext) {
- if(r.max.y < fp->r.min.y)
+ if(r.max.y < fp->r.min.y || r.min.y > fp->r.max.y)
continue;
before = fp->r.min.y - r.min.y;
- after = r.max.y - fp->r.max.y;
- if(abs(before) <= abs(after))
- break;
- }
- if(Dy(a->r) > Dy(r)) {
- /* Kludge. */
- before = a->r.max.y;
- a->r.max.y -= Dy(r);
- column_scale(a);
- a->r.max.y = before;
+ after = -fp->r.max.y + r.max.y;
}
column_insert(a, f, pos);
+ column_resizeframe_h(f, r);
column_scale(a);
- column_resizeframe_h(f, r);
}
void
@@ -674,7 +665,7 @@
if(fp)
r.min.y = max(r.min.y, fp->colr.min.y + minh);
- else /* XXX. */
+ else
r.min.y = max(r.min.y, a->r.min.y);
if(fn)
@@ -686,10 +677,15 @@
fp->colr.max.y = r.min.y;
frame_resize(fp, fp->colr);
}
+ else
+ r.min.y = min(r.min.y, r.max.y - minh);
+
if(fn) {
fn->colr.min.y = r.max.y;
frame_resize(fn, fn->colr);
}
+ else
+ r.max.y = max(r.max.y, r.min.y + minh);
f->colr = r;
frame_resize(f, r);
Received on Fri Oct 02 2009 - 20:47:09 UTC
This archive was generated by hypermail 2.2.0 : Fri Oct 02 2009 - 20:48:07 UTC