-
Notifications
You must be signed in to change notification settings - Fork 17
Let the app handle the back key event first #126
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
Conversation
| } else if (keyname == kExitKey) { | ||
| ui_app_exit(); | ||
| } |
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 was added due to the second issue in flutter-tizen/flutter-tizen#136. I couldn't test it because I wasn't able to reproduce the issue.
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'm just curious and asking.. As I remember.. you think we don't need these handing?
Why did you change your mind?
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.
@bwikbs What made you think I changed my mind? No, I haven't. This changes just addresses the second issue in flutter-tizen/flutter-tizen#136.
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.
| } | ||
| }); | ||
| } | ||
| return ECORE_CALLBACK_PASS_ON; |
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 callback still returns ECORE_CALLBACK_PASS_ON instead of ECORE_CALLBACK_DONE because whether the app handled the key event is determined asynchronously. I'll try to find a better solution as noted in the PR comment.
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'll try to find a better solution as noted in the PR comment.
Do you mean flutter/flutter#44918?
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.
Yes, probably. But the new API still doesn't make the result from Dart code synchronously available to the caller.
bwikbs
left a comment
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.
Thanks for your working!
bbrto21
left a comment
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.
LGTM
* Let the app handle the back key event first * Tidy up
* Let the app handle the back key event first * Tidy up
* Let the app handle the back key event first * Tidy up
* Let the app handle the back key event first * Tidy up
* Let the app handle the back key event first * Tidy up
* Let the app handle the back key event first * Tidy up
* Let the app handle the back key event first * Tidy up
* Let the app handle the back key event first * Tidy up
* Let the app handle the back key event first * Tidy up
Fixes flutter-tizen/flutter-tizen#136.
Side note)
The new embedder API (
FlutterEngineSendKeyEvent) has recently been added as part of flutter/flutter#44918. I'll check if it's worth migrating from our platform channel-based implementation.Edit)
I'm not going to implement flutter/flutter#44918 right now because the work is still in progress and the framework side change isn't merged to the stable branch. (Actually I tried a bit: https://github.com/swift-kim/engine/commits/keyboard-hardware.) I'll revisit when the migration is almost done in the upstream and the method channel for key events becomes no longer available. Please take a look at https://flutter.dev/go/platform-based-key-events if interested.