Subject: FVWM: centering a window

From: [email-masked]
Date: Sat, 9 Mar 2002 16:43:44 -0600

Has anyone written a function that will center a window, both vertically
and horizontally, without resizing it at all?
--
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: Mikhael Goikhman <[email-masked]>
Date: Sat, 9 Mar 2002 23:25:04 +0000

> and horizontally, without resizing it at all?

With 2.4.x this may be used:

  DestroyFunc CenterWindow
  AddToFunc   CenterWindow
  + I PipeRead `perl -e 'print "Move ", int(($[vp.width] - $[w.width]) / 2), "p ", int(($[vp.height] - $[w.height]) / 2), "p\\n"'`

  Next (XTerm) CenterWindow

Regards,
Mikhael.

---

From: [email-masked]
Date: Sat, 9 Mar 2002 18:07:51 -0600

Thanks.  This works perfectly.