Ignore nested events in GTK shell#837
Ignore nested events in GTK shell#837luleyleo merged 3 commits intolinebender:masterfrom luleyleo:gtk-ignore-nested-events
Conversation
|
What happens to the event when it's ignored? Just dropped? I think a |
| 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.
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.
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.
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.
yea, this is a nit but I like macros and functions to be module-qualified. Would gladly accept a PR that standardizes on this :)
xStrom
left a comment
There was a problem hiding this comment.
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. |
Now the GTK shell uses
Mutex::try_borrow_mutand thus ignores nested events.This Closes #735 and Closes #571