[SOLVED]Modal dialog from motif application gives focus away


I have to run FVWM (Version 2.5.12) only for a single motif application, there is no FvwmTaskbar or other Fvwm-Module active, when the motif application is closed, the Fvwm-Session ends. This motif application brings up every now and then a modal dialog. When such a modal dialog window appears, it gots the focus and it keeps also the focus regardless the mouse pointer is inside or outside this dialog window. But as soon as I click on the parent window it loses the focus, the now active parent window stays behind the dialog window and do not react any further whether on mouse nor on keyboard events. This is okay, because the parent window HAS to wait until the modal dialog window is closed.

What I need is that such a modal dialog window never, really NEVER, gives up the focus, the user has to select from the provided buttons (e.g. Yes/No), via keyboard or mouse. These dialogs are transient windows, here are 2 lines from the output of xprop:

WM_TRANSIENT_FOR(WINDOW): window id # 0x80000c
WM_CLASS(STRING) = “alert_popup”, “Tk2Motif”

And here is the “complete” config file:

ModulePath /usr/lib/X11/fvwm2
BugOpts ModalityIsEvil True
DeskTopSize 1x1
HideGeometryWindow Move
Style "*" SmartPlacement, RandomPlacement
Style "*" RaiseTransient, StackTransientParent
Style "*" BorderWidth 4, NoHandles
Style "*" ClickToFocus
Style "alert_popup" Layer 10 0
Style "alert_popup" OverrideGrabFocus
Mouse  1  R  A  Nop
Mouse  2  R  A  Nop
Mouse  3  R  A  Nop
AddToFunc "InitFunction" "I" Exec xsetroot -solid darkslateblue &
+                        "I" Exec $HOME/.fvwm/startup

Any help would be enormously appreciated, because I intend to replace ICEWM on many PCs.

– Karl Ganzer

Well, you don’t. You could get a version of FVWM (2.5.31) which is current.

You’re bastardising the entire approach to modality here with your so-called requirement, but see:

DestroyModuleConfig a:*
*a: focus_change "Prev (alert_popup, Transient, !Focused) Focus"

Module FvwmEvent a

Good luck with that…

Don’t do this, please.

– Thomas Adam

O.K., I have now deleted the line with “ModulePath”, also the line with “OverrideGrabFocus” and added your suggestion.
It works perfectly! :smiley:
But I will stay at this time on FVWM-2.5.12 until we really need a newer version, because on the target systems we run SUSE Linux Enterprise Server 10 with support from Novell, so we should not recompile packages or replace packages with own versions.

Many thanks.

– Karl Ganzer

I wouldn’t mind that so much if it wasn’t so far removed from reality, that it’s laughable. Speaking as a FVWM developer, 2.5.12 in comparison to even something like 2.5.24 is pretty old, and I dread to think of the number of odd interactions you might have with programs you try and manage under FVWM using 2.5.12; bespoke or otherwise.

This entire “Enterprise Level” requirement businesses have from an open-source distribution is nothing more than bullshit sugar-coating. What good is saying: “we’ll support version X, only” when that version itself is considered out of date by the developers of that package? That becomes a complete hindrance, and it’s obvious to me that SuSE in this case just aren’t caring enough to look at updating their software.

As a business – even a deluded one who clings to some level of fake assurance through “Enterprise” – I’d be pretty worried by that.

I suggest you lobby SuSE to update to FVWM 2.5.31. Tell them I told you to – that’ll help.

– Thomas Adam