Re: FVWM: NearestEdgeResizing

From: Mikhael Goikhman <migo_at_homemail.com>
Date: Sat, 1 May 2004 18:44:34 +0000

On 01 May 2004 17:38:39 +0200, Gert Brinkmann wrote:
>
> I have tried to configure fvwm so that it behaves the same as other
> window-manager on resizing and moving: When pressing ALT, clicking into
> a window with the left mousebutton should move the window, clicking the
> right mousebutton should grep the nearest edge (or border, what I had to
> add to the shellscript) of the window and do a resize.
>
> Below you see the configuration for this. The attached script (that
> certainly has to be executable and stored in the search path; it
> probably requires bash.) calculates the nearest corner and prints out
> the statement to move the mouse cursor to it.
>
> Moving works fine. On resizing the problem is that you have to release
> the right mousebutton before resizing is started. Is there a way to
> change this behaviour to directly starting the resizing on mouse press?

A small side note. I would divide the window into 9 squares and not 4,
and warp to the 8 corresponding points on the border. In 90% of cases I
only need/want to resize one direction, not two. And if I need both
directions then I probably want Maximize anyway. So probably 4 triangles
(with only side center border points) would be good for me too.

> DestroyFunc MyResize
> AddToFunc MyResize
> + I StoreMousePos
> + I WarpToNearestEdge
> + I Resize
> + I RecallMousePos

Replace all "I" with "H":

  DestroyFunc MyResize
  AddToFunc MyResize
  + H StoreMousePos
  + H WarpToNearestEdge
  + H Resize
  + H RecallMousePos

Then it works like you want with a small click-time delay, about 0.15
seconds. You may like this delay, otherwise add one more wrapper function:

  DestroyFunc MyResize0
  AddToFunc MyResize0
  + I ClickTime 0
  + I MyResize
  + I ClickTime 150

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 Sat May 01 2004 - 13:47:01 BST

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