On Monday, 18. November 2019 17:22, Dr Rainer Woitok <rainer.woi...@gmail.com> 
wrote:

> Greetings,
>
> On Saturday, 2019-11-16 16:42:01 +0000, Hegel3DReloaded wrote:
>
> > ...
> > You need to leave this page.
>
> Well, when I'm there, I'll have to leave this page. But I don't want to
> get there in the first place. That's why I used the "SkipMapping" style
> which I THOUGHT would prevent exactly this.
>
> >                Since this is probably in the InitFunction, then simply:
> >
>
> No, as could be clearly seen, it's not in the "InitFunction" but rather
> in a shell script named "firefox-start-up.sh" which contains the command
> "nohup firefox > /dev/null 2>&1 &".
>
> But perhaps that's the cause? Does "SkipMapping" only work for applic-
> ations started from within the "fvwm" configuration file? Could anyone
> shed some light on this?

If it is running on the same $DISPLAY, it should behave exactly the same no
matter if started from FvwmButtons, shell script or database trigger which
puts job in RabbitMQ ...

Your problem appeared trivial to me, but I have tried this in a test
environment and found VERY interesting behaviour: Firefox is desparately
trying to get in focus and under the mouse when started. It goes to the
desk and page we told it, SkipMapping works, but window program is jumping
back to you like a stray dog for a peace of meat. It is fast, so you cannot
see it without serious throttling of the CPU and GPU. I have tried couple other
applications, but none of them exercises this behaviour. Tried even with
InitialMapCommand style - with that, we have more freedom for experimenting.

This doesn't work (Firefox gets back):
Style Firefox InitialMapCommand MoveToPage 1 1

This works as a workaround:
Style Firefox InitialMapCommand Schedule 500 MoveToPage 1 1

This:
Style Firefox StartsOnPage 0 1 1, SkipMapping, InitialMapCommand Schedule 500 
MoveToPage 1 1

will produce the following funny scenario:

- Firefox appears on X server
- Immediately mapped by FVWM on page 1 1
- It gets back to you like a dog
- ~ 0.5 seconds later, FVWM will kick it back where it belongs. :)

I remember couple years ago, when 2-3 seconds after mapping Firefox moves
cca 1cm above top edge of the screen. It was the cat and mouse game between
Firefox and FVWM ... FVWM wins ... most of the time.

> > Why not something like this in InitFunction or SessionInitFunction?
> >
> > -   I Exec exec firefox
> > -   I Wait Firefox
> > -   I Next (Firefox) MoveToPage 0 1
>
> From the "fvwm" manpage I gather that "Wait ..." "causes execution of a
> function to pause until a new window matching ... appears".
>
> That's exactly what I want NOT to do! I do NOT want to watch Firefox
> waiting for the WiFi to become ready and then to reload all its tabs! I
> want to enter commands into my terminal window in another page instead!

I think you don't understand. It will last only up to the point when
Firefox window appears on the screen, after that, it will be moved from
the way, and can load it's tabs next two days if it wants.

BTW, This is the other way to acomplish certain order on workspaces after
login. It is preferred by me, so I didn't knew about Firefox agressive
behaviour until now.

> By the way: could you please explain the purpose of the "Next (Firefox)"
> clause after using "Wait Firefox" to wait until the window has mapped?
> Why not just use a plain "MoveToPage 0 1" here?

Because MoveToPage X Y will most probably be executed before Firefox appears.


In short, your best change is InitialMapCommand with Schedule X hack. Maybe
not 500, maybe it can be 200 or 50 ... practice.



... one of the main causes of the fall of the Roman Empire
was that, lacking zero, they had no way to indicate
successful termination of their C programs.
          -- Robert Firth

Reply via email to