diff --git a/autotests/integration/kwin_wayland_test.cpp b/autotests/integration/kwin_wayland_test.cpp index ccdd078d6c..d2aa6d05db 100644 --- a/autotests/integration/kwin_wayland_test.cpp +++ b/autotests/integration/kwin_wayland_test.cpp @@ -30,6 +30,7 @@ along with this program. If not, see . #include #include #include +#include #include #include @@ -80,6 +81,9 @@ WaylandTestApplication::~WaylandTestApplication() } waylandServer()->destroyXWaylandConnection(); } + if (QStyle *s = style()) { + s->unpolish(this); + } waylandServer()->terminateClientConnections(); destroyCompositor(); } diff --git a/main_wayland.cpp b/main_wayland.cpp index 802b10fa6a..364f4ca725 100644 --- a/main_wayland.cpp +++ b/main_wayland.cpp @@ -45,6 +45,7 @@ along with this program. If not, see . #include #include #include +#include #include #include #include @@ -114,6 +115,9 @@ ApplicationWayland::~ApplicationWayland() } waylandServer()->destroyXWaylandConnection(); } + if (QStyle *s = style()) { + s->unpolish(this); + } waylandServer()->terminateClientConnections(); destroyCompositor(); }