Done. Try pointer.x, pointer.y (position in root window),
pointer.wx, pointer.wy (position in frame) and pointer.cx,
pointer.cy position in client window. See man page for details.
Thanks, it's working nicely now. very useful when you middle-click a
link in mozilla to get a new window, when you close the new window the
pointer gets warped back to the link you pressed. The functions truned
out like this:
# functions to warp pointer to somewhere useful depending on window type
AddToFunc my_default_pointerwarp
+ I This (Transient) WarpToWindow 50 50 # transients = centre
+ I Cond (NoMatch) This (XTerm) WarpToWindow -10p -70p # rxvt =
scrollbar
+ I Cond (NoMatch) This (Fvwm*) WarpToWindow 50 50 # modules = centre
+ I Cond (NoMatch) WarpToWindow 35p 40p # default to
menu bar
# this creates a function for each window to remember where to warp the
pointer
AddToFunc my_record_warp
+ I DestroyFunc my_warp_$w
+ I This AddToFunc my_warp_$w I WarpToWindow $[pointer.wx]p $[pointer.wy]p
+ I AddToFunc my_warp_$w I Break # prevents falling through to default
warping
# AI: This function learns the old location of the pointer and records
it for later use
AddToFunc my_pointerwarp
+ I PointerWindow my_record_warp
+ I AddToFunc my_warp_$w I This (CurrentDesk !Iconic) my_default_pointerwarp
+ I my_warp_$w
+ I my_record_warp # removes the default from the end of the function
The "This" in my_record_warp was necessary to get the $[pointer.wx] to
expand when my_record_warp is executed rather than getting passed to
my_warp_$w and being expanded when my_warp_$w is executed.
Is this a feature of variable expansion?
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]