D3829: [touchpad] Use a separate X11 Display to monitor the XInput event.

2018-06-05 Thread David Edmundson
davidedmundson requested changes to this revision.
davidedmundson added a comment.
This revision now requires changes to proceed.


  We don't need this now we have Albert's patch, right?

REPOSITORY
  R119 Plasma Desktop

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

To: xuetianweng, davidedmundson
Cc: aacid, z3ntu, ngraham, knambiar, graesslin, plasma-devel, ragreen, Pitel, 
ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


D3829: [touchpad] Use a separate X11 Display to monitor the XInput event.

2018-02-13 Thread Martin Flöser
graesslin added a comment.


  In D3829#158947 , @ngraham wrote:
  
  > @graesslin, does this still need changes to be merge-worthy?
  
  
  Yes, we did not migrate back to xlib, so the port to xcb is still required.

REPOSITORY
  R119 Plasma Desktop

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

To: xuetianweng, davidedmundson
Cc: aacid, z3ntu, ngraham, knambiar, graesslin, plasma-devel, ZrenBot, 
progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


D3829: [touchpad] Use a separate X11 Display to monitor the XInput event.

2018-02-13 Thread Albert Astals Cid
aacid added a comment.


  My proposal to fix the bug at https://phabricator.kde.org/D10498

REPOSITORY
  R119 Plasma Desktop

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

To: xuetianweng, davidedmundson
Cc: aacid, z3ntu, ngraham, knambiar, graesslin, plasma-devel, ZrenBot, 
progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


D3829: [touchpad] Use a separate X11 Display to monitor the XInput event.

2017-10-23 Thread Nathaniel Graham
ngraham added a comment.


  @graesslin, does this still need changes to be merge-worthy?

REPOSITORY
  R119 Plasma Desktop

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

To: xuetianweng, davidedmundson
Cc: z3ntu, ngraham, knambiar, graesslin, plasma-devel, ZrenBot, progwolff, 
lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


D3829: [touchpad] Use a separate X11 Display to monitor the XInput event.

2017-10-23 Thread Luca Weiss
z3ntu added a comment.


  This patch works for me :)

REPOSITORY
  R119 Plasma Desktop

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

To: xuetianweng, davidedmundson
Cc: z3ntu, ngraham, knambiar, graesslin, plasma-devel, ZrenBot, progwolff, 
lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


D3829: [touchpad] Use a separate X11 Display to monitor the XInput event.

2017-10-22 Thread Nathaniel Graham
ngraham added a comment.


  What's next for this?

REPOSITORY
  R119 Plasma Desktop

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

To: xuetianweng, davidedmundson
Cc: ngraham, knambiar, graesslin, plasma-devel, ZrenBot, progwolff, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


[Differential] [Commented On] D3829: [touchpad] Use a separate X11 Display to monitor the XInput event.

2017-01-02 Thread Martin Gräßlin
graesslin added a comment.


  In https://phabricator.kde.org/D3829#73066, @xuetianweng wrote:
  
  > In https://phabricator.kde.org/D3829#72924, @graesslin wrote:
  >
  > > I would say the overall problem is that this here still uses an XLib 
event queue. But Qt uses an xcb connection. I would say this needs a porting 
away from the XLib code and use Qt's XCB connection and event handling.
  >
  >
  > At that time the xinput in xcb is incomplete and buggy so XLib is the only 
choice. Not sure if things change now.
  
  
  no, it never was buggy. There are just no bindings. But all we care about are 
the events. And events are just a struct. If one wants to use them one can.  An 
example how one can use XInput from an xcb based application without needing 
the bindings is 
https://cgit.kde.org/kwin.git/tree/plugins/platforms/x11/standalone/xinputintegration.cpp

REPOSITORY
  R119 Plasma Desktop

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

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: xuetianweng, davidedmundson
Cc: knambiar, graesslin, plasma-devel, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, sebas


[Differential] [Commented On] D3829: [touchpad] Use a separate X11 Display to monitor the XInput event.

2017-01-01 Thread xuetianweng (Xuetian Weng)
xuetianweng added a comment.


  In https://phabricator.kde.org/D3829#72924, @graesslin wrote:
  
  > I would say the overall problem is that this here still uses an XLib event 
queue. But Qt uses an xcb connection. I would say this needs a porting away 
from the XLib code and use Qt's XCB connection and event handling.
  
  
  At that time the xinput in xcb is incomplete and buggy so XLib is the only 
choice. Not sure if things change now.

REPOSITORY
  R119 Plasma Desktop

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

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: xuetianweng, davidedmundson
Cc: knambiar, graesslin, plasma-devel, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, sebas


[Differential] [Commented On] D3829: [touchpad] Use a separate X11 Display to monitor the XInput event.

2017-01-01 Thread Martin Gräßlin
graesslin added a comment.


  I would say the overall problem is that this here still uses an XLib event 
queue. But Qt uses an xcb connection. I would say this needs a porting away 
from the XLib code and use Qt's XCB connection and event handling.

REPOSITORY
  R119 Plasma Desktop

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

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: xuetianweng, davidedmundson
Cc: knambiar, graesslin, plasma-devel, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, sebas


[Differential] [Commented On] D3829: [touchpad] Use a separate X11 Display to monitor the XInput event.

2016-12-31 Thread xuetianweng (Xuetian Weng)
xuetianweng added a comment.


  In https://phabricator.kde.org/D3829#71988, @graesslin wrote:
  
  > In https://phabricator.kde.org/D3829#71877, @xuetianweng wrote:
  >
  > > In https://phabricator.kde.org/D3829#71714, @graesslin wrote:
  > >
  > > > Could you explain the relationship to global shortcuts? That sounds to 
me like a bug which needs to be fixed in kglobalaccel
  > >
  > >
  > > I don't really sure about this. So basically XlibNotifications uses 
XISelectEvent to monitor certain event. And strangely, the event is not 
received only if it is triggered by global hotkey.
  >
  >
  > Which "event"?
  
  
  search XIPropertyEvent in xlibnotifications.cpp
  
  For whatever reason, that part of code is not reached if it is triggered by 
global hotkey with current code, the display pointer is not shared with 
anyone.. I really don't understand why adding a new one helps, but it does help.

REPOSITORY
  R119 Plasma Desktop

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

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: xuetianweng, davidedmundson
Cc: knambiar, graesslin, plasma-devel, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, sebas


[Differential] [Commented On] D3829: [touchpad] Use a separate X11 Display to monitor the XInput event.

2016-12-28 Thread Martin Gräßlin
graesslin added a comment.


  In https://phabricator.kde.org/D3829#71877, @xuetianweng wrote:
  
  > In https://phabricator.kde.org/D3829#71714, @graesslin wrote:
  >
  > > Could you explain the relationship to global shortcuts? That sounds to me 
like a bug which needs to be fixed in kglobalaccel
  >
  >
  > I don't really sure about this. So basically XlibNotifications uses 
XISelectEvent to monitor certain event. And strangely, the event is not 
received only if it is triggered by global hotkey.
  
  
  Which "event"?
  
  > The Display* used in touchpad kded is already a separated one instead of 
Qt's, so I don't know if there's any interference between them. If someone 
could highlight me about what is the real cause of this I'd appreciated it.
  
  This sounds weird and wrong to me. In none of the applications we use, even 
in the heavily X relying one like KWin or kglobalaccel, we create another 
Display, but use the one Qt provides. From my experience there is no need to 
have a dedicate Display. It can certainly be a source for issues.

REPOSITORY
  R119 Plasma Desktop

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

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: xuetianweng, davidedmundson
Cc: knambiar, graesslin, plasma-devel, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, sebas


[Differential] [Commented On] D3829: [touchpad] Use a separate X11 Display to monitor the XInput event.

2016-12-28 Thread xuetianweng (Xuetian Weng)
xuetianweng added a comment.


  In https://phabricator.kde.org/D3829#71724, @knambiar wrote:
  
  > Might this change fix this issue? 
https://bugs.kde.org/show_bug.cgi?id=370588
  
  
  Yeah, I suspect so. I already put it in CCBUG, but I'd prefer reporter to 
confirm it.

REPOSITORY
  R119 Plasma Desktop

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

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: xuetianweng, davidedmundson
Cc: knambiar, graesslin, plasma-devel, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, sebas


[Differential] [Commented On] D3829: [touchpad] Use a separate X11 Display to monitor the XInput event.

2016-12-28 Thread xuetianweng (Xuetian Weng)
xuetianweng added a comment.


  In https://phabricator.kde.org/D3829#71714, @graesslin wrote:
  
  > Could you explain the relationship to global shortcuts? That sounds to me 
like a bug which needs to be fixed in kglobalaccel
  
  
  I don't really sure about this. So basically XlibNotifications uses 
XISelectEvent to monitor certain event. And strangely, the event is not 
received only if it is triggered by global hotkey. The Display* used in 
touchpad kded is already a separated one instead of Qt's, so I don't know if 
there's any interference between them. If someone could highlight me about what 
is the real cause of this I'd appreciated it.
  
  My guess is that it could be caused by mix Xinput call on the same display 
and there's some interference.

REPOSITORY
  R119 Plasma Desktop

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

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: xuetianweng, davidedmundson
Cc: knambiar, graesslin, plasma-devel, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, sebas


[Differential] [Commented On] D3829: [touchpad] Use a separate X11 Display to monitor the XInput event.

2016-12-28 Thread knambiar (Rajeesh K Nambiar)
knambiar added a comment.


  Might this change fix this issue? https://bugs.kde.org/show_bug.cgi?id=370588

REPOSITORY
  R119 Plasma Desktop

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

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: xuetianweng, davidedmundson
Cc: knambiar, graesslin, plasma-devel, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, sebas


[Differential] [Commented On] D3829: [touchpad] Use a separate X11 Display to monitor the XInput event.

2016-12-27 Thread Martin Gräßlin
graesslin added a comment.


  Could you explain the relationship to global shortcuts? That sounds to me 
like a bug which needs to be fixed in kglobalaccel

REPOSITORY
  R119 Plasma Desktop

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

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: xuetianweng, davidedmundson
Cc: graesslin, plasma-devel, lesliezhai, ali-mohamed, jensreuterberg, abetts, 
sebas


[Differential] [Request, 31 lines] D3829: [touchpad] Use a separate X11 Display to monitor the XInput event.

2016-12-27 Thread xuetianweng (Xuetian Weng)
xuetianweng created this revision.
xuetianweng added a reviewer: davidedmundson.
Restricted Application added a project: Plasma.
Restricted Application added a subscriber: plasma-devel.

REVISION SUMMARY
  For some reason, the XI event is not received if the change is from
  global shortcut. This makes global shortcut always disable the touchpad
  because kded5 never aware it is disabled. This simple workaround may fix
  it.
  
  CCBUG:370588

TEST PLAN
  Manually test with global shortcut.

REPOSITORY
  R119 Plasma Desktop

BRANCH
  master

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

AFFECTED FILES
  kcms/touchpad/src/backends/x11/xlibbackend.cpp
  kcms/touchpad/src/backends/x11/xlibnotifications.cpp
  kcms/touchpad/src/backends/x11/xlibnotifications.h

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: xuetianweng, davidedmundson
Cc: plasma-devel, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas