Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I run a curent Linux with a KDE4 desktop (OpenSuse 11.4). For my daily work I run a legacy X application from 1999. (No, the there is no way to update this closed source application.)

Running in a chroot environment with an old libc it has been working well for the last 10 years. The only thing that keeps bugging me is that dialogs aren't always raised to the front.

For example the Find/Replace dialog is raised to the front when I open it the first time, but after closing it, it is created in the back when I open it the 2nd time.

Is there any place to configure the behavior of legacy X applications ?

How can I go about debugging this ?

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

It's the 'focus stealing prevention' setting in 'system settings'. It's designed to prevent programs from shoving things in your face when your attention (focus) is on another application.

System Settings -> Window Behavior -> Window Behavior (on left)

You'll see the 'Focus Stealing Prevention Level' upper section on the right, generally defaulted to LOW. I'd suggest leaving that one alone, and adding a 'Window Rule', which is the next item down in the left column.

Once you select that, you'll likely see 'Focus Stealing Prevention' for xv, which comes preset.

Press 'NEW' on the far right, then 'detect windows properties' then click on your application's window.

It should then prompt you to choose an appropriate 'scope' of this rule, whole application, only this window, and such. Choose as you feel appropriate, you may need to play with this setting to get it working right.

It'll return to the 'detect properties' window, but will have filled in some values. Choose the 5th tab, 'Workarounds' and at the top is 'Focus Stealing Prevention'.

Check the checkbox on the left, which will enable the workaround, then across, click on 'Force', then 'None'.

This sets the focus loss setting to none for that window only, which should resolve your issue.

It IS possible to get to the 'Windows Rules' via a slightly shorter method, by clicking on the icon in upper left corner of window decoration, then choose Advanced and then Special Windows settings, or Application Settings. Explore.

You could simply turn the FSP setting in 'Windows Behavior' to 'None', but you may find that other things become more annoying since they can now steal focus too.

share|improve this answer
    
This is really cool, thanks! I never would have found that. –  Gene Vincent Oct 20 '11 at 7:52
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.