Re: FVWM: Switching desktops with cursor keys problematic

From: Mikhael Goikhman <migo_at_homemail.com>
Date: Tue, 20 May 2003 20:20:06 +0000

On 20 May 2003 16:49:13 +0200, Felix E. Klee wrote:
>
> some time ago I set up keyboard shortcuts for switching desktops with the
> cursor keys. For example the left key calls the function
>
> AddToFunc GotoDeskLeft
> + I . GotoDesk %{ ($[desk.n]%$f::hdesks >= 1) ? -1 : 0; }%
>
> This function checks if the current desktop is in a certain range and calls
> GotoDesk accordingly. The problem however is that when I hit the left key
> very fast a couple of times, GotoDesk isn't finished between successive
> calls to GotoDeskLeft. Therefore $[desk.n] might not be up to date in
> certain calls to GotoDeskLeft and I end up on a desktop out of range.
>
> Any ideas how to solve that problem?

Please always specify which version do you run.
Please always provide enough of the configuration to be understandable,
one may only guess how exactly you defined the "." function.

Anyway, I think that you use 2.5.6 instead of a later snapshot, this is
why it does not synchronized for you. Works for me.

Another solution (not sure why you don't use it anyway) is to use
GotoDesk with the first zero parameter:

  . %{ $[desk.n] > 0 ? "" : "#" }% GotoDesk 0 %{ $[desk.n] - 1 }%

Then you don't need any synchronization between fvwm and FvwmPerl and it
may work in 2.5.6 too.

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 Tue May 20 2003 - 15:23:10 BST

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