diff --git a/kstyle/breezeshadowhelper.h b/kstyle/breezeshadowhelper.h --- a/kstyle/breezeshadowhelper.h +++ b/kstyle/breezeshadowhelper.h @@ -95,6 +95,9 @@ //* unregister widget void objectDeleted( QObject* ); + //* initializes the Wayland specific parts + void initializeWayland(); + protected: //* true if widget is a menu @@ -140,9 +143,6 @@ //* uninstall shadow on given widget for Wayland void uninstallWaylandShadows( QWidget* ) const; - //* initializes the Wayland specific parts - void initializeWayland(); - //* gets the shadow margins for the given widget QMargins shadowMargins( QWidget* ) const; diff --git a/kstyle/breezeshadowhelper.cpp b/kstyle/breezeshadowhelper.cpp --- a/kstyle/breezeshadowhelper.cpp +++ b/kstyle/breezeshadowhelper.cpp @@ -64,7 +64,8 @@ , _shmPool( Q_NULLPTR ) #endif { - initializeWayland(); + // delay till event dispatcher is running as Wayland is highly async + QMetaObject::invokeMethod(this, "initializeWayland", Qt::QueuedConnection); } //_______________________________________________________