2023-08-31 12:44:50 +00:00
|
|
|
/*
|
|
|
|
KWin - the KDE window manager
|
|
|
|
This file is part of the KDE project.
|
|
|
|
|
|
|
|
SPDX-FileCopyrightText: 2006 Lubos Lunak <l.lunak@kde.org>
|
|
|
|
|
|
|
|
SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "compositor_wayland.h"
|
|
|
|
#include "main.h"
|
|
|
|
#include "workspace.h"
|
|
|
|
|
|
|
|
namespace KWin
|
|
|
|
{
|
|
|
|
|
|
|
|
WaylandCompositor *WaylandCompositor::create(QObject *parent)
|
|
|
|
{
|
|
|
|
Q_ASSERT(!s_compositor);
|
|
|
|
auto *compositor = new WaylandCompositor(parent);
|
|
|
|
s_compositor = compositor;
|
|
|
|
return compositor;
|
|
|
|
}
|
|
|
|
|
|
|
|
WaylandCompositor::WaylandCompositor(QObject *parent)
|
|
|
|
: Compositor(parent)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
WaylandCompositor::~WaylandCompositor()
|
|
|
|
{
|
|
|
|
Q_EMIT aboutToDestroy();
|
|
|
|
stop(); // this can't be called in the destructor of Compositor
|
|
|
|
}
|
|
|
|
|
|
|
|
void WaylandCompositor::start()
|
|
|
|
{
|
|
|
|
if (!Compositor::setupStart()) {
|
|
|
|
// Internal setup failed, abort.
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2023-09-14 12:07:54 +00:00
|
|
|
startupWithWorkspace();
|
2023-08-31 12:44:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace KWin
|
|
|
|
|
|
|
|
#include "moc_compositor_wayland.cpp"
|