FVWM: how to start iconified under mouse position
I am slowly progressing towards what I described in the thread Re: FVWM: again (semi-transparent) pseudo-cursors My purpose is to [make a presentation] in a videoconf [...], and being able to highlight parts of it moving the mouse (like a laser pointer in a local presentation). I can start my pseudo-pointer from the root menu as + LaserPointer Exec xterm -name Laser -iconic I can assign an icon (a png which is in my ImagePath ...) via the associated style, and change it via function keys (provided I point the current icon with the mouse). Currently I use a laser beam icon, a circle and an oval icon with the inside transparent. At creation they appear in the bottom right corner of the screen. Style Laser Icon beam.png , StickyIcon, StickyAcrossDesks, Layer 9, !IconTitle, PointerKey (Laser) F4 I N Style Laser Icon circle.png PointerKey (Laser) F5 I N Style Laser Icon ellipse.png PointerKey (Laser) F6 I N Style Laser Icon beam.png I can also switch off my pseudo-pointer with a function key PointerKey (Laser) F3 I N Close I can move it around with a function key or control-MB1 PointerKey (Laser) F1 I N Move Mouse (Laser) 1 I C Move (of course this has to be terminated by a mouse click) And I can park it in the bottom-right corner with a function key PointerKey (Laser) F2 I N Move -0 -0 *** 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). I thought I could do that e.g. with a shift-MB1 (currently I'm testing using a key on root window) provided I define a PROPER function Mouse 1 A S PointLaser Key A R A PointLaser I thought the function could be something like this but the part which should move the icon has no effect. The icon is created in the default bottom-right corner and not under the mouse pointer. DestroyFunc PointLaser AddToFunc PointLaser + I Exec xterm -name Laser -iconic + M Next (Laser) Move m+0 m+0 I tried adding this to the Laser style, to counteract something which could be in my configuration IconBox none, PositionPlacement UnderMouse but the effect is that the icon is created in some (reproducible) random place on the screen. I am not sure whether the Move command applies to the icon (or only when not iconified), nor that my syntax is correct. Nor I am sure of possible interferences with the rest of my .fvwmrc. I am reporting below some lines of .fvwmrc which might be relevant and perhaps require overriding. What should I do to have an application start iconified with the icon under the cursor ? Style * IconBox 1000x70-1-1 ColormapFocus FollowsMouse IgnoreModifiers L2 OpaqueMoveSize 100 Style * SloppyFocus Style * IconBox -20 0 -1 -1 , IconFill bottom right Style * SmartPlacement Style * NoPPosition Style * ManualPlacementIgnoresStartsOnPage, ActivePlacementIgnoresStartsOnPage -- Lucio Chiappetti - INAF/IASF - via Bassini 15 - I-20133 Milano (Italy) For more info : http://www.iasf-milano.inaf.it/~lucio/personal.html
Re: FVWM: how to start iconified under mouse position
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). I thought I could do that e.g. with a shift-MB1 (currently I'm testing using a key on root window) provided I define a PROPER function Mouse 1 A S PointLaser DestroyFunc PointLaser AddToFunc PointLaser + I Exec xterm -name Laser -iconic 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 *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 ... -- Lucio Chiappetti - INAF/IASF - via Bassini 15 - I-20133 Milano (Italy) For more info : http://www.iasf-milano.inaf.it/~lucio/personal.html
Re: FVWM: how to start iconified under mouse position
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