From 260b224d3bab6fb3f6cd95ffaba8c00fa6e4b197 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Sun, 10 Oct 2021 18:26:17 +0300 Subject: [PATCH] Drop WaylandServer::dispatch() There's no any good reason to dispatch events at shutdown. --- autotests/integration/kwin_wayland_test.cpp | 1 - src/main_wayland.cpp | 1 - src/wayland_server.cpp | 8 -------- src/wayland_server.h | 1 - 4 files changed, 11 deletions(-) diff --git a/autotests/integration/kwin_wayland_test.cpp b/autotests/integration/kwin_wayland_test.cpp index 7eb0a8159b..55e8f8c636 100644 --- a/autotests/integration/kwin_wayland_test.cpp +++ b/autotests/integration/kwin_wayland_test.cpp @@ -83,7 +83,6 @@ WaylandTestApplication::~WaylandTestApplication() delete m_xwayland; m_xwayland = nullptr; destroyWorkspace(); - waylandServer()->dispatch(); if (QStyle *s = style()) { s->unpolish(this); } diff --git a/src/main_wayland.cpp b/src/main_wayland.cpp index 9008d68cd1..1930289244 100644 --- a/src/main_wayland.cpp +++ b/src/main_wayland.cpp @@ -130,7 +130,6 @@ ApplicationWayland::~ApplicationWayland() delete m_xwayland; m_xwayland = nullptr; destroyWorkspace(); - waylandServer()->dispatch(); if (QStyle *s = style()) { s->unpolish(this); diff --git a/src/wayland_server.cpp b/src/wayland_server.cpp index 4cd62f3694..33ca6a5062 100644 --- a/src/wayland_server.cpp +++ b/src/wayland_server.cpp @@ -703,14 +703,6 @@ void WaylandServer::removeClient(AbstractClient *c) Q_EMIT shellClientRemoved(c); } -void WaylandServer::dispatch() -{ - if (!m_display) { - return; - } - m_display->dispatchEvents(); -} - static AbstractClient *findClientInList(const QList &clients, const KWaylandServer::SurfaceInterface *surface) { auto it = std::find_if(clients.begin(), clients.end(), diff --git a/src/wayland_server.h b/src/wayland_server.h index 7c230d3d65..80055a02ee 100644 --- a/src/wayland_server.h +++ b/src/wayland_server.h @@ -185,7 +185,6 @@ public: KWaylandServer::ClientConnection *screenLockerClientConnection() const { return m_screenLockerClientConnection; } - void dispatch(); /** * Struct containing information for a created Wayland connection through a