diff --git a/kstyle/breezeshadowhelper.h b/kstyle/breezeshadowhelper.h --- a/kstyle/breezeshadowhelper.h +++ b/kstyle/breezeshadowhelper.h @@ -24,6 +24,7 @@ #include "config-breeze.h" #include +#include #include #include @@ -183,10 +184,10 @@ QMap _widgetSurfaces; //* The Wayland shadow manager to create Shadows for Surfaces (QWindow) - KWayland::Client::ShadowManager* _shadowManager; + QPointer _shadowManager; //* The Wayland Shared memory pool to share the shadow pixmaps with compositor - KWayland::Client::ShmPool* _shmPool; + QPointer _shmPool; #endif }; diff --git a/kstyle/breezeshadowhelper.cpp b/kstyle/breezeshadowhelper.cpp --- a/kstyle/breezeshadowhelper.cpp +++ b/kstyle/breezeshadowhelper.cpp @@ -90,17 +90,17 @@ if( !connection ) { return; } - auto registry = new Registry( this ); + auto registry = new Registry( connection ); registry->create( connection ); connect(registry, &Registry::interfacesAnnounced, this, [registry, this] { const auto interface = registry->interface( Registry::Interface::Shadow ); if( interface.name != 0 ) { - _shadowManager = registry->createShadowManager( interface.name, interface.version, this ); + _shadowManager = registry->createShadowManager( interface.name, interface.version, registry ); } const auto shmInterface = registry->interface( Registry::Interface::Shm ); if( shmInterface.name != 0 ) { - _shmPool = registry->createShmPool( shmInterface.name, shmInterface.version, this ); + _shmPool = registry->createShmPool( shmInterface.name, shmInterface.version, registry ); } } );