Morning all,
        A feature request:

1) Could I have $[pointer.x]/$[pointer.y] variables to return the pointer position relative to the window frame? I would use this to create a WarpToWindow function so the number should be pixels from the top-left of the fvwm frame. It might be useful for "WindowId Root $[pointer.x]" to return the absolute position (not sure about xinerama).

What I'm trying to do is to implement a learning cursor warping scheme. What I want is for fvwm to remember where the cursor was in each window when it was warped away so that if the cursor is warped back to a window it gets warped to the old location. At the moment I have a semi intelligent function to warp the cursor to sensible places but the function is going to get very large:

# functions to warp cursor to somewhere useful depending on window type
NewFunc(my_conditional_cursorwarp)
+ I                Current (Transient) WarpToWindow 50 50
+ I Cond (NoMatch) Current (XTerm)     WarpToWindow -10p -70p
+ I Cond (NoMatch) Current (Fvwm*)     WarpToWindow 50 50
+ I Cond (NoMatch) Current             WarpToWindow 35p 40p

What I'd like is something like this

NewFunc(my_NEW_conditional_cursorwarp)
+ I PointerWindow my_record_warp
+ I AddToFunc my_warp_$w I my_conditional_cursorwarp
+ I AddToFunc my_warp_$w I Break
+ I my_warp_$w

NewFunc(my_record_warp)
+ I DestroyFunc my_warp_$w
+ I AddToFunc my_warp_$w I WarpToWindow $[pointer.x]p $[pointer.y]p
+ I AddToFunc my_warp_$w I Break

I would end up with a lot of functions called my_warp_xxx but I can destroy each one when the window closes.

If a window is warped-to that hasn't been warped-from the function for that window would look like:

AddToFunc my_warp_1234 I my_conditional_cursorwarp
+ I Break

and the default warping would occur. If the window had been warped-from it would look like:

AddToFunc my_warp_1234 I WarpToWindow 56p 78p
+ I Break
+ I my_conditional_warp
+ I Break

Cheers,
Tim.

--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [EMAIL PROTECTED]
To report problems, send mail to [EMAIL PROTECTED]

Reply via email to