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

fix: set time for GTK context menu #190

Merged
merged 3 commits into from
May 7, 2024

Conversation

rtbo
Copy link
Contributor

@rtbo rtbo commented May 5, 2024

This fixes tauri-apps/tauri#9658.
I noticed somehow that setting the time field of the GDK event prevents GTK from closing the menu on right click release.

@rtbo
Copy link
Contributor Author

rtbo commented May 6, 2024

Clippy errors are unrelated

@pewsheen
Copy link
Contributor

pewsheen commented May 7, 2024

Cool, It works!

How did you find out it was the time field?

@pewsheen
Copy link
Contributor

pewsheen commented May 7, 2024

By the way, you'll need to sign the commit and add a change log file so that it can be merged

@amrbashir amrbashir changed the title Fix GTK context menu fix: set time for GTK context menu May 7, 2024
@amrbashir amrbashir merged commit 1dc9d3f into tauri-apps:dev May 7, 2024
8 checks passed
@rtbo
Copy link
Contributor Author

rtbo commented May 7, 2024

How did you find out it was the time field?

I made a minimal GTK app in C that mimics muda menu creation.
I could reproduce the issue easily, and checked that passing the original right click event to popup_at_rect makes it behave normally.
Then I played with the fields of the synthetized event to find out which one triggers the expected behavior.

@rtbo rtbo deleted the fix_gtk_context_menu branch May 7, 2024 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[v2] context menu disappears on button release
3 participants