Subject: FVWM: Cursor placement

From: Johan Svedberg <[email-masked]>
Date: Sat, 3 Aug 2002 22:19:53 +0200

Hi!

Is there a way to make the cursor place itself in the middle of the
screen everytime I start FVWM?

-- 
|Mail address   |Home telephonenumber    |E-mail address               |
|Johan Svedberg |+46 (0)90 - 49 139      [email-masked]            |
|Hästhagsvägen 2|                        |                             |
|S-905 96 Umeå  |Cellular telephonenumber|WWW address                  |
|Sweden         |+46 (0)70 - 639 49 82   |http://www.acc.umu.se/~winkle|
                                                                      --
--
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-masked].
To report problems, send mail to [email-masked].

---

From: Jan Johansson <[email-masked]>
Date: Sat, 3 Aug 2002 22:43:20 +0200

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?

Please read
http://www.tuxedo.org/~esr/faqs/smart-questions.html#id2751228

and when you are done your hint is "CursorMove".

---

From: Mikhael Goikhman <[email-masked]>
Date: Sun, 4 Aug 2002 06:03:58 +0000

> 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.