[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-panel-devel
Subject: Re: Review Request 126513: Refactor kcm touchpad to fix some issue related to hotplug touchpad
From: "Rajeesh K V" <rajeeshknambiar () gmail ! com>
Date: 2015-12-31 18:10:02
Message-ID: 20151231181002.30660.20041 () mimi ! kde ! org
[Download RAW message or body]
--===============1302685258398471662==
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
> On Dec. 30, 2015, 4:34 p.m., Xuetian Weng wrote:
> > ping :)
I've been running this code with no issues, but no way to test the hotplug.
Wait for d_ed to confirm Ship it?
- Rajeesh
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/126513/#review90350
-----------------------------------------------------------
On Dec. 25, 2015, 7:02 p.m., Xuetian Weng wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/126513/
> -----------------------------------------------------------
>
> (Updated Dec. 25, 2015, 7:02 p.m.)
>
>
> Review request for Plasma and David Edmundson.
>
>
> Bugs: 349545 and 356923
> https://bugs.kde.org/show_bug.cgi?id=349545
> https://bugs.kde.org/show_bug.cgi?id=356923
>
>
> Repository: plasma-desktop
>
>
> Description
> -------
>
> Currently, there are some mixed issue in kcm touchpad related to libinput \
> backend and hot plug. There are several issues:
> 1. only one backend maybe used at runtime, either synaptics or libinput. \
> But libinput backend will only be used if there is a libinput backend \
> present. Which means if libinput touchpad is not present at login, kded \
> will not be able to properly support them. 2. hotplug touchpad will \
> always set touchpad to disabled. 3. hotplug touchpad will not get \
> configuration applied. 4. The libinput devices detection may pick some \
> non-touchpad device.
> To solve these problems, following changes are made:
> 1. Remove SynapticsBackend and LibinputBackend and add three new classes \
> called XlibTouchpad/SynapticsTouchpad/LibinputTouchpad. So findTouchpad \
> may pick up both synaptics or libinput device, and no need to depend on a \
> fixed backend. This change also make it easier to support multiple \
> touchpad device easier if needed.
> 2. hotplug touchpad config not being applied (bug 356923) is mainly \
> because one can't apply settings to a disabled device. Change the \
> statement order in handleReset, apply settings first then set enable \
> status.
> 3. findTouchpad() is changed to use XListInputDevices, because it \
> provides necessary information of device type in order to filter out \
> non-touchpad device. xf86-input-libinput doesn't have a unique atom for \
> touchpad, so current identityAtom cannot guarantee that findTouchpad \
> always returns a touchpad device for libinput.
> 4. On my surface pro 4 system, if touchpad is unpluged, the device will \
> be set to disabled automatically first, then touchpadDetached is called, \
> which makes m_enabled in TouchpadDisabled always to be false after unplug \
> the touchapd. This patch makes TouchpadDisabler have two different \
> enabled property. m_userRequestedState only stores the user requested \
> status, so when handleReset is called, it can properly set enabled state \
> to the last user requested state.
>
> Diffs
> -----
>
> kcms/touchpad/src/applet/qml/contents/ui/touchpad.qml 8dec7c2
> kcms/touchpad/src/applet/touchpadengine.h 16b98c2
> kcms/touchpad/src/applet/touchpadengine.cpp eae429e
> kcms/touchpad/src/backends/x11.cmake c9fcea8
> kcms/touchpad/src/backends/x11/libinputproperties.c 9dbf9ea
> kcms/touchpad/src/backends/x11/libinputtouchpad.h PRE-CREATION
> kcms/touchpad/src/backends/x11/libinputtouchpad.cpp PRE-CREATION
> kcms/touchpad/src/backends/x11/propertyinfo.h PRE-CREATION
> kcms/touchpad/src/backends/x11/propertyinfo.cpp PRE-CREATION
> kcms/touchpad/src/backends/x11/synapticstouchpad.h PRE-CREATION
> kcms/touchpad/src/backends/x11/synapticstouchpad.cpp PRE-CREATION
> kcms/touchpad/src/backends/x11/synclientproperties.h 43d18d2
> kcms/touchpad/src/backends/x11/synclientproperties.c 5fd1ed6
> kcms/touchpad/src/backends/x11/xlibbackend.h 7cecb4a
> kcms/touchpad/src/backends/x11/xlibbackend.cpp b55a45f
> kcms/touchpad/src/backends/x11/xlibtouchpad.h PRE-CREATION
> kcms/touchpad/src/backends/x11/xlibtouchpad.cpp PRE-CREATION
> kcms/touchpad/src/kded/kded.h 9b8fe6e
> kcms/touchpad/src/kded/kded.cpp 409126b
> kcms/touchpad/src/touchpadbackend.h b225ed9
>
> Diff: https://git.reviewboard.kde.org/r/126513/diff/
>
>
> Testing
> -------
>
> Without touchpad -> login -> plug touchpad -> settings applied to device \
> using libinput driver. unplug -> replug -> settings applied to device \
> using libinput driver.
>
> Disable touchpad -> applet shows up -> unplug touchpad -> applet hides -> \
> replug touchpad -> touchpad is still disabled, and applet shows up -> \
> enable touhcpad -> applet hides.
>
> Thanks,
>
> Xuetian Weng
>
>
--===============1302685258398471662==
MIME-Version: 1.0
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: 7bit
<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: \
1px #c9c399 solid; border-radius: 6px; -moz-border-radius: 6px; \
-webkit-border-radius: 6px;"> <tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://git.reviewboard.kde.org/r/126513/">https://git.reviewboard.kde.org/r/126513/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; \
padding-left: 10px;"> <p style="margin-top: 0;">On December 30th, 2015, \
4:34 p.m. UTC, <b>Xuetian Weng</b> wrote:</p> <blockquote \
style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><p style="padding: 0;text-rendering: inherit;margin: \
0;line-height: inherit;white-space: inherit;">ping :)</p></pre> \
</blockquote>
</blockquote>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">I've been running this code with no issues, \
but no way to test the hotplug. Wait for d_ed to confirm Ship it?</p></pre>
<br />
<p>- Rajeesh</p>
<br />
<p>On December 25th, 2015, 7:02 p.m. UTC, Xuetian Weng wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" \
style="border: 1px #888a85 solid; border-radius: 6px; -moz-border-radius: \
6px; -webkit-border-radius: 6px;"> <tr>
<td>
<div>Review request for Plasma and David Edmundson.</div>
<div>By Xuetian Weng.</div>
<p style="color: grey;"><i>Updated Dec. 25, 2015, 7:02 p.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>
<a href="https://bugs.kde.org/show_bug.cgi?id=349545">349545</a>,
<a href="https://bugs.kde.org/show_bug.cgi?id=356923">356923</a>
</div>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
plasma-desktop
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description \
</h1> <table width="100%" bgcolor="#ffffff" cellspacing="0" \
cellpadding="10" style="border: 1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><p style="padding: 0;text-rendering: inherit;margin: \
0;line-height: inherit;white-space: inherit;">Currently, there are some \
mixed issue in kcm touchpad related to libinput backend and hot plug. There \
are several issues: 1. only one backend maybe used at runtime, either \
synaptics or libinput. But libinput backend will only be used if there is a \
libinput backend present. Which means if libinput touchpad is not present \
at login, kded will not be able to properly support them. 2. hotplug \
touchpad will always set touchpad to disabled. 3. hotplug touchpad will not \
get configuration applied. 4. The libinput devices detection may pick some \
non-touchpad device. </p> <p style="padding: 0;text-rendering: \
inherit;margin: 0;line-height: inherit;white-space: inherit;">To solve \
these problems, following changes are made: 1. Remove SynapticsBackend and \
LibinputBackend and add three new classes called \
XlibTouchpad/SynapticsTouchpad/LibinputTouchpad. So findTouchpad may pick \
up both synaptics or libinput device, and no need to depend on a fixed \
backend. This change also make it easier to support multiple touchpad \
device easier if needed.</p> <ol style="padding: 0;text-rendering: \
inherit;margin: 0 0 0 2em;line-height: inherit;white-space: normal;"> <li \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: normal;"> <p style="padding: 0;text-rendering: \
inherit;margin: 0;line-height: inherit;white-space: inherit;">hotplug \
touchpad config not being applied (bug 356923) is mainly because one can't \
apply settings to a disabled device. Change the statement order in \
handleReset, apply settings first then set enable status.</p> </li>
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: normal;"> <p style="padding: 0;text-rendering: \
inherit;margin: 0;line-height: inherit;white-space: \
inherit;">findTouchpad() is changed to use XListInputDevices, because it \
provides necessary information of device type in order to filter out \
non-touchpad device. xf86-input-libinput doesn't have a unique atom for \
touchpad, so current identityAtom cannot guarantee that findTouchpad always \
returns a touchpad device for libinput.</p> </li>
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: normal;"> <p style="padding: 0;text-rendering: \
inherit;margin: 0;line-height: inherit;white-space: inherit;">On my surface \
pro 4 system, if touchpad is unpluged, the device will be set to disabled \
automatically first, then touchpadDetached is called, which makes m_enabled \
in TouchpadDisabled always to be false after unplug the touchapd. This \
patch makes TouchpadDisabler have two different enabled property. \
m_userRequestedState only stores the user requested status, so when \
handleReset is called, it can properly set enabled state to the last user \
requested state.</p> </li>
</ol></pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing \
</h1> <table width="100%" bgcolor="#ffffff" cellspacing="0" \
cellpadding="10" style="border: 1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><p style="padding: 0;text-rendering: inherit;margin: \
0;line-height: inherit;white-space: inherit;">Without touchpad -> login \
-> plug touchpad -> settings applied to device using libinput driver. \
unplug -> replug -> settings applied to device using libinput \
driver.</p> <p style="padding: 0;text-rendering: inherit;margin: \
0;line-height: inherit;white-space: inherit;">Disable touchpad -> applet \
shows up -> unplug touchpad -> applet hides -> replug touchpad \
-> touchpad is still disabled, and applet shows up -> enable touhcpad \
-> applet hides.</p></pre> </td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> \
</h1> <ul style="margin-left: 3em; padding-left: 0;">
<li>kcms/touchpad/src/applet/qml/contents/ui/touchpad.qml <span \
style="color: grey">(8dec7c2)</span></li>
<li>kcms/touchpad/src/applet/touchpadengine.h <span style="color: \
grey">(16b98c2)</span></li>
<li>kcms/touchpad/src/applet/touchpadengine.cpp <span style="color: \
grey">(eae429e)</span></li>
<li>kcms/touchpad/src/backends/x11.cmake <span style="color: \
grey">(c9fcea8)</span></li>
<li>kcms/touchpad/src/backends/x11/libinputproperties.c <span \
style="color: grey">(9dbf9ea)</span></li>
<li>kcms/touchpad/src/backends/x11/libinputtouchpad.h <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>kcms/touchpad/src/backends/x11/libinputtouchpad.cpp <span \
style="color: grey">(PRE-CREATION)</span></li>
<li>kcms/touchpad/src/backends/x11/propertyinfo.h <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>kcms/touchpad/src/backends/x11/propertyinfo.cpp <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>kcms/touchpad/src/backends/x11/synapticstouchpad.h <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>kcms/touchpad/src/backends/x11/synapticstouchpad.cpp <span \
style="color: grey">(PRE-CREATION)</span></li>
<li>kcms/touchpad/src/backends/x11/synclientproperties.h <span \
style="color: grey">(43d18d2)</span></li>
<li>kcms/touchpad/src/backends/x11/synclientproperties.c <span \
style="color: grey">(5fd1ed6)</span></li>
<li>kcms/touchpad/src/backends/x11/xlibbackend.h <span style="color: \
grey">(7cecb4a)</span></li>
<li>kcms/touchpad/src/backends/x11/xlibbackend.cpp <span style="color: \
grey">(b55a45f)</span></li>
<li>kcms/touchpad/src/backends/x11/xlibtouchpad.h <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>kcms/touchpad/src/backends/x11/xlibtouchpad.cpp <span style="color: \
grey">(PRE-CREATION)</span></li>
<li>kcms/touchpad/src/kded/kded.h <span style="color: \
grey">(9b8fe6e)</span></li>
<li>kcms/touchpad/src/kded/kded.cpp <span style="color: \
grey">(409126b)</span></li>
<li>kcms/touchpad/src/touchpadbackend.h <span style="color: \
grey">(b225ed9)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/126513/diff/" \
style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>
--===============1302685258398471662==--
[Attachment #3 (text/plain)]
_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic