Hello,


while trying to write a resize-function that behaves like the ALT+Mouse3-Resizing(*) in other WMs, I have a problem: How can the Mouse-Pointer be stored and later be recalled? I am trying it like... (see below). Result: The mouse pointer is not moved after resizing. Does anybody has an idea how to solve this?


(*) How it should work: Press ALT and Mouse3-Button => Resize the window at the corner of the window that is nearest to the mouse pointer. After this resize operation the mouse pointer should be placed where it has been before starting the resize operation. (It would be optimal if this initial position would be modified by the value you have moved the mouse while resizing.)


----------------------------------------------
DestroyFunc MyResize
AddToFunc MyResize
+ M StoreMousePos
+ M WarpToNearestEdge
+ M Resize
+ M RecallMousePos

DestroyFunc StoreMousePos
AddToFunc StoreMousePos
+ M SetEnv POINTERX $[pointer.wx]
+ M SetEnv POINTERY $[pointer.wy]

DestroyFunc RecallMousePos
AddToFunc RecallMousePos
+ M WarpToWindow $[POINTERX] $[POINTERY]

DestroyFunc WarpToNearestEdge
AddToFunc WarpToNearestEdge
+ M WarpToWindow 100 100
----------------------------------------------


The function WarpToNearestEdge currently is just a dummy function. Later it really should warp to the nearest edge. Does anybody has an idea how to do this? (How can be arithemtics implemented in the fvwm-config-language?)



Thanks,


Gert
--
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 [EMAIL PROTECTED]
To report problems, send mail to [EMAIL PROTECTED]

Reply via email to