3 ms·
Doesn't Windows do the same when clicking a window titlebar? Maybe it's so if you're going to start dragging the window/tab you can see what is in it.
by rawling 2y ago
Doesn't Windows do the same when clicking a window titlebar?
Maybe it's so if you're going to start dragging the window/tab you can see what is in it.
- ssl-3 2y agoClicking anywhere in a background window (including the titlebar) in Windows 10 responds by immediately raising and focusing the clicked-on window when the mouse button is first pushed down. The inconsistency is bizarre, since some here say that clicking-and-releasing before a resultant thing is allowed to happen is a hard-and-fast rule of GUI implementation that has been in place for decades, but that just doesn't seem to be the case at all.
- mbreese 2y agoThere are no hard and fast rules, only conventions that are context dependent. Buttons normally only respond to the “on click” event. This lets you move off the button if you change your mind mid-click. Window focus could be (I haven’t tested) an “on down” event because you might want to see what’s behind it while doing something else before you release the button (like drag it around). But focus used to be “on hover”, where just moving your mouse over a window brought it to the foreground. “On up” wouldn’t make sense because if you wanted to do something like move the window around, you couldn’t as you’ve now released the mouse. It all depends on what you’re trying to do and the OS. Each OS has a design language that “tries” to bring some consistency to event handling. But ultimately, it’s up to the application to handle many things.