Bug 392050 - Applications > Launch Feedback > Cursor: effect does not save when changed
Summary: Applications > Launch Feedback > Cursor: effect does not save when changed
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: Eike Hein
URL:
Keywords:
: 392435 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-03-19 11:36 UTC by Scott Harvey
Modified: 2018-03-28 07:08 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Screen recording of unsaved change (1.87 MB, video/mp4)
2018-03-19 11:36 UTC, Scott Harvey
Details
Screencast of bouncing cursor regardless of klaunchrc (3.09 MB, video/mp4)
2018-03-19 16:34 UTC, Scott Harvey
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Scott Harvey 2018-03-19 11:36:45 UTC
Created attachment 111495 [details]
Screen recording of unsaved change

Changing the cursor effect for launch feedback (i.e. from "bouncing" to "none") does not save or activate the "Apply" button. The intended change does not take effect.
Comment 1 Nate Graham 2018-03-19 13:34:34 UTC
Can confirm. After changing the Cursor setting, the "Apply" button does not take effect.

Changing any other setting *does* result in the Apply button being activated, and the change can be saved.

Even if I change another setting to activate the Apply button, and then change the Cursor setting, the new Cursor setting is still not saved after hitting the Apply button.

Looks like this was likely fallout from the recent QML port. Eike?
Comment 2 Scott Harvey 2018-03-19 13:41:43 UTC
This might be something I'm able to fix... just as soon as I can find out where it lives. (*grumbles at impressive scope and scale of project)
Comment 3 Nate Graham 2018-03-19 14:08:15 UTC
If you want to have a go, that would be excellent! The code is in plasma-desktop:

https://cgit.kde.org/plasma-desktop.git/tree/kcms/launch
Comment 4 Scott Harvey 2018-03-19 14:41:18 UTC
Thanks, Nate.

The code, like all good code, appears straightforward enough. I'll see if I can chase it down. It might not be as simple as I'd like... after all, this was written by the famous (yet helpful!) Sho  :)  I don't think many bugs escape his keyboard.
Comment 5 Scott Harvey 2018-03-19 16:34:50 UTC
Created attachment 111513 [details]
Screencast of bouncing cursor regardless of klaunchrc
Comment 6 Scott Harvey 2018-03-19 16:38:54 UTC
The problem appears to run deeper than a non-saving dialog. The bouncing cursor doesn't seem to obey what's set in $HOME/.config/klaunchrc, even if set manually (which I did).

No matter what values are in klaunchrc, the cursor still shows a bouncing icon. 

In the screencast, you can see that I've manually changed the values to get "No Feedback" as the active option. But when I launch Handbrake (which takes long enough to start), I still get a bouncing icon cursor.

Input, please?
Comment 7 Scott Harvey 2018-03-19 17:22:19 UTC
Changes do take effect after logging out and back in. A simple restart of plasmashell isn't sufficient.
Comment 8 Eike Hein 2018-03-20 11:25:18 UTC
> Changes do take effect after logging out and back in. A simple restart of plasmashell isn't sufficient.

That means KWin isn't watching launchrc for changes.
Comment 9 Eike Hein 2018-03-20 11:26:09 UTC
Scott, do you still want to fix the KCM code for the Apply button?
Comment 10 Scott Harvey 2018-03-20 11:59:55 UTC
(In reply to Eike Hein from comment #9)
> Scott, do you still want to fix the KCM code for the Apply button?

I'll give it a try. Sorry I didn't work on it more yesterday, been sick. Need to sort out how to test this on a living, breathing Plasma installation. Any brief advice? (Like I said, been sick - logic circuits are running slow.)
Comment 11 Eike Hein 2018-03-20 12:11:50 UTC
I can give you a general low-down of how it works, or is supposed to: In response to clicking around in the UI, the QML code in main.qml sets the new setting value in the C++ backend object (written down in launchfeedback.cpp). The C++ code receives the new value, and then updateNeedsSaving() compares it against the saved value and figures out whether it needs to mark the System Settings module as "needs saving". While a module "needs saving" the Apply button is enabled.

Most likely there's a logic bug in updateNeedsSaving().
Comment 12 Scott Harvey 2018-03-20 12:16:36 UTC
Yep, I got that far.

I'm more puzzled about how to recompile just this one KCM module and stick it back into my system. Without destroying things, of course.

This is my first take on modifying a live part of Plasma, as opposed to one of the applications.
Comment 13 Eike Hein 2018-03-20 12:20:51 UTC
Best way to go is:

a) Clone plasma-desktop
b) When you run cmake set a custom install prefix somewhere in your $HOME
c) Before you run "make" and "make install" in the build dir, cd into kcms/launch to only build that one module instead of all of plasma-desktop
d) Modify https://www.eikehein.com/kdedev.txt to reflect the custom prefix you personally chose and stick it as somethingsomething.sh into your /etc/profile.d/ (or whatever you prefer to set env vars for your session) - go over this file carefully, as some of the baked-in paths there might be different on your distro or hw
e) Log out of Plasma and back in

System Settings will now take your self-built module over the system-level one.
Comment 14 Scott Harvey 2018-03-20 12:23:13 UTC
You're a champ. Thanks for helping a rookie.
Comment 15 Eike Hein 2018-03-20 12:27:27 UTC
We all were at some point :D
Comment 16 Scott Harvey 2018-03-20 12:30:20 UTC
Is my first test getting your website to serve that .txt file instead of redirecting to your logo page?  ;-)
Comment 17 Scott Harvey 2018-03-21 00:01:59 UTC
(In reply to Eike Hein from comment #8)
> > Changes do take effect after logging out and back in. A simple restart of plasmashell isn't sufficient.
> 
> That means KWin isn't watching launchrc for changes.

I can retract this portion, now that klaunchrc is being updated. KWin appears to catch it and make a change. Although "blink" doesn't seem to blink - it's static instead, at least on my system. I *can* change from "none" to "bounce" and KWin correctly makes the change.
Comment 18 Eike Hein 2018-03-21 02:38:11 UTC
Git commit 8af970fd49f3ca33450cf3ccd81856694a0dc752 by Eike Hein, on behalf of Scott Harvey.
Committed on 21/03/2018 at 02:37.
Pushed by hein into branch 'master'.

KCM Launch Feedback not saving cursor settings

Reviewers: #plasma, hein, davidedmundson, ngraham

Reviewed By: #plasma, hein

Subscribers: davidedmundson, plasma-devel

Tags: #plasma

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

M  +5    -4    kcms/launch/package/contents/ui/main.qml

https://commits.kde.org/plasma-desktop/8af970fd49f3ca33450cf3ccd81856694a0dc752
Comment 19 Kai Uwe Broulik 2018-03-28 07:08:15 UTC
*** Bug 392435 has been marked as a duplicate of this bug. ***