Skip to content
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

Fix VKeyboard missing with custom keyboard class #7846

Merged
merged 1 commit into from Apr 29, 2023

Conversation

Gobbel2000
Copy link
Contributor

@Gobbel2000 Gobbel2000 commented Mar 14, 2022

In window/__init__.py the VKeyboard class is only imported when needed, which only happens in request_keyboard(). If a custom keyboard class is set using set_vkeyboard_class(), it is never imported. In that case the function _get_kivy_vkheight() that was introduced in #7726 fails, because VKeyboard is still None. This change instead compares to self._vkeyboard_cls which is ensured above to not be None. If no custom class is set, this should still be just VKeyboard.

Maintainer merge checklist

  • Title is descriptive/clear for inclusion in release notes.
  • Applied a Component: xxx label.
  • Applied the api-deprecation or api-break label.
  • Applied the release-highlight label to be highlighted in release notes.
  • Added to the milestone version it was merged into.
  • Unittests are included in PR.
  • Properly documented, including versionadded, versionchanged as needed.

@D4SK
Copy link
Contributor

D4SK commented Oct 10, 2022

This fix works great for me as well. I hope this will be merged soon. Seems like a very safe change. Maybe @DexerBR can comment as he added the change that is affected.

@misl6 @pythonic64

@misl6 misl6 added this to the 2.2.0 milestone Apr 29, 2023
Copy link
Member

@misl6 misl6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you!

@misl6 misl6 merged commit 48e6d12 into kivy:master Apr 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants