FVWM: Store and Recall MousePosition? (ALT+Mouse3-Resize)

From: Gert Brinkmann <g111_at_netcologne.de>
Date: Sun, 28 Dec 2003 23:30:41 +0100

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 majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Sun Dec 28 2003 - 16:28:32 GMT

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