Stefan Blachmann <[email protected]> writes:

> This is a long story...
> sessionrestore.js some day years ago got a regression and no longer
> did check for out-of-bounds coordinates indicating windows being
> placed on other virtual screens, i.e. it placed windows way
> off-screen, at crazy coordinates like -40000, 30000 etc.
>
> I reported this to Mozilla and asked this to be fixed. This resulted
> in the "fix" that all coordinates were clipped to the current virtual
> screen size, piling the restored FF windows in the current virtual
> screen.

I thought FixedPPosition is preventing this?

Maybe I´m mistaken:


"FixedPPosition and FixedPSize make fvwm ignore attempts of the program
to move or resize its windows.  [...]  If windows are created at strange
places, try either the VariablePPosition or !UsePPosition styles."

"!UsePPosition instructs fvwm to ignore the program specified position
(PPosition hint) when adding new windows."


Maybe it works when I use both options.  I didn´t realise that one
prevents the window from being moved and the other from being created at
a particular position by the program that creates the window.

But that doesn´t work either, the windows are placed on top of each
other again.  With !UsePPosition alone, I get the windows placed as I
want it, but it means Firefox is moving them rather than that fvwm
places them.

> I was annoyed and looked into that.
> session[re]store.js is a *horrible* mess of code, and to understand
> its workings, I just disabled the screen bounds check where
> sessionrestore creates the windows from the data in the
> sessionrestore.js file and wrote a script that just corrects the
> coordinates in the sessionrestore.js file, so that Firefox restores as
> it should.
> So I could just run the firepox script, after that run FF, it should
> restore the windows where they originally were.
>
> The script might be outdated for new FF versions, as the
> sessionrestore code was changed again in the meantime, introducing
> again random placement of restored windows.
> But reading it might give you some insight of the workings in the
> sessionrestore.js files.
>
> It is on github together with a small intro, here:
> https://github.com/kernschmelze/firepox

Thanks!  I think it must not be possible at all for a program that
creates windows to override the very window manager that manages the
windows.  So this probably needs to be fixed in fvwm.

Should I make a bug report?

Reply via email to