On Wed, Nov 03, 2010 at 11:20:54AM +0100, Will Stephenson wrote:
On Tuesday 02 November 2010 20:37:39 Josef Wolf wrote:
Hello,
Sometimes, my KDE desktop gets into a mode where new windows are opened behind already existing windows without the focus. I find this mode very annoying, and have no idea how to switch back to the "normal" mode, where new windows are created on top of existing windows and are given the focus automatically.
I have no idea how this strange mode is activated. I guess it is some kind of key combination, since (AFAICS) it almost always happens when I'm switching between applications/desktops/KDE-Konsole-terminals back and forth very fast with ALT-TAB, CTRL-Fx, SHIFT-left/right keys and hit some other key by accident.
Sounds like focus stealing prevention - see Han Wen Kam's recent blogs on the subject: http://sellingfreesoftwareforaliving.blogspot.com/2010/10/focus-user-is- king.html http://sellingfreesoftwareforaliving.blogspot.com/2010/11/focus-stealing- settings-in-kde-and.html
Yeah, looks like you are right. Normally, I also don't want my focus to be stolen. But when I start an application explicitly (e.g. by typing a command into xterm or konsole, or by clicking onto a desktop item, or by selecting some menu item), I expect the corresponding window to appear. If it ends up hidden by another window, I sit there and wait, and wait, and wait...
If a particular app opens a new window and doesn't set the timestamp on the new window correctly, this can lead focus stealing prevention to think it is an unrelated window that should open but not get focus.
Ah, looks like you are on the right track. Timestamp might be a key here. I tend to login once on bootup and stay logged in for months, so I don't have to restart and rearrange all my applications and screen sessions. So if this timestamp mechanism (or its reference?) manages to get out of sync once, it might end up as the cause of such erratic behavior.
Does this happen with any particular app?
It depends. As I wrote above, I usually notice it when switching applications fast. But this might be just a coincidence, since I often switch applications just to start another one on CLI. I almost always start applications from CLI, because I find this to be much faster than starting using the mouse. Sometimes, however, there are delays in this procedure. Things like windows come up slowly (maybe from swap?) or the "ALT-TAB" application selector comes up slowly. So it might be that I just get the _impression_ that I typed into the wrong application. Or into no application at all? Who gets the keystrokes when one window gave up focus but the next has not received it yet? The desktop? The panel? The menu? The keystrokes definitely do _not_ end up in the two involved windows. I guess this is the reason why my first suspect was some strange key combination: I assumed my keystrokes ended up in some wrong application, which might have misinterpreted them. But I have also seen some windows appearing in foreground while most other windows were appearing in background. Maybe konsole got its timestamp messed up, while panel/menu had still a proper timestamp? Now I tried again, and all windows open in background, no matter how I start the application.
There aren't any keyboard shortcuts to change focus stealing prevention so I think your guess is incorrect.
Is there any way to visualize those time stamps (and the reference) to get an idea whether we're on the right track? Maybe there's even a way to bring this mechanism back into a "sane" state? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org