Commit 0c876cd9 authored by David Edmundson's avatar David Edmundson
Browse files

Avoid event processing infinite loop

Kwin on X11 overrides QCoreApplication::notify to get low level system

If something handled by the low level filtering ever calls postEvent we
would end up in a loop. This was found when forwarding a key event into
a QQuickWindow in a similar manner that mouse events are forwarded.

Fortunately there's a flag to separate generated and core events

Test Plan:
No more infinite loop
Kwin X11 still works fine

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: kwin

Tags: #kwin

Differential Revision:
parent ef540699
......@@ -273,7 +273,7 @@ void ApplicationX11::performStartup()
bool ApplicationX11::notify(QObject* o, QEvent* e)
if (Workspace::self()->workspaceEvent(e))
if (e->spontaneous() && Workspace::self()->workspaceEvent(e))
return true;
return QApplication::notify(o, e);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment