Drop Workspace::m_compositor

The Compositor is a singleton, there's no need to cache the return value
of Compositor::self().
This commit is contained in:
Vlad Zahorodnii 2021-11-09 13:26:48 +02:00
parent 9fca6209b7
commit b8b8f93ca3
2 changed files with 2 additions and 7 deletions

View file

@ -106,7 +106,6 @@ Workspace* Workspace::_self = nullptr;
Workspace::Workspace()
: QObject(nullptr)
, m_compositor(nullptr)
// Unsorted
, m_quickTileCombineTimer(nullptr)
, active_popup(nullptr)
@ -174,13 +173,10 @@ Workspace::Workspace()
TabBox::TabBox::create(this);
#endif
if (Compositor::self()) {
m_compositor = Compositor::self();
} else {
if (!Compositor::self()) {
Q_ASSERT(kwinApp()->operationMode() == Application::OperationMode::OperationModeX11);
m_compositor = X11Compositor::create(this);
X11Compositor::create(this);
}
connect(m_compositor, &QObject::destroyed, this, [this] { m_compositor = nullptr; });
auto decorationBridge = Decoration::DecorationBridge::create(this);
decorationBridge->init();

View file

@ -258,7 +258,6 @@ public:
QPoint cascadeOffset(const AbstractClient *c) const;
private:
Compositor *m_compositor;
QTimer *m_quickTileCombineTimer;
QuickTileMode m_lastTilingMode;