>
> I don't know how it exactly works internally, but you can not
> expect that changing bindings or functions works inside complex
> functions. Anyway, there is a much simpler solution for what you
> want to achieve. Take a look at Q 7.12 from the FAQ:
>
> AddToFunc ToggleFvwmConsole
> + I None (FvwmConsole) Module FvwmConsole
> + I Next (CurrentPage Visible FvwmConsole) Close
> + I Next (FvwmConsole) MoveToDesk
> + I Next (FvwmConsole) MoveToPage
> + I Next (FvwmConsole) Raise
>
> AddToMenu <some menu>
> + "toggle FvwmConsole" Function ToggleFvwmConsole
>
> Or for a toggling Netscape button:
>
> AddToFunc ToggleNetscape
> + I None (Navigator) Exec exec netscape
> + I All (Navigator) Close
>
I added a function like this:
AddToFunc TogglePager
+ I None (FvwmPager) StartPager
+ I All (FvwmPager) Close
(StartPager is another function used to start the pager (used also in the
init, it works...)
If the pager is not running, this function starts it.
If it is running, it's closed and about a second or so later it starts
again.
I also wrote another function just to test, like this:
AddToFunc ToggleCalc
+ I None (XCalc) Exec xcalc
+ I All (XCalc) Close
it works as it should, toggling an xcalc.
Is the pager to slow to exit?
//Marcus
--
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 Tue May 21 2002 - 08:12:31 BST