-
Notifications
You must be signed in to change notification settings - Fork 744
Add support for the Back key on Android #9172
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
2b212c6
to
fcc484b
Compare
9b644ef
to
f26459f
Compare
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, looks good to me.
However I don't manage to run that test locally:
(and more similar errors) |
I have seen that before. I think it's a bug in the build script which somehow think Qt feature is active despite it is not (maybe because confused with other build) |
It’s weird how another PR I made earlier today passed nicely, but this one somehow triggers the QComboBox test (not build) failure. There are warnings about threading that are also worrisome (not caused by this patch). |
Successfully tested with this code forward-focus: my-key-handler; my-key-handler := FocusScope { key-pressed(event) => { if (event.text == Key.Back) { root.close(); } accept } } but also without (that was the hard part: letting Android terminate the activity on Back if it's not accepted by slint, which no longer happened after returning Some(...) in key_codes.rs)
Wierd indeed. Maybe related to the change of run_change_handlers, although i can't see a difference. |
Same here, I've been staring at the diff but can't see the difference. Somehow the defer! macro isn't producing the same behaviour. |
f26459f
to
ac737c2
Compare
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.
Looks good to me.
what's the next step? (this isn't like Qt, I can't merge myself) |
Sorry, I wanted to merge yesterday but forgot. |
depends on slint-ui/slint#9172
Successfully tested with this code
but also without (that was the hard part: letting Android terminate the activity on Back if it's not accepted by slint, which no longer happened after returning Some(...) in key_codes.rs)