Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PopupMenu] Increase mouse button release timeout and reset it from post_popup. #95232

Merged
merged 1 commit into from
Aug 7, 2024

Conversation

bruvzg
Copy link
Member

@bruvzg bruvzg commented Aug 7, 2024

Might fix #93265

It seems to be a timing issue. I can't reproduce it with the current settings, but I was able to do it by setting smaller timeout (100 ms). Current timeout is too small for a user interaction and counting from popup call (so it includes all window/surface/swapchain creation time, which can be slow).

@akien-mga
Copy link
Member

I could reproduce the issue in the end on KDE Plasma on Wayland (Fedora 40), when using the touchpad with the following configuration (2-finger tap for right click):

image

I confirm that this PR fixes the issue.

@akien-mga akien-mga merged commit 5e7592a into godotengine:master Aug 7, 2024
18 checks passed
@akien-mga
Copy link
Member

Thanks!

@mihe
Copy link
Contributor

mihe commented Aug 12, 2024

@akien-mga @bruvzg I'm seeing a somewhat frustrating regression from this change (in Windows in my case), where if I open pretty much any popup in Godot (like the top menu) and click something in that popup within a short timeframe it doesn't register the click.

Judging by this PR this looks to be deliberate, and lowering this timeout back to 150 ms seems to resolve the issue.

I would strongly encourage to at least put this timeout behind an editor setting. I've triggered this dozens of times today alone. I thought it was my mouse acting up at first.

@KoBeWi
Copy link
Member

KoBeWi commented Aug 12, 2024

The timeout should be ignored in a click after releasing the button.

@bruvzg
Copy link
Member Author

bruvzg commented Aug 12, 2024

I'm seeing a somewhat frustrating regression from this change (in Windows in my case), where if I open pretty much any popup in Godot (like the top menu) and click something in that popup within a short timeframe it doesn't register the click.

Timeout should affect only mouse button release, not subsequent clicks. Not sure how it's possible to click without release registering, but I guess we can unset during_grabbed_click on mouse down as well.

@mihe
Copy link
Contributor

mihe commented Aug 12, 2024

Here's what I'm experiencing:

godot.windows.editor.dev.x86_64_9WVxMxWGKy.mp4

It's tough to show mouse clicks on videos, but I am clicking "Editor Settings..." right after opening the menu, which obviously necessitates releasing the mouse button first, and the click isn't registering. If I wait a short amount of time before clicking it then it registers.

@mihe
Copy link
Contributor

mihe commented Aug 12, 2024

I'm seeing this with other popups as well, like pretty much any context menu:

godot.windows.editor.dev.x86_64_Bl7JGVuLgp.mp4

@mihe
Copy link
Contributor

mihe commented Aug 12, 2024

I created an issue for it: #95430

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Right clicking in the editor to open properties of a certain element instantly selects what's under cursor.
4 participants