Subject: Re: FVWM: PipeRead and mouse grab

From: John Latham <[email-masked]>
Date: Wed, 21 Aug 2002 17:12:00 +0100

> From: Dan Espen <[email-masked]>
> Date: Wed, 21 Aug 2002 11:40:40 -0400

> John Latham <[email-masked]> writes:
> > > From: Dominik Vogt <[email-masked]>
> > > Date: Tue, 20 Aug 2002 19:25:25 +0200
> > > On Tue, Aug 20, 2002 at 05:08:24PM +0100, John Latham wrote:
> ...
> > From the FvwmForm man page, it is not explicitly clear that you can have
> > multiple command lines for one button and that they are executed by FVWM in
> > the order specified, but it seems to work fine. Is it worth putting some
> > multiple ones in an example: e.g. the Capture Window example would be an
> > obvious one? :-)
>
> The rlogin form shown in the man page has multiple commands
> attached to one button.

So it does -- I beg your pardon. I must have missed it because of the long
lines and comments. Don't get me wrong: it is a very nice example in itself.
:-)

> I guess the man page could be more specific
> though.  I'll fix it in a minute.

Thank you very much.

> Dan Espen                           E-mail: [email-masked]

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 [email-masked].
To report problems, send mail to [email-masked].

---

From: John Latham <[email-masked]>
Date: Thu, 22 Aug 2002 17:21:09 +0100

> Date: Wed, 21 Aug 2002 18:39:00 +0200

> On Wed, Aug 21, 2002 at 04:25:35PM +0100, John Latham wrote:
...

> > > It is not documented because nobody knows exactly what is going
> > > on.
> > 
> > I can believe it! :-) However, even a one-line mention in the AddToFunc
> > description would be useful, if you don't mind me saying so.
>
> I will write some warning to discourage the potential user of
> relying on such undocumented 'features'.

That would be helpful, thank you. There must be many others who have yet to
change from 2.2 who may fall fowl when they do, if they were being `ambitious'
like I was in AnotherLevelUp. Something like the following might be useful,
perhaps in the AddToFunc decription:

	Please note, since version 2.3 (or 4), FVWM grabs and hold the mouse
	during execution of complex functions. This is to increase reliablity
	of window focus, but does mean that mouse clicks over any window while
	a function is executing, will be received by FVWM, and not the window.
	This may affect the behaviour of some configurations that worked in
	previous versions of FVWM, particularly if the function execution
	contains a Wait or a Read/PipeRead and hence takes some time to
	execute.

> > But the PipeRead
> > workaround is much less convenient than just having something like a
> > ``UnsafeMouseFocus'' option on AddToFunc. (I am thinking of writing a bit of
> > M4 to turn a function into a PipeRead just for this workaround!)
>
> I wonder if any effort should be made to ease using functionality
> that does not work well.  Maybe it should rather stay unintuitive
> so that users have to ask on the list before doing such things.

You are probably right. I may be biased by my recent experience, and yet I
have found a nice way of doing *most* of the things I could do before, without
ultimately needing to use the unsafe workaround. :-)

>
> > Or, at the risk of me showing total ignorance, would it be possible to make
> > Wait and PipeRead (etc). always release the mouse (or maybe only if BusyCursor
> > is off) when they start, but first remember the window which is focussed. Then
> > at the end grab the mouse (waiting if necessary) and restore focus?
>
> Doesn't work with functions that set the focus explicitly.  There
> are numerous occurances where you want the focus change.

Yes, and I guess you couldn't reliably detect which ones are wanted in the
context of the function, and which ones are not. :-(

> Bye
> Dominik ^_^  ^_^

Best wishes, John Latham