D21915: Fix crash in the touchpad kded

2019-06-22 Thread Albert Astals Cid
aacid abandoned this revision.
aacid added a comment.


  ok, abandoning for https://phabricator.kde.org/D21980 then

REPOSITORY
  R119 Plasma Desktop

REVISION DETAIL
  https://phabricator.kde.org/D21915

To: aacid
Cc: atulbi, knambiar, plasma-devel, LeGast00n, jraleigh, fbampaloukas, GB_2, 
ragreen, Pitel, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, sebas, apol, mart


D21915: Fix crash in the touchpad kded

2019-06-21 Thread Atul Bisht
atulbi added a comment.


  In D21915#482877 , @aacid wrote:
  
  > In D21915#482182 , @knambiar 
wrote:
  >
  > > In D21915#482145 , @aacid 
wrote:
  > >
  > > > The other question is if "enabled" was ever the correct atom to check 
for
  > > >
  > > > libinput Tapping Enabled
  > >
  > >
  > > I'm fairly sure we were checking for `libinput Tapping Enabled` atom in 
the past, and so does GNOME: 
https://gitlab.gnome.org/GNOME/gtk/blob/master/gdk/x11/gdkdevicemanager-xi2.c#L410
  >
  >
  > I can't find any use of that, the current use of "enabled" was added by 
@atulbi
  
  
  Whoops... It should be "libinput Send Events Mode Enabled" or 
LIBINPUT_PROP_SENDEVENTS_ENABLED rather than enabled. my bad  ;) , Just 
replacing "enabled" fixes the issue :D

REPOSITORY
  R119 Plasma Desktop

REVISION DETAIL
  https://phabricator.kde.org/D21915

To: aacid
Cc: atulbi, knambiar, plasma-devel, LeGast00n, jraleigh, fbampaloukas, GB_2, 
ragreen, Pitel, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, sebas, apol, mart


D21915: Fix crash in the touchpad kded

2019-06-20 Thread Albert Astals Cid
aacid added a subscriber: atulbi.
aacid added a comment.


  In D21915#482182 , @knambiar wrote:
  
  > In D21915#482145 , @aacid wrote:
  >
  > > The other question is if "enabled" was ever the correct atom to check for
  > >
  > > libinput Tapping Enabled
  >
  >
  > I'm fairly sure we were checking for `libinput Tapping Enabled` atom in the 
past, and so does GNOME: 
https://gitlab.gnome.org/GNOME/gtk/blob/master/gdk/x11/gdkdevicemanager-xi2.c#L410
  
  
  I can't find any use of that, the current use of "enabled" was added by 
@atulbi

REPOSITORY
  R119 Plasma Desktop

REVISION DETAIL
  https://phabricator.kde.org/D21915

To: aacid
Cc: atulbi, knambiar, plasma-devel, LeGast00n, jraleigh, fbampaloukas, GB_2, 
ragreen, Pitel, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, sebas, apol, mart


D21915: Fix crash in the touchpad kded

2019-06-20 Thread Rajeesh K Nambiar
knambiar added a comment.


  In D21915#482145 , @aacid wrote:
  
  > The other question is if "enabled" was ever the correct atom to check for
  >
  > libinput Tapping Enabled
  
  
  I'm fairly sure we were checking for `libinput Tapping Enabled` atom in the 
past, and so does GNOME: 
https://gitlab.gnome.org/GNOME/gtk/blob/master/gdk/x11/gdkdevicemanager-xi2.c#L410

REPOSITORY
  R119 Plasma Desktop

REVISION DETAIL
  https://phabricator.kde.org/D21915

To: aacid
Cc: knambiar, plasma-devel, LeGast00n, jraleigh, fbampaloukas, GB_2, ragreen, 
Pitel, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, 
sebas, apol, mart


D21915: Fix crash in the touchpad kded

2019-06-19 Thread Albert Astals Cid
aacid added a comment.


  The other question is if "enabled" was ever the correct atom to check for
  
  In my system the atoms names are
  libinput Send Events Mode Enabled
  libinput Send Events Mode Enabled Default
  libinput Send Events Modes Available
  libinput Left Handed Enabled Default
  libinput Left Handed Enabled
  libinput Disable While Typing Enabled Default
  libinput Disable While Typing Enabled
  libinput Middle Emulation Enabled Default
  libinput Middle Emulation Enabled
  libinput Tapping Enabled
  libinput Tapping Enabled Default
  libinput Tapping Button Mapping Default
  libinput Tapping Button Mapping Enabled
  libinput Tapping Drag Enabled Default
  libinput Tapping Drag Enabled
  libinput Tapping Drag Lock Enabled Default
  libinput Tapping Drag Lock Enabled
  libinput Accel Speed Default
  libinput Accel Speed
  libinput Accel Profiles Available
  libinput Accel Profile Enabled Default
  libinput Accel Profile Enabled
  libinput Natural Scrolling Enabled Default
  libinput Natural Scrolling Enabled
  libinput Horizontal Scroll Enabled
  libinput Scroll Methods Available
  libinput Scroll Method Enabled Default
  libinput Scroll Method Enabled
  libinput Button Scrolling Button Default
  libinput Button Scrolling Button
  libinput Click Methods Available
  libinput Click Method Enabled Default
  libinput Click Method Enabled

REPOSITORY
  R119 Plasma Desktop

REVISION DETAIL
  https://phabricator.kde.org/D21915

To: aacid
Cc: plasma-devel, LeGast00n, jraleigh, fbampaloukas, GB_2, ragreen, Pitel, 
ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, 
apol, mart


D21915: Fix crash in the touchpad kded

2019-06-19 Thread Albert Astals Cid
aacid updated this revision to Diff 60091.
aacid added a comment.


  -mutable

REPOSITORY
  R119 Plasma Desktop

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D21915?vs=60090=60091

BRANCH
  Plasma/5.16

REVISION DETAIL
  https://phabricator.kde.org/D21915

AFFECTED FILES
  kcms/touchpad/src/backends/x11/libinputtouchpad.cpp
  kcms/touchpad/src/backends/x11/libinputtouchpad.h
  kcms/touchpad/src/backends/x11/synapticstouchpad.cpp
  kcms/touchpad/src/backends/x11/synapticstouchpad.h
  kcms/touchpad/src/backends/x11/xlibbackend.cpp
  kcms/touchpad/src/backends/x11/xlibtouchpad.h

To: aacid
Cc: plasma-devel, LeGast00n, jraleigh, fbampaloukas, GB_2, ragreen, Pitel, 
ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, 
apol, mart


D21915: Fix crash in the touchpad kded

2019-06-19 Thread Albert Astals Cid
aacid created this revision.
Herald added a project: Plasma.
Herald added a subscriber: plasma-devel.
aacid requested review of this revision.

REVISION SUMMARY
  My libinput touchpad doesn't have an enabled atom so doing
  
  *m_atoms[QLatin1Literal("enabled")].data()
  
  and then using that atom ends up with a crash
  
  So instead of asking the atom out, just pass the atom to compare in

TEST PLAN
  Unfortunately i can't really really reproduce the crash, it just happens 
every other day, so i can only say "this code is safer and should crash less"

REPOSITORY
  R119 Plasma Desktop

BRANCH
  Plasma/5.16

REVISION DETAIL
  https://phabricator.kde.org/D21915

AFFECTED FILES
  kcms/touchpad/src/backends/x11/libinputtouchpad.cpp
  kcms/touchpad/src/backends/x11/libinputtouchpad.h
  kcms/touchpad/src/backends/x11/synapticstouchpad.cpp
  kcms/touchpad/src/backends/x11/synapticstouchpad.h
  kcms/touchpad/src/backends/x11/xcbatom.h
  kcms/touchpad/src/backends/x11/xlibbackend.cpp
  kcms/touchpad/src/backends/x11/xlibtouchpad.h

To: aacid
Cc: plasma-devel, LeGast00n, jraleigh, fbampaloukas, GB_2, ragreen, Pitel, 
ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, 
apol, mart