Discussion:
FVWM: Periodic/Timed switching to next window
Frank Gruellich
2011-07-11 15:31:14 UTC
Permalink
Hi,

I'm trying to setup a machine in some kind of kiosk mode. It should
cycle through a number of applications automatically, skipping all that
are Iconic. Sometimes that works, but under some circumstances it just
stops at one window and does not proceed anymore. First I thought that
would be related to the Maximized state of a window, but it also does
so for normal ones. So, I now think it is related to me not
understanding the "The Ring of Windows" at all so that sometimes the
"Next Window" is still pointing to the current one or that the next
window is evaluated at the wrong point in execution. But that is just
wild guessing.

I'm using this ~/.fvwm/.fvwmrc:

DeskTopSize 1x1
DestroyFunc StartFunction
AddToFunc StartFunction
+ I GotoDesk 0 0

DestroyFunc RaiseAndFocus
AddToFunc RaiseAndFocus
+ I Focus
+ I Raise

DestroyFunc NextWindow
AddToFunc NextWindow
+ I Next (!Iconic) RaiseAndFocus

DestroyMenu MenuFvwmRoot
AddToMenu MenuFvwmRoot
+ "Start cycle" Schedule Periodic 3000 1 NextWindow
+ "Stop cycle" Deschedule 1
+ "Xterm" Exec exec xterm
+ "FvwmConsole" FvwmConsole
+ "Exit" Quit

DestroyMenu MenuWindow
AddToMenu MenuWindow
+ "Icon on/off" Iconify
+ "Maximize" Maximize
+ "Close" Close

Mouse 0 I A Menu MenuWindow
Mouse 0 1 A Menu MenuWindow
Mouse 0 2 A Maximize
Mouse 0 4 A Iconify

Key M A C Menu MenuFvwmRoot

The kiosk machine runs a current Ubuntu with this fvwm version:

fvwm 2.5.30 compiled on Oct 16 2010 at 06:58:35
with support for: ReadLine, RPlay, Stroke, XPM, PNG, SVG, Shape, XShm, SM, Bidi text, Xinerama, XRender, XCursor, XFT, NLS

fvwm comes with NO WARRANTY, to the extent permitted by law. You may
redistribute copies of fvwm under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.

Can someone enlight me what I'm doing wrong? Thanks in advance.

Kind regards,
Frank.
--
Sigmentation fault
Thomas Adam
2011-07-11 16:43:20 UTC
Permalink
Hello,
Hi,
I'm trying to setup a machine in some kind of kiosk mode.  It should
cycle through a number of applications automatically, skipping all that
are Iconic.  Sometimes that works, but under some circumstances it just
stops at one window and does not proceed anymore.  First I thought that
would be related to the Maximized state of a window, but it also does
so for normal ones.  So, I now think it is related to me not
understanding the "The Ring of Windows" at all so that sometimes the
"Next Window" is still pointing to the current one or that the next
window is evaluated at the wrong point in execution.  But that is just
wild guessing.
So this depends on two things:

* The focus model you're using;
* Creation time takes precedence over last focused window in terms of Next/Prev

When I say "focus model", if you're using mousefocus then it is
already implied that the ring of window will be ordered by creation
time rather than last window focused which is the effect you're
describing here -- this is also compounded by whether you use Flip or
FlipFocus to shove the command, as FlipFocus will change the
WindowList order, but it's out of scope here.

For what you want though, it sounds like you want to keep the window
ring in the order they were created, rather than having them jumbled
up through last focused? If that's so you'll need to set the
following:

Style * !FPSortWindowlistByFocus

If none of that is what you were after, then it might also just be a
case of you needing to play about with "CirculateHit/CirculateSkip";
it's hard to tell from your description which you mean of this.

-- Thomas Adam
Frank Gruellich
2011-07-14 14:57:52 UTC
Permalink
Hi,
Post by Thomas Adam
It should cycle through a number of applications automatically,
skipping all that are Iconic.  Sometimes that works, but under some
circumstances it just stops at one window and does not proceed
anymore.
* The focus model you're using;
* Creation time takes precedence over last focused window in terms of Next/Prev
When I say "focus model", if you're using mousefocus
I'm using the default one. What I posted was my complet config. I
guess the default is mousefocus (as focus follows the mouse pointer).
Post by Thomas Adam
then it is already implied that the ring of window will be ordered by
creation time rather than last window focused which is the effect
you're describing here -- this is also compounded by whether you use
Flip or FlipFocus to shove the command, as FlipFocus will change the
WindowList order, but it's out of scope here.
I'm using the RaiseAndFocus function from the config I posted. I also
sometimes raise windows by clicking manually on their title or border.
Can that mess up the window ring? Is there a way to dump the entire
ring, maybe without changing its order or the pointer into it?
Post by Thomas Adam
For what you want though, it sounds like you want to keep the window
ring in the order they were created, rather than having them jumbled
up through last focused?
Yes, I think so.
Post by Thomas Adam
Style * !FPSortWindowlistByFocus
That does not help. At some point it *sometimes* stops at a particular
window.
Post by Thomas Adam
If none of that is what you were after, then it might also just be a
case of you needing to play about with "CirculateHit/CirculateSkip";
it's hard to tell from your description which you mean of this.
It's also hard to reproduce it, at least, I do not find a reliable
procedure to do that. Right now it works as expected, same
configuration. I don't know what I did wrong the last time.

Anyway, thanks for your help.

Kind regards,
Frank.
--
Sigmentation fault
Thomas Adam
2011-07-14 16:05:24 UTC
Permalink
Hello,
I'm using the RaiseAndFocus function from the config I posted.  I also
sometimes raise windows by clicking manually on their title or border.
No, but the focusing of that window might; see previous comments.
Can that mess up the window ring?  Is there a way to dump the entire
ring, maybe without changing its order or the pointer into it?
There is, but only as a debug-aid, it's nothing that's interactive, or
would be of much use to you that I can tell.
Post by Thomas Adam
For what you want though, it sounds like you want to keep the window
ring in the order they were created, rather than having them jumbled
up through last focused?
Yes, I think so.
Post by Thomas Adam
Style * !FPSortWindowlistByFocus
That does not help.  At some point it *sometimes* stops at a particular
window.
Can you please do all you can to reliably reproduce this, including
noting which clients are causing the problem?

Note also, that this weird focus model will be reliant on things like:

* Transient window policy (which can be told to steal focus);
* UrgencyFunc
* EWMHActiveWindowFunc

All of these might have, during your testing, been a causal factor in
messing up the results you expected. Hence:

DestroyFunc UrgencyFunc
DestroyFunc EWMHActivateWindowFunc
It's also hard to reproduce it, at least, I do not find a reliable
procedure to do that.  Right now it works as expected, same
configuration.  I don't know what I did wrong the last time.
Well, keep an eye on it for me, and if you can come up with something
more reliable, let me know.

-- Thomas Adam

Loading...