2009/9/7 Lucio Chiappetti <lu...@lambrate.inaf.it>: > I made one step forward using FvwmEvent, but I'm now stuck about passing > arguments to it. > > On Mon, 7 Sep 2009, Lucio Chiappetti wrote: > >> *** now, what am I missing ? *** >> >> I'd like to find a way to create the icon straight where the mouse is >> currently pointed (to avoid having to "retrieve" it from the parking >> position).
You could do this using techniques such as: Style foo InitialMapCommand Iconify, InitialMapCommand Move 0+m 0_m, Other Style Options Your mileage may vary though. > I truncated this function here. I wrote the move part in another function > DestroyFunc rePointLaser > AddToFunc rePointLaser > + I ThisWindow ("Laser") Move m-40p m-40p > > which I bound (is this the right expression) to FvwmEvent in the staruto > + "I" Module FvwmEvent Event-PL > > *Event-PL: Cmd Function > *Event-PL: PassId PassId is no longer needed. > *Event-PL: add_window rePointLaser > > This way my icon is positioned with its hotpoint at (40,40) from the mouse. > For the "beam" icon (80x80) this means it's centered at the mouse. > > Now as you remember, I was using three different icons (beam, circle, and > ellipse), which were swapped with F4 F5 F6. These icons have different > sizes. > > What I'd want to do is to redefine the F4 F5 F6 so that instead of issuing a > Style command to a pre-existing "Laser" window, they create one, and use the > rePointLaser function/event passing to it a different shift size (actually a > couple of xsize,ysize). > > But how to do that is unclear to me ... If F4, F5 and F6 have the predefined sizes already... Key F4 .... PipeRead `echo "SetEnv xsize 2" && echo "SetEnv ysize 4" && start_application_name -options` Then change your rePointLaser function such that it now looks like: DestroyFunc rePointLaser AddToFunc rePointLaser + I ThisWindow ("Laser") Move m-$[xsize]p m-$[ysize]p + I UnsetEnv xsize + I UnsetEnv ysize -- Thomas Adam