Subject: FVWM: Window placement

From: Andy Arbon <[email-masked]>
Date: Sun, 17 Feb 2002 16:43:50 +0000

Hello,

I'd like to be able to have new windows appear centered around the 
location of the mouse pointer (possibly just for some particular 
applications). Is there any way to accomplish that with FVWM? I've not 
seen an existing placement style that sounds right.

Thanks,

Andy

--
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: Sun, 17 Feb 2002 22:37:59 +0000

> seen an existing placement style that sounds right.

Style UnderCursorPlacement is mentioned in the todo file.

It is possible to badly emulate this now using FvwmEvent, FAQ 3.18 helps.
If you know to program in shell or perl you may even write a script that
evaluates the needed window coordinates from the current cursor position
and probably the window size and then sends Move command. The script may
ensure that a window is placed fully visible (i.e. not always strictly
centered around the mouse pointer).

For the start try this (you use 2.4.x):

  *FvwmEvent-NewWindow: PassId
  *FvwmEvent-NewWindow: add_window FuncRePlaceWindow

  DestroyFunc FuncRePlaceWindow
  AddToFunc   FuncRePlaceWindow
  + I WindowId $0 ("XTerm") Move m-5 m-5

Regards,
Mikhael.