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
davidedmundson |
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
Manually test with global shortcut.
No Linters Available |
No Unit Test Coverage |
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.
Yeah, I suspect so. I already put it in CCBUG, but I'd prefer reporter to confirm it.
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.
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.
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