Spaces and window focus
Let me explain what's happening:
I have one space for all my Safari windows, there's about 9 of them currently and it's not possible to see them all at once (except in exposé of course) - they take up all the screen space I have available on that space.
I switch to another space where my text-editor lives and change some code. I switch back to the space with Safari to view the results and now one out of three things happen:
1. The window that had focus still has focus but has moved behind other windows so that I cannot see it at all or only partially,
2. Some other Safari window got focus,
3. The window that used to have focus still has it (the desired result).
This doesn't just happen to windows of the same application either. On the desktop with my editor I also have a Terminal and a Finder window open. Especially the Terminal window is prone to sometimes take over focus from my editor, without me ever switching to a Terminal window between switching spaces.
I am aware of the fact that if I'd switch to a different space with one of these applications active they'd have focus on the window in my other spaces if there happens to be one such window. Although I find that a little annoying I've learned not to do that and stick to the spaces I'm actually working in, so that's not what's causing this.
This, ladies and gentlemen, is a BUG. I'm quite sure this isn't supposed to happen and it's certainly breaking my workflow. I would appreciate if someone would fix this.
This isn't a case that's easily reproducible, it doesn't seem to happen on a fresh start of Snow Leopard. But it's certainly happening now after 12 days of uptime/usage. I'm guessing that there's some resource leaking or shortage going on.
If more details are needed, feel free to ask. It's in my benefit to get this solved after all.
Intel Mac Mini, Mac OS X (10.5.7)