Re: FVWM: Cursor placement

From: Mikhael Goikhman <migo_at_homemail.com>
Date: Sun, 4 Aug 2002 06:03:58 +0000

On 03 Aug 2002 22:43:20 +0200, Jan Johansson wrote:
>
> On Sat, Aug 03, 2002 at 10:19:53PM +0200, Johan Svedberg wrote:
> >Is there a way to make the cursor place itself in the middle of
> >the screen everytime I start FVWM?
>
> and when you are done your hint is "CursorMove".

Actually CursorMove currently only accepts relative values, not absolute
ones, so this is not trivial. This function does it, but in 2.5.1+ only:

  AddToFunc WarpToScreenCenter
  + I PipeRead 'echo CursorMove `expr "(" $[vp.width] - $[pointer.x] "*" 2 ")" / 2`p `expr "(" $[vp.height] - $[pointer.y] "*" 2 ")" / 2`p'

This shorter solution should work in 2.4.x too (zero is optional):

  WindowId root 0 WarpToWindow 50 50

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 Sun Aug 04 2002 - 01:05:15 BST

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