Commit 088c7672 authored by Martin Flöser's avatar Martin Flöser

[kstyle] Delay init of Wayland setup till next event cycle

Summary:
This is a change mostly for KWin (the Wayland compositor). The internal
Wayland connection is created after the QStyle is created in the case of
KWin. But both are created before the event dispatcher is run for the
first time. So delaying by one cycle makes it work for KWin and also all
other Wayland applications.

BUG: 372001
FIXED-IN: 5.8.4

Reviewers: #plasma, broulik, hpereiradacosta

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D3239
parent a6ade1b7
......@@ -64,7 +64,8 @@ namespace Breeze
, _shmPool( Q_NULLPTR )
#endif
{
initializeWayland();
// delay till event dispatcher is running as Wayland is highly async
QMetaObject::invokeMethod(this, "initializeWayland", Qt::QueuedConnection);
}
//_______________________________________________________
......
......@@ -95,6 +95,9 @@ namespace Breeze
//* unregister widget
void objectDeleted( QObject* );
//* initializes the Wayland specific parts
void initializeWayland();
protected:
//* true if widget is a menu
......@@ -140,9 +143,6 @@ namespace Breeze
//* 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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment