News for hackers. Stuff that matters.
Re:X is justifiably slow by rawling on Sunday June 02, 2024 @03:58AM (#40552289)
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.

Re:X is justifiably slow by ssl-3 on Sunday June 02, 2024 @06:41AM (#40553022)
Clicking 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.

Re:X is justifiably slow by mbreese on Monday June 03, 2024 @07:43AM (#40561714)
There 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 is normally 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.