Bug 312397

Summary: Our EventFilter prevents Keyboard Daemon from working properly
Product: [Plasma] KScreen Reporter: Daniel Vrátil <dvratil>
Component: kdedAssignee: Alex Fiestas <afiestas>
Status: RESOLVED FIXED    
Severity: normal CC: aleksander.kamenik, auxsvr, dvratil, lukas.karas
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

Description Daniel Vrátil 2012-12-30 19:40:47 UTC
As reported by a user to me, when KScreen KDED module is enabled, changing keyboard layout does not work as expected (it is reported that at least "Switching policy" is ignored).

The Keyboard Daemon  uses Xkb extension to listen for events, and it's pretty much possible their code is broken, but we should still check.

Reproducible: Always
Comment 1 Aleksander Kamenik 2012-12-31 09:14:02 UTC
I can confirm this.

The layout switching policy mode 'window' does not work after installing kscreen. It acts like the policy 'global'.

KDE 4.9, Fedora 17 x64.
Comment 2 Lukáš Karas 2012-12-31 13:01:35 UTC
I compiled kded_keyboard.so from master branch of kde-workspace and layout switching works correctly again. Can you confirm it, Aleksander?
Comment 3 Daniel Vrátil 2013-01-01 15:35:00 UTC
Rebuilding kded_keyboard.so from master does not fix the issue. Lukas, are you sure you have the KScreen KDED module loaded?
Comment 4 Daniel Vrátil 2013-01-01 18:12:46 UTC
Review: https://git.reviewboard.kde.org/r/108065/
Comment 5 Daniel Vrátil 2013-01-02 12:11:05 UTC
Git commit 0b3ce1ef92fe8714cf69d683b4536bd36c31d595 by Dan Vrátil.
Committed on 02/01/2013 at 12:52.
Pushed by dvratil into branch 'master'.

Use KSystemEventFilter instead of QAbstractEventDispatcher

Using QAbstractEventDispatcher bypasses other filters installed
by KSystemEventFilter and breaks others who used KSystemEventFilter
to install their event handlers.
REVIEW: 108065

M  +2    -1    backends/xrandr/CMakeLists.txt
M  +8    -28   backends/xrandr/xrandr.cpp
M  +6    -3    backends/xrandr/xrandr.h
A  +55   -0    backends/xrandr/xrandrx11helper.cpp     [License: GPL (v2+)]
A  +43   -0    backends/xrandr/xrandrx11helper.h     [License: GPL (v2+)]

http://commits.kde.org/libkscreen/0b3ce1ef92fe8714cf69d683b4536bd36c31d595
Comment 6 Aleksander Kamenik 2013-01-02 12:41:13 UTC
Confirm as fixed, thanks!