Subject: FakeClick

From: Dan Espen <[email-masked]>
Date: Fri, 02 Mar 2001 20:47:02 -0500

Dominik Vogt <[email-masked]> writes:
> Dan, this is exactly what I wrote the FakeClick command for. To
> fake a mouse click in a window programmatically, warp the pointer
> into the window and issue...

I think  the man page  needs  some work  in  this area.  I've  put the
example you posted into the man page which  helps a lot, but I haven't
committed it yet.

This doesn't seem to work:

DestroyFunc W
AddToFunc W I Exec xterm -name $0 -g 10x10-20000-2000

DestroyModuleConfig FButt: *
*FButt: Geometry +300+300
*FButt: ButtonGeometry 32x32
*FButt: Back gray
*FButt: Fore white
*FButt: BoxSize smart
*FButt: Columns 2
*FButt: Rows 2
*FButt: (Panel(up,    indicator) bu "W bu")
*FButt: (Panel(right, indicator) br "W br")
*FButt: (Panel(left,  indicator) bl "W bl")
*FButt: (Panel(down,  indicator) bd "W bd")

Module FvwmButtons FButt

DestroyFunc Operate
AddToFunc Operate
 + I Next (FvwmButtons) WarpToWindow 20p 20p
 + I FakeClick Depth 3 press 1 wait 3000 release 1

Operate

The FvwmButtons part works, but when I issue "Operate"
theres no reaction from FvwmButtons.  At depth 2 I pop up
a root button 1 menu, but at 3, I'd expect FvwmButtons to
react but it doesn't.

--
Dan Espen
444 Hoes Lane  Room RRC 1C-214           E-mail: [email-masked]
Piscataway, NJ 08854                     Phone: (732) 699-5570
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Dominik Vogt <[email-masked]>
Date: Sat, 3 Mar 2001 16:30:26 +0100

> example you posted into the man page which  helps a lot, but I haven't

The FakeClick command is really not meant for users, just for the
developers.  If you can rephrase the description in a better way,
feel free to do so.  As a mathmatician I have an intuitive
knowledge of how to phrase simple facts in a complicated manner.

> This doesn't seem to work:

Add

  Style FButt CirculateHit, neverfocus, mousefocusclickraisesoff

>  + I Next (FvwmButtons) WarpToWindow 20p 20p
             ^^^^^^^^^^^

I'd use (FButt) instead.

> a root button 1 menu, but at 3, I'd expect FvwmButtons to

  Depth 1 = root window
  Depth 2 = frame window
  Depth 3 = parent window
  Depth 4 = client window
  ...
  Depth infinity = whatever lowest level window the pointer in in.

Events propagate upward as usual.

The event mask in the fake_click() function was wrong.  I have
fixed this and it should work now.  You have to be extra careful
when using FakeClick in combination with modules.  Fvwm does not
properly process events in a FakeClick script, so you should never
put more than one click plus one release in a single line.
Multiple click/release sequences lead to weird race conditions in
the swallowing/panel code between fvwm and FvwmButtons.  One
effect I saw was FvwmButtons complaining that the panel was
swallowed by someone else or fvwm not decorating the panel.

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-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]