Integrate the normal keyboard layout switcher
Needs ReviewPublic

Authored by apol on Tue, Oct 8, 3:41 PM.



This deprecates the SNI from KWin in favour of this plasmoid that will
allow doing the same as well as managing the different IME tech we

This also changes the default panel layout to include kimpanel since it
will be useful in any language.

Related to D12069 and D14796

Test Plan

I can switch between catalan and american keyboard, if ibus
is running I can do the same but through ibus.

Diff Detail

R119 Plasma Desktop
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
apol created this revision.Tue, Oct 8, 3:41 PM
Restricted Application added a project: Plasma. · View Herald TranscriptTue, Oct 8, 3:41 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
apol requested review of this revision.Tue, Oct 8, 3:41 PM
apol updated this revision to Diff 67513.Tue, Oct 8, 3:45 PM

Remove unused function

apol updated this revision to Diff 67514.Tue, Oct 8, 3:48 PM

Send a sensible font size

Makes sense, there's a lot of red and it's about to lead to more.

I like that.




Do we also need a plasma upgrade script if we remove the SNI from kded/kwin

broulik added a subscriber: broulik.Tue, Oct 8, 4:14 PM

Do we need an update script to add this plasmoid to all existing setups?

apol added inline comments.Tue, Oct 8, 5:59 PM

I'd say so. We can do it when we deprecate the SNI though, unless you really want it now. I've never done it so I'll have to research how it's done.

hein added a subscriber: hein.EditedSat, Oct 12, 10:29 AM

It's a small part of the work Geon Park did in his GSoC project to refactor kimpanel and our input sources management in general, but in a more merge-friendly format.

The former sadly never got any review attention because the patch was too big, so maybe this is the right way to make progress.

For context though, in the GSoC the following work was done:

  • The keyboard layout KCM was rewritten in Qt Quick
  • It's based on a model that can contain both IMEs and keyboard layouts
  • The model can dynamically react to IME daemons coming and going and doing a sensible fallback
  • The implementation is shared between the KCM, kimpanel (which, like here, replaces the old SNI) and the kded module that on X11 provides the D-Bus API to manage layouts
  • That means global shortcuts like Next/Prev Keyboard Layout we have work over both IMEs and layouts
  • That means the OSD and the lock screen show the right thing and became IME-aware

And a couple of other things. What wasn't done was touch KWin/Wayland (which in a Plasma/Wayland session provides the same D-Bus API kded provides on X11).

So it's important to remember that this is the goal. With this patch Plasma would get better, but it doesn't address the whole problem (System Settings being useless for IMEs, the IME daemon making System Settings useless when running, two incompatible systems fighting each other, expert knowledge required to set things up in the first place, etc).

I'm very excited to see this because it indicates more interest growing in the problem domain, so maybe we can review and merge that other body of work down the line after all.

apol added a comment.Sat, Oct 12, 2:43 PM

I don't claim to solve the whole problem, it's just a step forward.

This revision was not accepted when it landed; it landed in state Needs Review.Mon, Oct 14, 2:15 PM
This revision was automatically updated to reflect the committed changes.
apol reopened this revision.Tue, Oct 15, 3:28 PM
apol added a comment.Tue, Oct 15, 3:57 PM

This got landed by arc together with another patch. I didn't mean to land it.

mart added a subscriber: mart.Wed, Oct 16, 9:15 AM
In D24503#545961, @hein wrote:

For context though, in the GSoC the following work was done:

  • The keyboard layout KCM was rewritten in Qt Quick

Can that work be resumed/used?

apol added a comment.Wed, Oct 16, 10:57 AM

Can that work be resumed/used?

See D14796. It seems like the original author is MIA. I rebased the patch, seems to work but adopting it will set us back as the ibus backend was never implemented.