3 points · by makecheck · 17y ago · 6 comments
My question for the other programmers among you, is: why is a theoretically simple concept like "focus", difficult for operating systems to manage properly?
In case you don't know what I'm referring to, here's an example. You're typing something in one window, and then some other window comes along that pops open and steals your focus away. So now, your typing continues in a new context, where each key now has new meaning. Worst case, you happen to hit Enter, at the exact time something like a message pops open, causing you to "accept" something that you didn't even read.
I have seen this with every OS, with many different applications, and with different window managers on Linux. It is pervasive, yet it is aggravating, which suggests to me that the problem must be "hard" or it would have been solved already. Right?
Fantastic operating system. Shame it's dying.
There are probably a bunch of other special cases that are hard to imagine unless you're a full-time window-manager developer (I'm not.)
I really liked the old-style focus method of just having the mouse hover over the window that input goes to, instead of having to click it or having the window steal the focus of whoever is currently having the focus. I figure if I didn't do it explicitly then the os should certainly not allow some application to do it for me.
Notable exceptions: start of a new application, the current application.
Other than that just limit your 'stealing' to coming to the top of the windows stack but leave the focus where it is.