Bug 434632 - layouts error in wayland session but without error in X11 session
Summary: layouts error in wayland session but without error in X11 session
Status: CONFIRMED
Alias: None
Product: ktouch
Classification: Applications
Component: general (other bugs)
Version First Reported In: 24.05.1
Platform: Arch Linux Linux
: NOR critical
Target Milestone: ---
Assignee: Sebastian Gottfried
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-19 18:36 UTC by Egor
Modified: 2025-05-28 19:12 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Screenshot of KTouch falsely showing the error. (675.02 KB, image/png)
2024-08-14 07:29 UTC, Matija Šuklje
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Egor 2021-03-19 18:36:45 UTC
SUMMARY
in wayland session KTouch return error about layots/
but in X11 session all works OK

STEPS TO REPRODUCE
1. start KTouch in wayland session(in system 2  layouts RU & US(by default))
2. 
3. 

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Matija Šuklje 2024-08-14 07:29:23 UTC
Created attachment 172614 [details]
Screenshot of KTouch falsely showing the error.
Comment 2 Matija Šuklje 2024-08-14 07:32:12 UTC
I can confirm this on EndeavourOS (Arch) for 24.05.1 and the German Neo2 layout on Wayland.

Please see attached a screenshot that shows that the layout selected is indeed Neo, and still KTouch falsely claims that the correct layout is English (USA).
Comment 3 Wismill 2025-05-28 19:12:34 UTC
I suspect that this is due to using the X11 API: https://invent.kde.org/education/ktouch/-/blob/35065a0b85b15c15fc42f205c1cbf265a30a3ee0/src/x11_helper.cpp#L227.

On Wayland, the layout *components* (layout, variant) are not set by KWin (nor any other compositor it seems).

The solution would be to use setxkbmap with the exact same config than set in Plasma config.