Keyboard: properly handle keyboard layout height change

The japanese keyboard being taller than the others, when
switching to/from it from/to another layout:
- re-init InputDialog for proper sizing and positionning
- refresh the whole screen, to remove any trace of
  a previous taller keyboard

Also add calls to :free() here and there to free keyboard
keys' TextWidgets' XText C objects without waiting for GC.
This commit is contained in:
poire-z
2019-11-25 14:31:54 +01:00
parent 13fa6d962c
commit 397211644d
3 changed files with 50 additions and 4 deletions

View File

@@ -406,6 +406,13 @@ function InputText:onCloseKeyboard()
UIManager:close(self.keyboard)
end
function InputText:onCloseWidget()
if self.keyboard then
self.keyboard:free()
end
self:free()
end
function InputText:getTextHeight()
return self.text_widget:getTextHeight()
end