<table><tr><td style="">kurmikon updated this revision to Diff 82966.<br />kurmikon added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D29365">View Revision</a></tr></table><br /><div><div><p>Diff updated to a better version. So, I'm explaining what happens here.</p>

<p>A RowLayout is placed where the old slider was. This contains a new slider and an additional spinbox.</p>

<p>The spinbox gets float values by the user as reported by libinput documentation: [-1, 1]. Displayed value is converted in the internal integer value [-100, 100] with a stepsize of 1.</p>

<p>The slider is basically the same as before, range [1, 11], only values multiple of 0,2 can be selected. An additional property AccelSpeedValue is set to convert the internal value to the format used by the spinbox.</p>

<p>What happens when one control is modified. If the spinbox is modified, its new internal value is passed to <em>onAccelSpeedChanged</em> method of the RowLayout. Il the slider is modified, it's AccelSpeedValue is passed to <em>onAccelSpeedChanged</em> method of the RowLayout.</p>

<p>What <em>onAccelSpeedChanged</em> does. It takes the arguments and compare it three times.</p>

<ol class="remarkup-list">
<li class="remarkup-list-item">with the slider accelSpeedValue; if it's different, the slider has been updated</li>
<li class="remarkup-list-item">with the spinbox internal value; if it's different, the spinbox has been updated</li>
<li class="remarkup-list-item">the argument divided by 100 with the libinput pointer acceleration; if it's different, the libinput property is updated and root.changeSignal() is invoked.</li>
</ol>

<p>Surely the method is called another time because of the update of the other control, but all checks will result false and nothing happens, avoiding loops, double writings and other issues.</p>

<p>Compiled and tested on my system, it's working. Please, test on yours. Can't do better than that with my poor knowledge.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R119 Plasma Desktop</div></div></div><br /><div><strong>CHANGES SINCE LAST UPDATE</strong><div><a href="https://phabricator.kde.org/D29365?vs=82323&id=82966">https://phabricator.kde.org/D29365?vs=82323&id=82966</a></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D29365">https://phabricator.kde.org/D29365</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>kcms/touchpad/kcm/libinput/touchpad.qml</div></div></div><br /><div><strong>To: </strong>kurmikon, VDG, Plasma<br /><strong>Cc: </strong>ndavis, ngraham, plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, jraleigh, zachus, fbampaloukas, ragreen, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart<br /></div>