Bug 408116 - [libinput on X11] Options to set right-click are greyed out and middle-click options when using Icons view in System Settings, or in the KCMShell version, or when on Wayland after opening and closing the KCM in SystemSettings a few times
Summary: [libinput on X11] Options to set right-click are greyed out and middle-click ...
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_touchpad (show other bugs)
Version: 5.17.5
Platform: Other Linux
: HI major
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
: 416160 418524 426772 436368 438274 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-05-30 13:52 UTC by Patrick Silva
Modified: 2023-07-21 05:03 UTC (History)
14 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.0


Attachments
screenshot (62.93 KB, image/jpeg)
2019-05-30 13:52 UTC, Patrick Silva
Details
Waylland - greyed out right-click options and missing middle-click options on bottom (129.33 KB, image/png)
2020-11-25 13:00 UTC, Patrick Silva
Details
x11, system settings icon view mode - greyed out options on bottom, "Right-click" label is not greyd out despite their options are (77.82 KB, image/png)
2020-11-25 13:04 UTC, Patrick Silva
Details
x11, system settings sidebar view mode, open via krunner/kickoff/icon on desktop. Greyed out right-click options and missing middle-click options on bottom. We can observe the bugs 1, 2 and 3 (149.71 KB, image/png)
2020-11-25 13:08 UTC, Patrick Silva
Details
"Apply" button is always active when I open the KCM via krunner, kickoff or icon on desktop on X11 and System Settings is set to icon view mode (2.74 MB, video/webm)
2020-11-25 13:35 UTC, Patrick Silva
Details
Before highlight changes - neither option visible (but configured) (182.00 KB, image/png)
2021-06-08 22:47 UTC, Constantine
Details
After highlight changes - visible and active (210.82 KB, image/png)
2021-06-08 22:47 UTC, Constantine
Details
Wayland - I always get this KCM (118.31 KB, image/png)
2021-10-29 13:23 UTC, Patrick Silva
Details
X11 - greyed out two-fingers tap options and missing 'Acceleration profile' options (66.36 KB, image/png)
2021-10-29 13:26 UTC, Patrick Silva
Details
X11 - greyed out right-click options (78.33 KB, image/png)
2021-10-29 13:27 UTC, Patrick Silva
Details
X11 - greyed out 'Tapping' and 'Two-fingers tap' options (70.84 KB, image/png)
2021-10-29 13:30 UTC, Patrick Silva
Details
X 11 - apparently correct KCM (72.28 KB, image/png)
2021-10-29 13:31 UTC, Patrick Silva
Details
X11 - greyed out 'Two-fingers tap' and 'Right-click' options (113.28 KB, image/png)
2021-10-29 13:43 UTC, Patrick Silva
Details
Right click label appears for the first time (311.17 KB, image/png)
2022-02-06 15:29 UTC, medin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2019-05-30 13:52:10 UTC
Created attachment 120398 [details]
screenshot

STEPS TO REPRODUCE
1. search for "touchpad" kcm in the apps launcher and open it
2. 
3. 

OBSERVED RESULT
As we can see in the attached screenshot, the options to set right-click are greyed out but "Right-click" label is not

EXPECTED RESULT
"Right-click" label should also be greyed out

SOFTWARE/OS VERSIONS
Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.16.80
KDE Frameworks Version: 5.59.0
Qt Version: 5.12.0
Comment 1 Nate Graham 2019-06-02 19:40:02 UTC
Git commit 3a21ae2ab35ffc94c539ba65e116e3ee060367ae by Nate Graham.
Committed on 02/06/2019 at 19:33.
Pushed by ngraham into branch 'master'.

[Touchpad KCM] disable "Right-Click:" label when its controls are disabled
FIXED-IN: 5.17.0

M  +1    -0    kcms/touchpad/src/kcm/libinput/touchpad.qml

https://commits.kde.org/plasma-desktop/3a21ae2ab35ffc94c539ba65e116e3ee060367ae
Comment 2 Patrick Silva 2020-01-19 00:06:04 UTC
This issue persists.

On Wayland, open and close standalone KCM or system settings in icon view mode > input devices > touchpad a few times.
At some point "Right-click" label will be black text despite its radio buttons and their labels are greyed out.

On X11 both standlone KCM and KCM in system settings are always affected if system settings is configured to icon view. If side bar view is used instead, only standalone KCM is always affected.

Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.18.80
KDE Frameworks Version: 5.67.0
Qt Version: 5.13.2
Comment 3 Nate Graham 2020-01-22 20:57:49 UTC
*** Bug 416160 has been marked as a duplicate of this bug. ***
Comment 4 Patrick Silva 2020-01-23 02:08:54 UTC
bug 408117 is still happening on Neon unstable edition and seems related/duplicate.

Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.18.80
KDE Frameworks Version: 5.67.0
Qt Version: 5.13.2
Comment 5 Nate Graham 2020-03-19 14:08:44 UTC
*** Bug 408117 has been marked as a duplicate of this bug. ***
Comment 6 Nate Graham 2020-03-19 14:13:17 UTC
*** Bug 418524 has been marked as a duplicate of this bug. ***
Comment 7 David Edmundson 2020-03-28 18:59:01 UTC
I have got very confused in this thread. Especially with the linked reports that all seem very different.

One is that labels are not greyed out correctly when the control is, one is that the controls are disabled. One about wayland one about X11.

Please can this be clarified.
Comment 8 Patrick Silva 2020-03-28 20:42:38 UTC
The issue is the same on both X11 and Wayland sessions:
"Right-click" label is not greyed out but its radio buttons and their respective labels are.
Read comment 2.

I'm not sure if "greyed out" is the expected state of "Right-click" radio buttons or not because I'm not sure if my touchpad supports these right-click settings or not. I open the context menu by pressing the right button of my touchpad or by tapping it with three fingers.

If my device does not support these right-click settings, "Right-click" label and its radio buttons and their respective labels should be greyed out.
If my device supports them, "Right-click" label should not be greyed out and its radio buttons should be selectable.
Comment 9 Patrick Silva 2020-03-28 21:31:06 UTC
My bug 408117 "([libinput/X11] "Press left and right buttons for middle click" option of standalone Touchpad KCM is greyed out") marked as duplicate in fact is not a bug. It is the expected behavior because my touchpad does not support
"Press left and right buttons for middle click" feature (see bug 395404 comment 11).
Comment 10 Nate Graham 2020-03-30 15:09:54 UTC
With everything from git master, the issue has stopped reproducing for me. Patrick, can you still reproduce on neon dev unstable?
Comment 11 Patrick Silva 2020-03-31 13:24:28 UTC
(In reply to Nate Graham from comment #10)
> With everything from git master, the issue has stopped reproducing for me.
> Patrick, can you still reproduce on neon dev unstable?

The situation is still the same as described in comment 2.

Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.18.80
KDE Frameworks Version: 5.69.0
Qt Version: 5.14.1
Comment 12 Nate Graham 2020-03-31 13:49:08 UTC
OK, can reproduce with those instructions.
Comment 13 Nate Graham 2020-09-23 17:24:16 UTC
*** Bug 426772 has been marked as a duplicate of this bug. ***
Comment 14 David Edmundson 2020-10-30 21:36:41 UTC
The code can be ported from  onCheckedChanged to onToggled and that is going to remove the horrible mess and self-guarding that's there. 

This part is also alarming:

        Layouts.ColumnLayout { //middle click
            function load() {
                visible = rightClickMethod.visible
        if (!visible) {
                    enabled = false
                    return;
                }

visible is a magic property that inherits from various other parts, including window visibility. This is a function not a binding, so this is problematic.

I expect this is the problem seen, but we should really rewrite this whole thing to be declarative.
Comment 15 Nate Graham 2020-10-30 22:27:27 UTC
Yes the current code is quite problematic. I have a branch where I started rewriting it to be more declarative; I should really finish that up.
Comment 16 Bug Janitor Service 2020-11-15 23:16:10 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/225
Comment 17 David Edmundson 2020-11-18 13:12:34 UTC
Git commit a53b30f3f5d8d1644ce91398ed1457ee9fe525cc by David Edmundson.
Committed on 18/11/2020 at 13:12.
Pushed by davidedmundson into branch 'master'.

Don't use visible property in procedural code to determine state

It can be invisible not just because something is disabled but because
it's not shown yet. But load() is only run once. Instead replace with a
binding.

Rather than toggling the checked state when invisible, the evaluation is
moved into the sync method.

M  +5    -18   kcms/touchpad/kcm/libinput/touchpad.qml

https://invent.kde.org/plasma/plasma-desktop/commit/a53b30f3f5d8d1644ce91398ed1457ee9fe525cc
Comment 18 David Edmundson 2020-11-18 13:13:06 UTC
Git commit 809f3787555f323de2a2f96d1e8d9f13601f4c27 by David Edmundson.
Committed on 18/11/2020 at 13:13.
Pushed by davidedmundson into branch 'Plasma/5.20'.

Don't use visible property in procedural code to determine state

It can be invisible not just because something is disabled but because
it's not shown yet. But load() is only run once. Instead replace with a
binding.

Rather than toggling the checked state when invisible, the evaluation is
moved into the sync method.


(cherry picked from commit a53b30f3f5d8d1644ce91398ed1457ee9fe525cc)

M  +5    -18   kcms/touchpad/kcm/libinput/touchpad.qml

https://invent.kde.org/plasma/plasma-desktop/commit/809f3787555f323de2a2f96d1e8d9f13601f4c27
Comment 19 Patrick Silva 2020-11-20 16:58:12 UTC
Unfortunately this problem persists on neon unstable. :(
Comment 20 Nate Graham 2020-11-23 17:54:07 UTC
Argh, can confirm. :( I could have sworn it was working...
Comment 21 David Edmundson 2020-11-25 10:13:57 UTC
Can I have some screenshots so I know we're still talking about the same thing.

Things I am aware of:
 - Middle click -> Press anywhere with three fingers, will always be disabled. It seems it's a separate but. I can't see any code to enable it or save that value...

 - *if* you are in a state where neither radio button for right-click is selected,  then all middle-click settings will be missing. That part I think is technically correct. Us getting in that state is of course a bug.
Comment 22 Patrick Silva 2020-11-25 12:59:45 UTC
On Wayland I only see greyed out options on bottom when System Settings is set to
sidebar view.

On X11, I also see greyed out options on bottom, but in both icon and sidebar views. 

Also on X11, if System Settings is set to sidebar view, the KCM open
via kickoff, krunner or icon on desktop has some problems that do not affect the KCM open directly in System Settings:

1. the middle-click options on bottom are missing

2. "Two-finger tap" options are greyed out. Futhermore, their labels are different compared to the ones of the KCM open directly in System Settings

3. "Tapping" options are greyed out.


Another issue on X11 is that "Apply" button is always active when System Settings is set to icon view and I open the KCM via krunner, kickoff or icon on desktop.

See the attached screenshots please.
Comment 23 Patrick Silva 2020-11-25 13:00:40 UTC
Created attachment 133641 [details]
Waylland - greyed out right-click options and missing middle-click options on bottom
Comment 24 Patrick Silva 2020-11-25 13:04:20 UTC
Created attachment 133642 [details]
x11, system settings icon view mode - greyed out options on bottom, "Right-click" label is not greyd out despite their options are
Comment 25 Patrick Silva 2020-11-25 13:08:32 UTC
Created attachment 133643 [details]
x11, system settings sidebar view mode, open via krunner/kickoff/icon on desktop. Greyed out right-click options and missing middle-click options on bottom. We can observe the bugs 1, 2 and 3
Comment 26 Patrick Silva 2020-11-25 13:14:13 UTC
(In reply to Patrick Silva from comment #22)
> On Wayland I only see greyed out options on bottom when System Settings is
> set to sidebar view.
>
Comment 27 Patrick Silva 2020-11-25 13:16:46 UTC
(In reply to Patrick Silva from comment #22)
> On Wayland I only see greyed out options on bottom when System Settings is
> set to sidebar view.

Also middle-click options are missing.
Comment 28 Patrick Silva 2020-11-25 13:31:27 UTC
We can also observe in the screenshot in comment 25 that middle-click options are missing on bottom.
Comment 29 Patrick Silva 2020-11-25 13:35:50 UTC
Created attachment 133645 [details]
"Apply" button is always active when I open the KCM via krunner, kickoff or icon on desktop on X11 and System Settings is set to icon view mode

Here is a screen recording showing that "Apply" button is always active
when I open the KCM via krunner, kickoff or icon on desktop on X11.
Comment 30 David Edmundson 2020-11-26 22:31:06 UTC
thanks.

>Also middle-click options are missing.

That matches the code given both right click options are unset. Maybe I should hide the label if we're in that setup. There is a code path where it's intended for right click to be disabled.
Comment 31 Nate Graham 2021-04-30 16:30:57 UTC
*** Bug 436368 has been marked as a duplicate of this bug. ***
Comment 32 Nate Graham 2021-06-08 19:13:39 UTC
*** Bug 438274 has been marked as a duplicate of this bug. ***
Comment 33 Constantine 2021-06-08 22:47:00 UTC
Created attachment 139120 [details]
Before highlight changes - neither option visible (but configured)
Comment 34 Constantine 2021-06-08 22:47:24 UTC
Created attachment 139121 [details]
After highlight changes - visible and active
Comment 35 Constantine 2021-06-08 22:49:45 UTC
Several of the bugs marked as duplicate here appear to have different behaviours (presumably all linked).  In the case of 438274, *both* options are *missing*, not greyed out (but should be present and active), though the controls should be visible and active (attachment 139120 [details]), and both appear (and are active) when highlight changes is pressed (attachment 139121 [details]).
Comment 36 Patrick Silva 2021-10-29 13:23:07 UTC
Created attachment 142996 [details]
Wayland -  I always get this KCM

Update:

On Wayland, both right-click and middle-click options are always missing on bottom
regardless the way used to open the Touchpad KCM (icon on desktop, Kickoff, krunner, System Settings,
'kcmshell5 touchpad_kcm' command) and regardless the used view (icon or sidebar).
However, I'm not sure if this is expected because I do not know if my touchpad supports
middle-click and/or right-click options or not.

On X11, I get random results (this is deeply annoying!) each time I open the Touchpad KCM
configured in any view mode by any way.
Sometimes right-click options on bottom are greyed out, sometimes they are missing;
sometimes 'Acceleration profile' options are missing;
sometimes 'Tapping' and 'Two-finger tap' options are greyed out.
middle-click options are always missing.

Please see the attached screenshots.

Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.23.80
KDE Frameworks Version: 5.88.0
Qt Version: 5.15.3
Graphics Platform: X11
Comment 37 Patrick Silva 2021-10-29 13:26:20 UTC
Created attachment 142997 [details]
X11 - greyed out two-fingers tap options and missing 'Acceleration profile' options
Comment 38 Patrick Silva 2021-10-29 13:27:13 UTC
Created attachment 142998 [details]
X11  - greyed out right-click options
Comment 39 Patrick Silva 2021-10-29 13:30:28 UTC
Created attachment 142999 [details]
X11 - greyed out 'Tapping' and 'Two-fingers tap' options
Comment 40 Patrick Silva 2021-10-29 13:31:52 UTC
Created attachment 143000 [details]
X 11  -  apparently correct KCM
Comment 41 Patrick Silva 2021-10-29 13:33:40 UTC
Maybe the tittle of this report should be changed to something like
"X11 - Several touchpad settings are randomly greyed out or missing"
Comment 42 Patrick Silva 2021-10-29 13:43:09 UTC
Created attachment 143002 [details]
X11 - greyed out 'Two-fingers tap' and 'Right-click' options
Comment 43 Nate Graham 2022-01-21 22:21:29 UTC
This is working for me with current git master using one of the reproduction methods (`kcmshell5 kcm_touchpad`).

Note that the tap-to-click stuff being grated out is expected when the tap-to-click feature itself is turned off.

Now things seem grayed out for me at the correct times. Can anyone with git master stuff confirm?
Comment 44 Patrick Silva 2022-01-22 14:38:55 UTC
On X11, right and middle-click options on bottom seen in the screenshot attached to comment 0 are always missing.
I think my touchpad does not support these options, but I'm not sure. I have filed other bugs regarding touchpad settings:
bug 448951
bug 448953

Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.24.80
KDE Frameworks Version: 5.91.0
Qt Version: 5.15.3
Graphics Platform: X11
Comment 45 Bug Janitor Service 2022-02-06 04:37:21 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 46 medin 2022-02-06 15:28:21 UTC
I have a touchpad with only left and right buttons, the behavior that is happening for me on 5.23.5 with X11 is that after directly logging the first time I click on Touchpad page the middle click options appears with label enabled and radio buttons disabled, but if I click on another category then return to Touchpad page both the label and radio buttons disappear and never shown again in the current session. See attached image.
Comment 47 medin 2022-02-06 15:29:57 UTC
Created attachment 146345 [details]
Right click label appears for the first time
Comment 48 Bug Janitor Service 2023-05-23 18:35:16 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/1526
Comment 49 Méven Car 2023-07-21 04:42:56 UTC
Git commit 6e5f60767e793e03f1e08984c04d28ddf36714ca by Méven Car, on behalf of Méven Car.
Committed on 21/07/2023 at 04:42.
Pushed by meven into branch 'master'.

KCM touchpad: hide initially lmr/rml section and rightclick method

M  +9    -4    kcms/touchpad/kcm/libinput/touchpad.qml

https://invent.kde.org/plasma/plasma-desktop/-/commit/6e5f60767e793e03f1e08984c04d28ddf36714ca