Re: FVWM: PipeRead and mouse grab

From: John Latham <jtl_at_cs.man.ac.uk>
Date: Tue, 20 Aug 2002 17:08:24 +0100

> From: Dominik Vogt <fvwm_at_fvwm.org>
> Date: Tue, 20 Aug 2002 17:03:23 +0200

 .... stuff about BusyCursor and PipeRead with the capture form.


> > I have tried this but it does not work. :-( I had not switched on BusyCursor
> > for read anyway -- off by default -- so no surprise.

> No, it's on by default.

Hmm - I believed the man page:

        ``The default is:

                   BusyCursor DynamicMenu False, \
                     ModuleSynchronous False, Read False, \
                     Recapture True, Wait False''

(I am using FVWM 2.5.2).

The only BusyCursor commands in my M4 output are:

        BusyCursor DynamicMenu True

and those which are part of the Capture stuff.

Before doing anything with the capture form after a restart, I have just tried

        PipeRead "sleep 5"

via FvwmTalk (I know, I should use FvwmConsole!...) and I got no watch cursor
during the delay. Doing a BusyCursor read on then the same PipeRead does
indeed give me a watch for 5 seconds.

> > I guess the read /
> > PipeRead code currently grabs the mouse even if BusyCursor read is off. I
> > shall continue to anticipate a fix in time for 2.6, and use Exec instead for
> > this function, for FVWM 2.4 and 2.5 in AnotherLevelUp. ;-)
>
> Yes, that's because it's running in a complex function.

Really? Why does that make a difference? (Ahh -- see below.)

> Make it a
> single command and it works:
>
> PipeRead "echo 'BusyCursor read off'; echo 'Current (Capture) Iconify'; echo xwd -out out.xwd; echo 'Prev (Capture) Iconify'; echo 'BusyCursor read on'"

Slight error in your suggestion echo xwd should be xwd. I have just tried it,
and it works -- brilliant thanks!

So, given that I'm convinced that BusyCursor read is already off (sorry!), I
have just tried:

*CaptureCommand PipeRead "echo 'Current (Capture) Iconify'; xwd -out /home/jtl/captured-window; echo 'Prev (Capture) Iconify'"

(i.e. what you suggested, but without the BusyCursor parts, and I need to fix
up the file name part) and...

        IT WORKS!!!

Maybe it is not so connected to BusyCursor as we thought?

Ah ha -- your next email explains it all.

> In complex functions, the pointer must be grabbed to prevent
> screwing up certain kinds of functions.

I now realise this accounts for the problem I had with Wait too, as that was
being executed in a Function (of course).

I have just looked, but could not find a mention of this in the man page. I
think it is quite a significant feature of functions and ought to be
documented, if you don't mind me saying so. Also, is it worth considering
having the ability to disable the grab when the user needs it and knows it is
safe to? (When would it be safe?).

Many thanks for your help.

>
> Bye
>
> Dominik ^_^ ^_^

Best wishes, John Latham
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Tue Aug 20 2002 - 11:09:22 BST

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:53 BST