Re: [Sawfish] Window dimensions are off by 226x238 when set via Window Rules

[ Thread Index | Date Index | More lists.tuxfamily.org/sawfish Archives ]


Hi. Thanks, I was looking for that entry-point since the
beginning...somehow I managed to completely miss the subfolders with
further scripts there.

resize-window-with-hints seems to take not the size in pixels, but in
rows and columns which are being calculated for each window (don't
what that is, though). But resize-window-with-hints* takes the pixel
values. The options dialogs seems also to assume pixels...and that's
where they clashed for me, as resize-window-with-hints was called with
the pixel values, which screwed the size completely. So basically I
just removed the calculations and directly handed the values down to
resize-window-with-hints.

I'm not sure if this is a nVidia issue, as I was able to reproduce this
on my Laptop with an Intel chipset.

As it seems, the match-window.jls seems to be the only script/part which
calls resize-window-with-hints, everything else calls
resize-window-with-hints*...I wonder if that's a typo or a simple remain
from previous versions.

So, I came up with an even easier fix thanks to you:

diff lisp/sawfish/wm/ext/match-window.jl
448c450
<       (resize-window-with-hints w (car value) (cdr value))))
---
>       (resize-window-with-hints* w (car value) (cdr value))))

Works perfectly, too.

If somebody has something to debug this are some further insides, I'll
do what I can to help.

Thanks so far!

On Thu, 05 Jul 2012 13:48:52 +0900 (JST)
Teika Kazura <teika@xxxxxxxxxxx> wrote:

> On Tue, 3 Jul 2012 20:59:49 +0200, "Robert 'Bobby' Zenz" wrote:
> > After not knowing what else to do, I ended up with this...well,
> > hack:
> > 
> > diff
> > tmp/sawfish/sawfish-1.9.0/lisp/sawfish/wm/windows.jl /usr/local/share/sawfish/lisp/sawfish/wm/windows.jl
> > 382,384c382,386 <       (resize-window-to
> > <        w (constrain-dimension-to-hints (+ x-base (* x-inc cols))
> > 'x hints) <        (constrain-dimension-to-hints (+ y-base (* y-inc
> > rows)) 'y hints)))) ---
> >>       (resize-window-to w cols rows hints)
> >>       ;;;(resize-window-to
> >>       ;;; w (constrain-dimension-to-hints (+ x-base (* x-inc
> >> cols)) 'x hints) ;;; (constrain-dimension-to-hints (+ y-base (*
> >> y-inc rows)) 'y hints)) ))
> > 
> > That fixes the problem completely...
> 
> Hi. Glad to know your problem is gone, but this is not a bug of
> Sawfish. Maybe due to rare race conditions? (IIRC there were trouble
> reports only for nVidia drivers a couple of years ago.)
> 
> But if the same issue is frequent, it may be better to provide a
> workaround option.
> 
> The involved function is resize-window-with-hints, which is only used
> from match-window.jl. All other functions use
> resize-window-with-hints*. (Notice the last asterisk.) I don't know
> what's the difference. Could anyone help?
> 
> Teika (Teika kazura)
> 
> 


-- 
Sawfish ML


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/