WindowList invoked from FvwmPerl preprocessing loses focus

I access FVWM running on a Linux box via VNC Viewer. When I am on my laptop I resize my VNC session (via xrandr) to 1920x1080 but when I’m at my desk I resize the VNC to 3840x1200 and then stretch the VNC window across two monitors.

This works pretty well but one annoying thing is that the WindowList menu pops up in the dead center of the viewport, which works great when on my laptop but looks horrible in my dual monitor setup (as half the menu shows up in the left monitor and the other half on the right).

I have the following key binding to pop up the WindowList when I press Ctrl+Tab:

MenuStyle WindowList SelectOnRelease Control_L Key Tab A C WindowList (CurrentPage) Root c c NoGeometryWithInfo, NoDeskNum, NoCurrentDeskTitle, CurrentAtEnd, IconifiedAtEnd

I tried using FvwmPerl to add some intelligence here by only using “Root c c” when in single monitor mode and centering the WindowList on either the left or right monitor when in dual monitor mode depending where the mouse cursor is when I press Ctrl+Tab. I actually got this to work (positioning-wise) but it introduces a nasty side effect where after pressing Ctrl+Tab the WindowList does not get focus so a quick Ctrl+Tab and release does not switch windows like it did before.

I initially thought this was due to a problem in my Perl code, but I’ve simplified it to just have FvwmPerl return the exact same WindowList command as above and I still see the WindowList lose focus:

[code]DestroyFunc PopupWindowList
AddToFunc PopupWindowList

  • I . %{ “WindowList (CurrentPage) Root c c NoGeometryWithInfo, NoDeskNum, NoCurrentDeskTitle, CurrentAtEnd, IconifiedAtEnd” }%
    MenuStyle WindowList SelectOnRelease Control_L
    Key Tab A C PopupWindowList[/code]

where the “.” function is as described on the FvwmPerl man page:

[code]AddToFunc .

  • I SendToModule FvwmPerl preprocess -c – $*[/code]

So it seems that a “WindowList” command that comes from FvwmPerl does not behave exactly the same as a straight WindowList command.

Does anyone have any ideas what might be causing this? Or maybe a better way to get the WindowList to popup in a different place based on current viewport dimensions?

I’m using fvwm 2.6.1 by the way:

% fvwm2 -V fvwm 2.6.1 compiled on Jun 6 2011 at 10:50:00 with support for: ReadLine, XPM, PNG, Shape, XShm, SM, Xinerama, XRender, XCursor, XFT, NLS