Subject: FVWM: Auto raise/lower particular window

From: Richard Curnow <[email-masked]>
Date: Tue, 26 Mar 2002 13:26:14 +0000

I'd like to make FvwmIconMan and FvwmButtons be raised if the mouse goes over
them, and lowered when the mouse leaves them.  My current attempt looks like

Module FvwmAuto 250 "Silent AutoRaiseFunction" "Silent AutoLowerFunction"

DestroyFunc AutoRaiseFunction
AddToFunc AutoRaiseFunction
+ I Current (FvwmIconMan) Raise
+ I Current (FvwmButtons) Raise

DestroyFunc AutoLowerFunction
AddToFunc AutoLowerFunction
+ I Current (FvwmIconMan) Lower
+ I Current (FvwmButtons) Lower

, but this doesn't work.  When the mouse enters the FvwmIconMan window, I see
it briefly flashed to the front and then lowered again.  I think the problem is
that AutoLowerFunction is being called for the window that's just been left,
but the current window by then is FvwmIconMan, so the lower action is applied
when I don't want it.  Conversely, when I leave the window, by the time
AutoLowerFunction is called the current window isn't FvwmIconMan any longer, so
the condition doesn't match and nothing happens.

Is there a way of making the actions conditional on the window that was current
when the event was originally signalled?  Or another trick that I'm missing?
Alternatively (and more effieciently!), can FvwmAuto be made to only handle
enter and leave events for particular windows?

Richard

-- 
Richard \\\ SuperH Core+Debug Architect ///            .... At home ...
  P.    /// [email-masked]      /// [email-masked]
Curnow  \\\ http://www.superh.com/    ///      www.rrbcurnow.freeuk.com
Speaking for myself, not on behalf of SuperH
--
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, 26 Mar 2002 14:53:00 +0100

On Tue, Mar 26, 2002 at 01:26:14PM +0000, Richard Curnow wrote:
> , but this doesn't work.

Well, of course not.  You want to lower the modules if the current
window is *not* one of them.  Try this:

  DestroyFunc AutoLowerFunction
  AddToFunc AutoLowerFunction
  + I Current (!FvwmIconMan) All (FvwmIconMan) Lower
  + I Current (!FvwmButtons) All (FvwmButtons) Lower

Bye

Dominik ^_^  ^_^

-- 
Dominik Vogt, email: [email-masked]
LifeBits Aktiengesellschaft, Albrechtstr. 9, D-72072 Tuebingen
fon: ++49 (0) 7071/7965-0, fax: ++49 (0) 7071/7965-20
--
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: Richard Curnow <[email-masked]>
Date: Tue, 26 Mar 2002 14:06:59 +0000

Thanks, Dominik.  That was the trick I was looking for!  It's now working just
the way I wanted.

Cheers
Richard

---

From: Mikhael Goikhman <[email-masked]>
Date: Tue, 26 Mar 2002 14:19:18 +0000

>   + I Current (!FvwmButtons) All (FvwmButtons) Lower

I think this gives even better results, depending on needs:

Module FvwmAuto 250 "Silent AutoRaiseLowerFunction"

DestroyFunc AutoRaiseLowerFunction
AddToFunc   AutoRaiseLowerFunction
+ I Current (FvwmIconMan) Raise
+ I Current (FvwmButtons) Raise
+ I Current (!FvwmIconMan) All (FvwmIconMan) Lower
+ I Current (!FvwmButtons) All (FvwmButtons) Lower

Regards,
Mikhael.