[wayland] Don't pass keyboard events to Unmanaged windows
The way it was implemented it allowed an X11 unmanaged window to become a key logger. Basically as soon as there was an unmanaged window it got all key events. This problem was discovered through the xembed-sni-proxy which broke key input to all Wayland windows in a Plasma/Wayland session. With this change Unmanaged windows don't get any key events at all. This might break some applications as e.g. context menus are using override redirect windows. A test with Qt applications shows that the menus are still functional and the events are delivered correctly internally. If applications show problems with this change, we might need to weaken the restriction.
This commit is contained in:
parent
ac1dbac8b1
commit
4ebba6e134
1 changed files with 1 additions and 9 deletions
10
input.cpp
10
input.cpp
|
@ -868,15 +868,7 @@ void InputRedirection::updateKeyboardWindow()
|
|||
}
|
||||
if (auto seat = findSeat()) {
|
||||
// TODO: this needs better integration
|
||||
// check unmanaged
|
||||
Toplevel *t = nullptr;
|
||||
if (!workspace()->unmanagedList().isEmpty()) {
|
||||
// TODO: better check whether this unmanaged should get the key event
|
||||
t = workspace()->unmanagedList().first();
|
||||
}
|
||||
if (!t) {
|
||||
t = workspace()->activeClient();
|
||||
}
|
||||
Toplevel *t = workspace()->activeClient();
|
||||
if (t && t->surface()) {
|
||||
if (t->surface() != seat->focusedKeyboardSurface()) {
|
||||
seat->setFocusedKeyboardSurface(t->surface());
|
||||
|
|
Loading…
Reference in a new issue