On 26 Dec 2002 13:34:15 -0600, Norvell Spearman wrote:
> 
> I recently changed my .fvwm2rc so that any new window will get the focus
> and get the pointer warped to it.  Everything works fine except for
> xmms.  Usually I run xmms with both the equalizer and play list windows
> (which are both ``snapped to'' the main xmms window), so starting xmms
> actually creates three windows.  These three all move together when the
> main window is moved.
> 
> What's happening is this:  I have one 2x2 desktop and usually run xmms
> from the top right page.  After making the focus and warp changes,
> starting xmms causes the pointer to go immediately to the top left
> corner of the current page, which then causes the viewport to scroll to
> the page immediately to the left.  Depending on what's on the left-hand
> page, the main xmms window may or may not be connected to its other
> windows.
> 
> The following is what I added to my .fvwm2rc (which is from the fvwm
> FAQ, question 3.18):
> ########
> *FvwmEvent-NewWindow: Cmd
> *FvwmEvent-NewWindow: PassId
> *FvwmEvent-NewWindow: StartDelay 4
> *FvwmEvent-NewWindow: add_window FuncFocusWindow
> 
> DestroyFunc   FuncFocusWindow
> AddToFunc     FuncFocusWindow
> + I WindowId $0 Focus
> + I WindowId $0       WarpToWindow 50 15p
> 
> AddToFunc     StartFunction I FvwmEvent FvwmEvent-NewWindow
> ########
> 
> What I'd like is for xmms to open on the current page but without
> disabling edge scrolling.  Thanks very much for any help with this.

One solution is simply set a delay of 1-2 seconds for page scrolling.
Try "EdgeResistance 800 10". To be honest I don't know why 800 means
about 2 seconds and 1600 means 4 seconds on my machine.

XMMS is pretty problematic, since it is very different from normal
applications regarding its willing to manage the windows by itself.
Anyway here is another solution for your problem. Please read this
attentively to understant how to solve these kinds of problems.

I added this line to your function:

  + I WindowId $0 Echo $0 $n $c $r

and it seems that XMMS first opens window "xmms/Xmms/xmms" that is
immediatelly closed and opens another window (up to 3 windows) with
names "XMMS/xmms/XMMS_Player", "XMMS Equalizer/xmms/XMMS_Equalizer"
and "XMMS Playlist/xmms/XMMS_Playlist".

So you may want to disable focusing/warping of some of these windows.
You may replace function lines with something like:

  + I WindowId $0 (!Xmms) Focus
  + I WindowId $0 (!Xmms) WarpToWindow 50 15p

This should solve your problem of page scrolling, but then, it will
focus/warp to 2 other xmms windows too and you probably want only the main
one. So you may list all the names using more "WindowId $0" in the chain
or even use "ThisWindow", since there is a window context now. I also
suggest you to create another function for the actual commands, so you
don't need to duplicate your conditions for 2 or more times. I would do:

  *FvwmEvent-NewWindow: add_window FuncHandleNewWindow

  DestroyFunc FuncHandleNewWindow
  AddToFunc   FuncHandleNewWindow
  + I WindowId $0 \
        ThisWindow (!Xmms) \
        ThisWindow (!XMMS_Equalizer) \
        ThisWindow (!XMMS_Playlist) \
        FuncSelectWindow

  # common function that may be used in other places too
  DestroyFunc FuncSelectWindow
  AddToFunc   FuncSelectWindow
  + I Focus
  + I Raise
  + I Iconify off
  + I WarpToWindow 50 15p

Add more window names to this ignore list if you like.

Regards,
Mikhael.
--
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 PROTECTED]
To report problems, send mail to [EMAIL PROTECTED]

Reply via email to