[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [STUMP] I want a _tiling_ WM, damn it!
From: |
Greg Pfeil |
Subject: |
Re: [STUMP] I want a _tiling_ WM, damn it! |
Date: |
Thu, 14 Aug 2008 09:49:47 -0400 |
User-agent: |
Thunderbird 2.0.0.0 (X11/20070426) |
Ok, I just forgot about this for a while, because it was easy enough to clear the layout and start
over whenever it happened, but I at least have a little more info now.
John Li wrote:
On Tue, Jul 01, 2008 at 03:03:38PM -0400, Greg Pfeil wrote:
I just upgraded to SBCL 1.0.15 and stumpwm 0.9.3, and somehow (after
resizing the leftmost frame), I managed to get overlapping windows:
http://technomadic.org/overlapping-windows.png
After that, I can't get to either the left or right frame anymore, and if
I try to remove the frames in the center area, I get "Error In Command
'remove': tree-split-type unknown".
Suggestions?
From the screenshot, it looks like the frame layout has been
wonkified. Running the "dump-group-to-file" command will let you
examine the layout.
Doesn't help fix it, of course, but might help in finding out what's
going wrong. Have you experienced this more than once?
I can get it to happen pretty reliably. I just create a moderately complex layout, then do a bunch
of resizing, and the little window starts to creep over. My guess is that it's a rounding error when
I'm (for example) widening frame 0, and that gets translated to subframes 3 and 4. Note my artists
rendering (the 'x's represent the overlapping bit):
-----------------------
|0 |1 |2|
| | | |
| | | |
|----------- | |
|3 |4 x | |
| | x | |
-----------------------
I've also attached the (annotated) group dump.
I made a small change that should fix this issue (see attached diff). Rather than using TRUNCATE
when calculating the adjustments for the subframes, use FLOOR, this way negative values when
shrinking the frame won't get underestimated.
I think there's still an issue of non-optimal sizings here (over time, a frame could shrink smaller
than its allowable space), but it shouldn't cause a problem with frame navigation anymore.
#S(GDUMP
:NUMBER 1
:NAME "work"
:TREE (((#S(FDUMP
:NUMBER 0
:X 0
:Y 0
:WIDTH 810
:HEIGHT 805
:WINDOWS (16777274 12583324)
:CURRENT 16777274)
(#S(FDUMP
:NUMBER 3
:X 0
:Y 805
:WIDTH 529
:HEIGHT 395
:WINDOWS (6291459)
:CURRENT 6291459)
#S(FDUMP
:NUMBER 4
:X 529
:Y 805
:WIDTH 283 ; frame ends at 812
:HEIGHT 395
:WINDOWS NIL
:CURRENT NIL)))
#S(FDUMP
:NUMBER 1
:X 810 ; but this one starts at 810
:Y 0
:WIDTH 640
:HEIGHT 1200
:WINDOWS (20971711)
:CURRENT 20971711)
#S(FDUMP
:NUMBER 2
:X 1450
:Y 0
:WIDTH 150
:HEIGHT 1200
:WINDOWS (14680150)
:CURRENT 14680150)))
:CURRENT 4)
diff -b -u /home/gpfeil/Documents/sources/stumpwm-0.9.3/frame.lisp
/home/gpfeil/Documents/sources/stumpwm-0.9.3/frame.lisp.fix
--- /home/gpfeil/Documents/sources/stumpwm-0.9.3/frame.lisp 2008-08-14
09:43:29.965574000 -0400
+++ /home/gpfeil/Documents/sources/stumpwm-0.9.3/frame.lisp.fix 2008-08-14
09:43:57.913391000 -0400
@@ -400,7 +400,7 @@
(total (funcall sz-fn tree))
(amt-list (loop for i in children
for old-sz = (funcall sz-fn i)
- collect (truncate (/ (* amount old-sz)
total))))
+ collect (floor (* amount old-sz) total)))
(remainder (- amount (apply '+ amt-list)))
(ofs 0))
;; spread the remainder out as evenly as possible
Diff finished. Thu Aug 14 09:44:32 2008
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [STUMP] I want a _tiling_ WM, damn it!,
Greg Pfeil <=