Review Request 126287: [text-ui] Use KWindowSystem to detect active window change for keyboard layout switching

Martin Gräßlin mgraesslin at kde.org
Fri Dec 11 08:11:23 UTC 2015


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


The problem is not the OSD, the problem is the global shortcut.

Take for example:

sleep 5 && qdbus org.kde.plasmashell /org/kde/osdService brightnessChanged 100

It doesn't expose the problem. But when pressing a global shortcut a keyboard grab is performed and for comparison please see: http://commits.kde.org/kwin/fab806df9297d901625edf03eccd8f4a77875ac9

Now I even more think that we need to properly fix this and not try to workaround in the applications (as it affects all

- Martin Gräßlin


On Dec. 9, 2015, 6:03 a.m., Martin Klapetek wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/126287/
> -----------------------------------------------------------
> 
> (Updated Dec. 9, 2015, 6:03 a.m.)
> 
> 
> Review request for Telepathy and Martin Gräßlin.
> 
> 
> Bugs: 356220
>     http://bugs.kde.org/show_bug.cgi?id=356220
> 
> 
> Repository: ktp-text-ui
> 
> 
> Description
> -------
> 
> So it turns out that with text-ui's "remember layout per tab" feature
> and Plasma's OSD, there's a problem when activating the global keyboard
> layout change shortcut. It triggers the OSD and in turn that causes
> QEvent::WindowDeactivate and QEvent::WindowActivate events in the app,
> leading to text-ui immediately setting the old keyboard layout, making
> it look like it's actualy blocking the changes.
> 
> While checking KWindowSystem::activeWindowChanged I noticed that the
> active window actually does not change. So I've moved setting the kbd
> layout to KWindowSystem::activeWindowChanged slot rather than in the
> event() handler. Seems to work perfectly.
> 
> I think this is the same bug that is causing the hidden panel to raise
> on OSD/notifications and the one that is showing the "plasma" task in
> task manager for split second, these two:
> 
> https://bugs.kde.org/show_bug.cgi?id=352278
> https://bugs.kde.org/show_bug.cgi?id=332024
> 
> 
> Diffs
> -----
> 
>   app/chat-window.h 0d1e0bb 
>   app/chat-window.cpp fdde18d 
> 
> Diff: https://git.reviewboard.kde.org/r/126287/diff/
> 
> 
> Testing
> -------
> 
> With "remember keyboard layout per tab" I can now successfully change
> keyboard layout from text-ui and the keyboard layout is properly restored
> when switching to the window.
> 
> 
> Thanks,
> 
> Martin Klapetek
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-telepathy/attachments/20151211/b53a5f8e/attachment.html>


More information about the KDE-Telepathy mailing list