Comment 3 for bug 1267550

Revision history for this message
Bill Filler (bfiller) wrote :

tried this suggestion from greyback in OSKController.qml:
Connections {
    target: ApplicationManager
    onFocusRequested: {
        if (__oskSurface) {
            // application in focus changed while OSK visible
            if (appId == "") // appId parameter of focusRequested signal. This hopefully means all focused app closed.
                Qt.inputMethod.hide(); //close OSK
        }
    }
}

Unfortunately the Qt.inputMethod.hide() method does not close the OSK. According to ricmm, only the owner of the input context (i.e. the app that has just been killed) can call hide on it.

The proper fix according to ricmm would be maliit-server should detect when a peer is closed and invalidate the active input context or explicitly make the OSK surface invisible. I have no idea where the code would be in maliit-server to do this, and all of our maliit experts are gone (:

So one potential workaround to try as quick fixes:
- instead of focusing the next app in the stack as we do now when the currently focused app is killed, focus the shell. This will cause the OSK to hide properly - as it does now if you just have one app running and you kill it from under the covers.
Was unclear where in application_manager.cpp to make this change or I would have tried.

@greyback - can you give this a try?