Click on mouse button up, not mouse button down? #545
-
The default UI's click is registered when the mouse button gets released, not when it is pressed. Other applications work that way, too, whether it's Windows or Gnome. But it seems that UOSC registers a click on mouse button down. Is there any reason why it acts differently? Can this be changed to mouse button up? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Wouldn't be hard to change, but I never saw a problem with how it is now. |
Beta Was this translation helpful? Give feedback.
-
Because it's easier to implement and feels more responsive. Up event is currently reserved for clearing drags. Changing clicks to up would require refactoring cursor event handling and adding complexity to the code, and I don't see a good reason for doing that. |
Beta Was this translation helpful? Give feedback.
Wouldn't be hard to change, but I never saw a problem with how it is now.
Elements have
handle_cursor_down()
andhandle_cursor_up()
functions, in most cases it should be fine to just replace down with up. Some extra care needs to be taken with elements that can be dragged (e.g. menu).