Re: Review Request 126513: Refactor kcm touchpad to fix some issue related to hotplug touchpad

2016-01-11 Thread Xuetian Weng


> On Jan. 10, 2016, 6:43 p.m., David Edmundson wrote:
> > kcms/touchpad/src/backends/x11/propertyinfo.cpp, line 51
> > 
> >
> > Effectively we end up switching on the data type twice; both here and 
> > in value()
> > Given we store the format, I'd merge this into value() and drop the 
> > b,i,f member variables.
> > 
> > but this is the same as hte original code, so it's fine.

synapthcs uses b,i,f fields directly, keep it as it is looks easier for those 
code to access the value instead of always using QVariant.

Maybe clean up that part later.


- Xuetian


---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/126513/#review90841
---


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 

Re: Review Request 126513: Refactor kcm touchpad to fix some issue related to hotplug touchpad

2016-01-11 Thread Xuetian Weng

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/126513/
---

(Updated Jan. 11, 2016, 8:54 p.m.)


Status
--

This change has been marked as submitted.


Review request for Plasma and David Edmundson.


Changes
---

Submitted with commit a39677c1fd1e6303ddaf31da5ccd0a6454104066 by Weng Xuetian 
to branch master.


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

___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: Review Request 126513: Refactor kcm touchpad to fix some issue related to hotplug touchpad

2016-01-10 Thread David Edmundson

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/126513/#review90841
---

Ship it!


Hard to review a big shuffle, but it looks fine to me.


kcms/touchpad/src/backends/x11/propertyinfo.cpp (line 51)


Effectively we end up switching on the data type twice; both here and in 
value()
Given we store the format, I'd merge this into value() and drop the b,i,f 
member variables.

but this is the same as hte original code, so it's fine.


- David Edmundson


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.
> 
> 

Re: Review Request 126513: Refactor kcm touchpad to fix some issue related to hotplug touchpad

2015-12-31 Thread Rajeesh K V


> 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
> 
>

___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: Review Request 126513: Refactor kcm touchpad to fix some issue related to hotplug touchpad

2015-12-30 Thread Xuetian Weng

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/126513/#review90350
---


ping :)

- Xuetian Weng


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
> 
>

___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: Review Request 126513: Refactor kcm touchpad to fix some issue related to hotplug touchpad

2015-12-25 Thread Xuetian Weng

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/126513/
---

(Updated Dec. 25, 2015, 9:25 a.m.)


Review request for Plasma and David Edmundson.


Changes
---

Some fixes on changes.
Add missing flush() in applyConfig.
Expose workingTouchpadFound to applet, don't disable applet if no touchpad 
found during initialization.


Bugs: 356923
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 (updated)
-

  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.


Thanks,

Xuetian Weng

___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: Review Request 126513: Refactor kcm touchpad to fix some issue related to hotplug touchpad

2015-12-25 Thread Xuetian Weng

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/126513/
---

(Updated Dec. 25, 2015, 9:27 a.m.)


Review request for Plasma and David Edmundson.


Changes
---

update testing


Bugs: 356923
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 (updated)
---

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

___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: Review Request 126513: Refactor kcm touchpad to fix some issue related to hotplug touchpad

2015-12-25 Thread Rajeesh K V

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/126513/#review90089
---


This might also fix bug#349545

- Rajeesh K V


On Dec. 25, 2015, 9:27 a.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, 9:27 a.m.)
> 
> 
> Review request for Plasma and David Edmundson.
> 
> 
> Bugs: 356923
> 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
> 
>

___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: Review Request 126513: Refactor kcm touchpad to fix some issue related to hotplug touchpad

2015-12-25 Thread Xuetian Weng

---
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.


Changes
---

Make sure we restore touchpad to the state that userRequested before plugin 
mouse.
Also Fix 349545.


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 (updated)
-

  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

___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Review Request 126513: Refactor kcm touchpad to fix some issue related to hotplug touchpad

2015-12-24 Thread Xuetian Weng

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/126513/
---

Review request for Plasma and David Edmundson.


Bugs: 356923
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/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.


Thanks,

Xuetian Weng

___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel