Version: (using KDE KDE 3.4.0) Installed from: Unspecified Linux OS: Linux if i start programs in xterm or aterm, the new programs (with windows) will not get the focus/will not be the topmost: example: xterm and gedit: (type "gedit" in xterm and press return :) ) : no focus xterm and kcalc : focus xterm and kate: no focus ..... no problems if i start these programs with konsole, or gnome-terminal *strange*
This is caused by some misinteraction between xterm, a few apps (I identified audacity and firefox too) and the focus stealing prevention mechanism in kwin. Try to choose different settings from "Focus stealing prevention level" in KControl/Desktop/Window Behavior/Advanced. With "None", things work right. What focus policy are you using? I tend to believe it's some sort of bug in xterm, which might trigger bogus mouse or keyboard events (which reset the focus stealing prevention timer in kwin) but I didn't yet try to investigate further.
focus stealing was set to "Low". everything ok with "None"
Those terminals probably don't unset $DESKTOP_STARTUP_ID and applications launched from there inherit it. There's not really much I could do about this. You can - not use them - ask their developers to fix it - unset the env.var. in some startup script that will be executed by the applications
This seems to be a problem with the startup notification spec, as it would require every terminal app or other application interactively starting other applications to implement the specification, which would have severe impact on interoperability. "not use them" should never be considered a viable solution to this kind of problem imho, only a temporary workaround at the best. I filed https://bugs.freedesktop.org/show_bug.cgi?id=11375 against the spec. Oh yes, I experienced the same issue with urxvt and pinentry. Especially as pinentry is often started from shell (by gpg e.g.) the need to switch windows while otherwise working in that shell was particularly annoying.
Reopening, consider trying to ignore old ids.
To me this is a client issue.
while lubos is right in comment #3, i cannot confirm the issue existed with low or medium focus stealing -> works for me. (lubos stated in the fdo bug to be able to fix this a different way - if not sarcasm, he probably has :)