Subject: FVWM: EdgeCommand question

From: [email-masked]
Date: 30 Aug 2004 00:08:49 -0000

Hello All,

I've taken an EdgeCommand example from fvwm's man page and tried to
modify it so that the FvwmButtons window (located along the bottom part
of the screen) gets raised when the cursor hits the bottom edge of the
screen, and gets iconified when the cursor leaves the FvwmButtons window.
Unfortunately due to my limited experience with fvwm's config I could
not do that.   I'd appreciate if the gurus on the list could help me out.
Here is what I wrote:

		Style FvwmButtons MouseFocus

                   # Set thickness of the edge of the screen to 1
                   EdgeThickness 1

                   # Give focus to FvwmButtons if the mouse
                   # hits bottom edge
                   EdgeCommand Bottom Next (FvwmButtons) Focus

                   Module FvwmButtons
                   Module FvwmAuto 100 \
                        "Silent AutoRaiseFunction" \
                        "Silent AutoLowerFunction"

                   DestroyFunc AutoLowerFunction
                   AddToFunc AutoLowerFunction
                   + I Current (!FvwmButtons) \
                        All (FvwmButtons) Iconify

                   # If FvwmButtons has focus when calling \
                   # this function raise it
                   DestroyFunc AutoRaiseFunction
                   AddToFunc AutoRaiseFunction
                   + I Current (FvwmButtons) Raise

I want FvwmButtons disappear completely when the mouse leaves FvwmButtons
window, regardless whether the pointer goes into the root area or to
another window.  With the setup above, FvwmButtons window disappears and
appears again during swiching of the desks, in a seemingly random fashion.

I currently use another example from FAQ to make FvwmButtons shade or
unshade (I've put the relevant .fvwm2rc lines below the signature),
but this setup leaves an annoying piece of FvwmButtons at the bottom of
the screen.

Many thanks!
--
Vladimir

      AddToFunc autohide
      + I ThisWindow ($0) Deschedule $[w.id]
      + I ThisWindow ($0) ThisWindow (shaded) WindowShade off
      + I TestRc (!Match) All ($0, !shaded) autohide_hide $1 $2

      AddToFunc autohide_hide
      + I Schedule $0 $[w.id] WindowShade $1
      + I Schedule $0 $[w.id] Deschedule $[w.id]

      # Start FvwmAuto
      AddToFunc StartFunction
      + I Module FvwmAuto FvwmAutohide -menter enter_handler

      # Add the windows you want to autohide
      AddToFunc enter_handler
      + I autohide Bottombar 500 S
                           + I Current (FvwmButtons) Raise

      #            ^           ^   ^
      #            |           |   |___  Shade direction (optional)
      #            |           |_______  Hide delay (milliseconds)
      #            |___________________  Unique window name/resource

--
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, 31 Aug 2004 13:45:08 +0200

> but this setup leaves an annoying piece of FvwmButtons at the bottom of

This is the best version of the function I managed to write:

EdgeCommand Bottom Next (FvwmButtons) Focus
Style FvwmButtons CirculateHit, MouseFocus

Module FvwmButtons
Module FvwmAuto 100 "Silent AutoRaiseFunction"

DestroyFunc AutoLowerFunction
AddToFunc AutoLowerFunction
+ I ThisWindow (FvwmButtons) Iconify on

# If FvwmButtons has focus when calling this function raise it
DestroyFunc AutoRaiseFunction
AddToFunc AutoRaiseFunction
+ I All (!Iconic, !Focused, FvwmButtons) Iconify on
+ I Current (Iconic, FvwmButtons) Iconify off
+ I Current (FvwmButtons) Raise
--

Unfortunately, it does not hide the the buttons window when the
pointer moves to the root window.  While this works fine with the
shading version from the FAQ, it's nigh impossible to do right
with the iconifying version.  If this is too annoying for you, try
shading to a corner instead of the whole bottom edge.

Ciao

Dominik ^_^  ^_^

 --
Dominik Vogt, [email-masked]
Reply-To: [email-masked]