-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
Fixed issues with input propagation triggering unwanted shortcuts #39039
Fixed issues with input propagation triggering unwanted shortcuts #39039
Conversation
d2e0ffc
to
4a709d1
Compare
4a709d1
to
2c47ed3
Compare
Updated for rebase and to account for removal of |
2c47ed3
to
05dd17b
Compare
I'll have a look to this likely next week. Sorry, but I've been very busy and I'd like to check it deeply. |
05dd17b
to
f5a1e31
Compare
Fixes godotengine#38922, #337807, godotengine#37054 and potentially others. This fix adds a check in viewport.cpp which checks that the focused node and none of its parents can handle the input, before propagating the input to all editor nodes which implement _unhandled_key_input. Also, a few accept_events() were added where needed to stop multiple shortcuts from running at once. See godotengine#38922 for more comments. Replaces/builds upon godotengine#37839 and godotengine#37068.
f5a1e31
to
4216b11
Compare
My recent changes have changed the logic a bit. This makes it also solve issue like #17591, where previously it did not. Instead of just using |
I'm not very convinced about this change. It's indeed a hack. I believe we can keep most of it but wiring it in a different way to the engine. The
The goal of this changes is to get the very welcome changes of your PR in a cleaner, and non-breaking way. This proposal may still have some loose ends. What do you think? |
|
|
Well that certainly is a bigger job than what this current PR is. Since that is a big change, should we consider some other way of handling this completely? Or is bubbling the events up and then propagating through children the best way to do it overall? |
@RandomShaper |
Godor devel IRC 10th September 2020
|
Superseded by #42109 |
Fixes #36205, fixes #38922, fixes #37807, fixes #37054, fixes #17591 and potentially others.
This fix adds a check in viewport.cpp which
checks that the focused node and none of its parents can handle the input, before propagating the input to all editor nodes which implement _unhandled_key_input.iterates through the node and it's parents, propagating calls to it's children. This ensures that_unhandled_input
is called not only on the node itself, but things like MenuButtons and Buttons which have assigned shortcuts.Also, a few accept_events() were added where needed to stop multiple
shortcuts from running at once. See #38922 for more comments.
Replaces/builds upon #37839 and #37068.
Requesting review/feedback from @reduz @akien-mga and others to see what they think. I think this is more a 'band-aid' fix over some bigger shortcut/input issues but hey, it works.
Before (3.2.1, latest master):
After: