transient windows in the middle of the screen


I do not know if this is really fvwm related but, let’s try!!

I habe in my config the following:

Emulate Mwm

Style * Font "Shadow=0 1 SE:xft:Sans:style=Bold:pixelsize=11", OLDecor, HandleWidth $[HW]
Style * Colorset 0, HilightColorset 1, MwmDecor, MwmFunctions, BorderWidth $[BW], HintOverride
Style * IconBox 84 80 884 100, IconGrid 80 80, IconFill right top, IconBox 264 660 884 680, IconGrid 80 80, IconFill right top
Style * WindowShadeSteps 0, DecorateTransient

# Focus style definition
Style * SloppyFocus, MouseFocusClickRaises, GrabFocus, GrabFocusTransient

Style * MinOverlapPercentPlacement
Style * MinOverlapPercentPlacementPenalties 2 5 1 2 0.5 50

I thought that with that all the transient windows would be in the middle of the screen and get the focus automatically but this isn’t the case, transient windows of nautilus do not get the focus and the research window in synaptics in not in the middle of the screen.

Any idea? or this is due to the apps??

Best regards,


The stacking order of transient windows is relative to the parent window – and it depends entirely on where it is placed when the transient window get mapped. It’s going to be hit and miss, I’m afraid.

There’s a line in your config (above) which is inaccurate:

Style * SloppyFocus, MouseFocusClickRaises, GrabFocus, GrabFocusTransient

In addition to there being some conflicting focus policies (for a more detailed explanation, see: here) you also have some things that are obsolete.

If you’re going to use focus policy definitions in “Style” lines then you must use:

Style * SloppyFocus, MouseFocusClickRaises, FPGrabFocus, FPGrabFocusTransient

Note the “FP” prefix. You only need to use this if you’re placing it in the “Style” line. You can omit it if you use instead:

StyleFocus * GrabFocus, GrabFocusTransient, ....

– Thomas Adam


I’ll give a try to your focus definition!

maybe the option ParentalRelativity could help for my transient window placement? I’ll check the man page about that!

Cheers, Brice

oups :blush: ParentalRelativity is obviously for other purposes…



I suppose there’s nothing stopping you doing something like this:

DestroyModuleConfig TE: *
*TE: Cmd Function
*TE: add_window SomeFunc

DestroyFunc SomeFunc
AddToFunc SomeFunc
+ I ThisWindow (transient) WindowStyle ...., CenterPlacement

Module FvwmEvent TE

But I haven’t tried it.

– Thomas Adam

Thanks Thomas

but your trick doesn’t seem to work out!
Anyway I think this is more due to some bad behaving application, i.e. synaptic (the first find window started isn’t centered, the next ones are). Gvim for example does not misbehave.

That’s not so important!

BTW thanks for your remarks concerning the focus policy!


If you call PlaceAgain after changing the WindowStyle, it works correctly
although there is a flicker as the transient window is drawn and then
redrawn in the new location. I can’t figure out how to prevent the initial
drawing of the transient.

Actually, I can think of one way to fix this, but it seems overkill: Create a default
style for all windows that starts them iconified with no icon (effectively
making them invisible). Then use WindowStyle to apply the style you
want and then de-iconify them and place them where you want.

Seems ugly.


Of course.

Which would be even more unsightly, due to the fact that you’ve then got potentially three different things happening that you didn’t have before. No, WindowStyle is about the best thing, until something like a ‘TransientStyle’ comamnd is introduced, although to be quite honest, it’s a stupid idea. Transient windows are called transient for a reason – they’re never on the screen long enough.

– Thomas Adam