Subject: FVWM: match on root window enter

From: [email-masked] (Danny Dulai)
Date: 23 Feb 2000 04:54:11 -0000

I need a function to execute if you have lost all focus, when FvwmEvent
with FvwmEventPassID passes $0 as '0'.

Any suggestions?

-- 
___________________________________________________________________________
Danny Dulai                                           Feet. Pumice. Lotion.
http://www.ishiboo.com/~nirva/                            [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].

---

From: Tim Phipps <[email-masked]>
Date: Wed, 23 Feb 2000 09:14:53 +0000

> with FvwmEventPassID passes $0 as '0'.

I haven't tried this so it might not work but you could use the fact
that if FvwmEvent passes anything other than 0 it is a window id.  If
the function you want to execute is called root_func this might work:

AddToFunc test_focus
+ I DestroyFunc root_focus
+ I AddToFunc root_focus I root_func
+ I WindowId $0 DestroyFunc root_focus
+ I AddToFunc root_focus I NOP
+ I root_focus

If $0 is a valid id then root_focus becomes (NOP), if it's 0 then
root_focus becomes (root_func, NOP).

Let us know if it works.
Cheers,
Tim.