From b1f6d4b8ba69fe2c3224cb1b6d7492a213aad2b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Wed, 3 Aug 2016 17:24:37 +0200 Subject: [PATCH] [platforms/x11-windows] Delay x11 event processing till Workspace is started If the event processing is started before everything is fully started it can happen that we have "evil" events which may crash either Xwayland or KWin itself. E.g. if the nested window is too large, the window manager on the host X-Server will request a resize. If the backend does that it can happen that the wl_output gets destroyed while Xwayland tries to bind to it and will crash. Thus let's delay all events till we are ready to process them. --- plugins/platforms/x11/windowed/x11windowed_backend.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/platforms/x11/windowed/x11windowed_backend.cpp b/plugins/platforms/x11/windowed/x11windowed_backend.cpp index 20c84dfad3..b3070551a7 100644 --- a/plugins/platforms/x11/windowed/x11windowed_backend.cpp +++ b/plugins/platforms/x11/windowed/x11windowed_backend.cpp @@ -92,7 +92,7 @@ void X11WindowedBackend::init() } XRenderUtils::init(m_connection, m_screen->root); createWindow(); - startEventReading(); + connect(kwinApp(), &Application::workspaceCreated, this, &X11WindowedBackend::startEventReading); connect(this, &X11WindowedBackend::cursorChanged, this, [this] { createCursor(softwareCursor(), softwareCursorHotspot());