Re: FVWM: Hide comand again

From: Mikhael Goikhman <migo_at_homemail.com>
Date: Fri, 8 Mar 2002 22:54:27 +0000

On 08 Mar 2002 01:52:43 +0100, Marcus Lundblad wrote:
>
> I implemented the Hide command like this:
>
> AddToFunc
> + "I" MoveToDesk 0 12356
>
> Though, if I run this on a sticky window, it stays sticky.
> In the documentation it says on "MoveToPage" that it turns off sticky if
> it's on, but it doesn't say so for MoveToDesk (and it apparently doesn't).
> Is this intentional?

I don't think MoveToDesk should unstick a window. MoveToPage does unstick.

Ok, here is my implementation of your hide and unhide functions:

  DestroyFunc HideWindow
  AddToFunc HideWindow
  + I Pick # enable interactive execution of HideWindow
# + I Cond (Error) Break # this syntax is valid in 2.5.x, may be changed
  + I AddToFunc RestoreStickinessOf$w
  + I WindowId $w (Sticky) + I Stick on
  + I WindowId $w (Sticky) Stick off
# + I + I Break # you may add this line in 2.5.x
  + I MoveToDesk 0 123

  DestroyFunc UnhideWindow
  AddToFunc UnhideWindow
  + I AddToFunc RestoreStickinessOf$w
  + I Function RestoreStickinessOf$w
  + I DestroyFunc RestoreStickinessOf$w
  + I MoveToDesk

If you use 2.4.x, don't include commented out lines, they are not needed.
It is possible to simplify these functions a bit if don't want to handle
situations like two "hide" or two "unhide" on the same window. Usage:

  All ("XClock") HideWindow
  All ("XClock") UnhideWindow

Regards,
Mikhael.
--
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 majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Fri Mar 08 2002 - 16:54:52 GMT

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:52 BST