Bug 398228

Summary: Touchpad/Mouse KCM Ui does not switch in Wayland session
Product: [Applications] systemsettings Reporter: Roman Gilg <subdiff>
Component: kcm_mouseAssignee: Unassigned bugs mailing-list <unassigned-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: atulbisht26, bugseforuns, matejm98mthw, nate, notuxius, unassigned-bugs
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 5.16.0
Sentry Crash Report:
Attachments: touchpad kcm
Mouse kcm

Description Roman Gilg 2018-09-04 08:00:59 UTC
In System Settings on Wayland when switching between the Mouse and Touchpad KCMs it does not refresh the QML file, but always reuses the one of the KCM opened first.

Only restarting System Settings allows to open the other QML file (but then not the other one again).
Comment 1 Alexander Mentyu 2018-09-04 12:48:23 UTC
Can reproduce

Distribution: KDE neon Developer Edition
Kernel: 4.15.0-29-generic
Plasma: 5.13.80
Apps: 18.11.70
Qt: 5.11.1
Frameworks: 5.48.0
Graphics:
Card-1: Intel driver: i915 v: kernel bus ID: 00:02.0 chip ID: 8086:5917 
Card-2: NVIDIA GM108M [GeForce 940MX] driver: nouveau v: kernel bus ID: 01:00.0 chip ID: 10de:134d 
Display: wayland server: X.Org 1.19.6 driver: modesetting,nouveau 
unloaded: fbdev,vesa alternate: nvidia compositor: kwin wayland 
resolution: 1920x1080~57Hz 
OpenGL: renderer: Mesa DRI Intel UHD Graphics 620 (Kabylake GT2) v: 4.5 Mesa 18.0.5 
compat-v: 3.0 direct render: Yes
Comment 2 Patrick Silva 2019-05-12 12:03:22 UTC
Created attachment 120005 [details]
touchpad kcm

on neon dev unstable, both mouse and touchpad kcms are almost the same.
The only difference is that, as we can see comparing the attached screenshots, the labels of the radio buttons of "Two-fingers tap" setting are missing in Mouse kcm.
Comment 3 Patrick Silva 2019-05-12 12:03:44 UTC
Created attachment 120006 [details]
Mouse kcm
Comment 4 Patrick Silva 2019-05-12 12:08:49 UTC
Both Mouse and Touchpad kcms always look as shown in the attached screenshots no matter which one was opened first.
Comment 5 atulbi 2019-05-17 11:27:15 UTC
I tried changing name of qml file and compiled it. 
Problem seems to be solved.

Roman can you try the same?
Comment 6 Nate Graham 2019-05-17 13:00:10 UTC
It's easiest to test when it's in patch form on Phab :)
Comment 7 atulbi 2019-05-18 11:07:33 UTC
*** Bug 407613 has been marked as a duplicate of this bug. ***
Comment 8 atulbi 2019-05-18 15:28:18 UTC
Git commit 3e0fd10ddc27480dcd01767ddb0ab698948228bd by Atul bisht.
Committed on 18/05/2019 at 15:28.
Pushed by atulbi into branch 'Plasma/5.16'.

[Touchpad KCM] Fixed loading of wrong qml file

Summary:
On system settings, If Mouse KCM is opened first, then touchpad KCM loads the same Mouse QML file (qrc:/libinput/main.qml) instead of Touchpad Qml file.
Having same url (qrc:/libinput/main.qml).

Fix: simply renaming qml files fixed the issue.There could be better solutions though.

Also removed unused configProps from D21228.

Test Plan:
1. Renamed main.qml to touchpad.qml .
2. Edited resource file to reflect change.
3. When compiled with these changes and opened touchpad setting, it was all blank, which was expected (because i did not changed the source).But opening mouse and then
touchpad shows mouse settigs. So it Confirmed the cause.
4. Now changing source and compiling it fixes the issue. Now, no more mouse on Touchpad and vice-versa.

Reviewers: romangg, ngraham

Reviewed By: romangg

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D21269

M  +1    -1    CMakeLists.txt
M  +0    -23   kcms/touchpad/src/backends/x11/libinputtouchpad.cpp
R  +0    -0    kcms/touchpad/src/kcm/libinput/touchpad.qml [from: kcms/touchpad/src/kcm/libinput/main.qml - 100% similarity]
M  +1    -1    kcms/touchpad/src/kcm/libinput/touchpadconfiglibinput.cpp
M  +1    -1    kcms/touchpad/src/kcm/resources.qrc

https://commits.kde.org/plasma-desktop/3e0fd10ddc27480dcd01767ddb0ab698948228bd
Comment 9 Patrick Silva 2019-05-21 10:17:32 UTC
*** Bug 407766 has been marked as a duplicate of this bug. ***