Subject: FVWM: PipeRead and mouse grab

From: John Latham <[email-masked]>
Date: Mon, 12 Aug 2002 18:35:09 +0100

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, 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?

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: Dominik Vogt <[email-masked]>
Date: Tue, 13 Aug 2002 00:57:34 +0200

On Mon, Aug 12, 2002 at 06:35:09PM +0100, John Latham wrote:
> 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, [email-masked]
Reply-To: [email-masked]
--
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].