Bug 403281 - Spare layouts doesn't work
Summary: Spare layouts doesn't work
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: input (show other bugs)
Version: 5.14.5
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: wayland
Depends on:
Blocks:
 
Reported: 2019-01-16 18:22 UTC by zvova7890
Modified: 2021-11-18 01:45 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
kde: Wayland+


Attachments
What is spare layouts (98.41 KB, image/png)
2019-01-17 12:13 UTC, zvova7890
Details

Note You need to log in before you can comment on or make changes to this bug.
Description zvova7890 2019-01-16 18:22:45 UTC
Keyboard -> Layouts [x] Spare layouts, Main layout count [2]


STEPS TO REPRODUCE
1. Install 3 or more kbd layouts
2. Use spare layouts checkbox, and main layout count with 2
3. Switch layouts by shortcut

OBSERVED RESULT
All installed kdb layouts are in loop

EXPECTED RESULT
Only two last layouts in switch loop

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 5.14.5
KDE Plasma Version: 5.14.5
KDE Frameworks Version: 5.54.0
Qt Version: 5.12.0

ADDITIONAL INFORMATION
Under X all is ok
Comment 1 Martin Flöser 2019-01-17 05:18:17 UTC
What is a spare layout?
Comment 2 zvova7890 2019-01-17 12:13:37 UTC
Created attachment 117507 [details]
What is spare layouts
Comment 3 Martin Flöser 2019-01-17 15:46:29 UTC
Please answer the question and don't attach a useless screenshot.
Comment 4 zvova7890 2019-01-17 16:08:13 UTC
This is "Restrict layout counts inside switch ring" in origin text named as "spare layouts".

Or what do you want know?
Comment 5 David Edmundson 2019-01-17 16:31:54 UTC
>Or what do you want know?

It's a bit unclear from the name/UI, and KDE is a bit too big for every dev to know every bit of code.

Docs are surprisingly good:

Spare layouts allow to toggle between small number of layouts easily while keeping more layouts handy close by. For example you might use 3 languages: English, Ukrainian and German but first two are used often and third one just occasionally. In this case you can configure first two as main layouts (setting Main layout count: 2) and German one as spare one - when you toggle with keyboard and left mouse button the switch will happen between main layouts only but you can always choose 3rd layout with context menu.

When spare layout is chosen it replaces the last main layout (this is done for technical reasons, usually global shortcuts work based on the 1st active layout so it's more reliable to preserve the 1st layout when allowing to activate spare layouts).

As X.org only allows to have 4 layouts to switch “spare layouts” feature also allows to overcome this limitation: user can have up to 4 main layouts (managed by X.org) but 4 more spare layouts allowed (managed by layout switcher). Thus user can conveniently work with up to total of 8 layouts (although the 4 spare layouts limit can be raised in the future).


---

Sounds like a clunky UI, and the last part clearly isn't relevant here, but if we're going to have an option it does make sense that we follow it.
Comment 6 Martin Flöser 2019-01-17 17:48:34 UTC
I would prefer to just remove this option on Wayland. It doesn't sound like a useful feature and the UI is certainly not helpful.
Comment 7 zvova7890 2019-01-17 18:57:42 UTC
No! Don't remove! If people like removed functional they just using gnome as well. That is very important feature for people who have more than 2 layout in use. 

Is this difficult to implement on wayland? Who manage languages at wayland session?
Comment 8 zvova7890 2019-01-17 19:00:48 UTC
>> It doesn't sound like a useful feature and the UI is certainly not helpful.

in defense I can say that the translation into Russian is more understandable
Comment 9 David Edmundson 2021-11-18 01:45:58 UTC
this was implemented a while ago