Re: FVWM: PipeRead and mouse grab

From: Dominik Vogt <dominik.vogt_at_gmx.de>
Date: Tue, 13 Aug 2002 00:57:34 +0200

On Mon, Aug 12, 2002 at 06:35:09PM +0100, John Latham wrote:
> I have a function that used to work under 2.2, but does not under 2.4.8 nor
> 2.5.2. It is part of a window print capture form:
>
> *CaptureButton continue "Capture" ^M
> *CaptureCommand CaptureCommand "$(file)" "$(Options)"
>
> AddToFunc CaptureCommand
> + "I" Current [Capture] Iconify
> + "I" PipeRead "exec xwd -out \"$0\" $1"
> + "I" Prev [Capture] Iconify
>
> A message from xwd complains that it cannot grab the mouse. It works fine if I
> use an Exec instead of PipeRead, except for the obvious timing: I want the
> Capture form to disappear while I grab the window image.
>
> If there is a good reason for PipeRead being less liberal with X resources
> than Exec is,

That's necessary to display the watch cursor while a function
executes. Unfortunately we missed the implications about starting
applications that need to grab the mouse and forgot to mention it
in big bold letters in the NEWS and man page.

> would it be feasible to offer a version of Exec that does not
> start a separate thread / process? Or, to offer a WaitExec
> command that waits for the most recently started Exec?

You mean "starts the process syncronously". This has been
discussed a few times. The solution is PipeRead again. Try this:

  AddToFunc CaptureCommand
  + I BusyCursor read off
  + I Current (Capture) Iconify
  + I PipeRead "exec xwd -out \"$0\" $1"
  + I Prev (Capture) Iconify
  + I BusyCursor read on

Bye

Dominik ^_^ ^_^

 --
Dominik Vogt, dominik.vogt_at_gmx.de
Reply-To: dominik.vogt_at_gmx.de
--
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 Mon Aug 12 2002 - 18:13:41 BST

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