Code review comment for lp:~michael-sheldon/oxide/input-focus-fix

Revision history for this message
Michael Sheldon (michael-sheldon) wrote :

Crash was unrelated to this particular change, (it was instead related to resetting the input method at an inappropriate time, a separate change I was testing previously to fix this issue).

To give a bit more detail on what's happening here:

Maliit won't display the keyboard if it doesn't have a valid focus object, if it gets a call to show the keyboard without a focus object it will place it in a "pending" state and wait for the focus object to be set.

The focus object is set via a call to setFocusObject() on the QInputContext interface, which is done internally by QGuiApplication. This all functions correctly within oxide until a call to Qt.openExternalURL() is made by a webapp, after this the setFocusObject() method is never called again and so the keyboard won't display until the webapp is restarted.

This branch works around this by manually triggering the focusObjectChanged signal from the current focusWindow, which then causes QGuiApplication to run setFocusObject on the QInputContext.

« Back to merge proposal