Bug 417035 - Maliit extension for KDE Flatpak Runtime
Summary: Maliit extension for KDE Flatpak Runtime
Status: RESOLVED FIXED
Alias: None
Product: Qt/KDE Flatpak Runtime
Classification: Developer tools
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Aleix Pol
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-01 18:43 UTC by Rinigus
Modified: 2020-02-24 10:33 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rinigus 2020-02-01 18:43:07 UTC
With this issue, I am asking you to add a keyboard extension for use with KDE Flatpak runtime on Sailfish OS. Sailfish is using Maliit service for keyboard input. This works via the service provided by OS leading to opening of a keyboard over an app and Qt input plugin communicating with the service and filling in app fields as required.

In context of Flatpak, we have few complications. In particular, plugin inside the container has no idea regarding device orientation nor whether the app is minimized or active. As we also have older Wayland compositor and some special handling of minimizing of the windows, I wrote a small wrapper app with Wayland compositor to run all Flatpak apps inside it. 

Next, I have written a small Maliit plugin which is communicating with the Flatpak wrapper app and Maliit service provided by OS. The communication is via DBus with the service-plugin via session bus and wrapper-plugin via p2p communication (address forwarded via environment). Permissions are given for known session bus talk name.

Plugin itself is a single file that has to be installed along other similar plugins at platforminputcontexts subfolder.

As far as I understand, all we have to do in org.kde.Sdk.json is to add declaration for the plugin as an extension and set it to no-autodownload. Then we will have to generate the extension and provide it somehow...

Currently I am using a hack to smuggle it in and would prefer to avoid that.

Plugin Flatpak packaging script (meta-script as it is used to generate several versions) is at https://github.com/sailfishos-flatpak/pkg-flatpak-maliit-plugin/blob/master/org.sailfish.maliit.qt.yaml

Plugin code is at https://github.com/sailfishos-flatpak/maliit-framework/tree/flatpak/input-context

I hope that addition of such plugin will be OK with you.
Comment 1 Rinigus 2020-02-01 18:45:29 UTC
Notice that I have not suggested any extension name. As I am new to Flatpaks, I guess you would have a better idea regarding it. In general it is a bit Sailfish specific, but we can use similar approach for other mobile OSes using Maliit. If its going to be used by others, its also possible to change the name later.
Comment 2 Rinigus 2020-02-22 12:11:14 UTC
Corresponding merge request has been submitted about a week ago at https://invent.kde.org/kde/flatpak-kde-runtime/merge_requests/8

Its more general and allows to add PlatformInputContexts extensions.

Please review. If it is acceptable, please consider the same for 5.14 as well.
Comment 3 Aleix Pol 2020-02-23 01:45:16 UTC
Fix merged, thanks!
Comment 4 Rinigus 2020-02-23 08:38:44 UTC
Thank you very much! I just submitted the same patch for 5.14 runtime as well, please merge that too.

Do you know when could we expect it to be published/usable as a new version of the runtime?
Comment 5 Aleix Pol 2020-02-23 23:42:49 UTC
Merged the other.

I don't know, it usually takes a few hours. You can follow the builds here:
https://flathub.org/builds/#/
Comment 6 Rinigus 2020-02-24 07:25:52 UTC
Thank you very much!

But those updated runtimes are not promoted to the distributed ones immediately, right? At least "flatpak update" doesn't find 5.12 (from last night) yet. Same goes for 5.14
Comment 7 Rinigus 2020-02-24 10:33:30 UTC
Thank you, looks like KDE 5.14 Platform has been updated at Flathub! Submitting Maliit extension for review over there and we should get it sorted soon.