-
Notifications
You must be signed in to change notification settings - Fork 567
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
Ignore nested events in GTK shell #837
Ignore nested events in GTK shell #837
Conversation
What happens to the event when it's ignored? Just dropped? I think a |
78527d7
to
546c78c
Compare
log::warn!("bring_to_front_and_focus not yet implemented for gtk"); | ||
warn!("bring_to_front_and_focus not yet implemented for gtk"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think @cmyr wants us to not use imported functions directly. That is log::warn!
is better than warn!
. It's from the Rust style guide.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer that too, was just done differently in the Windows version I used as reference.
Wonder if there are lints for such things 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah the windows platform code has some of the oldest code in druid and so follows style the least.
I've been also thinking about looking into custom clippy/rustfmt options to enforce some of our style rules.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yea, this is a nit but I like macros and functions to be module-qualified. Would gladly accept a PR that standardizes on this :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might just change the problem, not solve it. However not crashing is an upgrade.
Well, I still do not truly understand how how druid-shell works but from what I've seen I doubt this can be nicely solved without restructuring druid-shell. Also ignoring nested events does not really hurt the user experience as they are rare and do not matter in the cases where they occur. |
yes, i think at least being defensive is the right decision for the time being. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Now the GTK shell uses
Mutex::try_borrow_mut
and thus ignores nested events.This Closes #735 and Closes #571