You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
latte-dock/liblattedock/windowsystem.cpp

44 lines
862 B
C++

#include "windowsystem.h"
#include <KWindowSystem>
namespace Latte {
WindowSystem::WindowSystem(QObject *parent) :
QObject(parent)
{
if (KWindowSystem::isPlatformWayland()) {
//! TODO: Wayland compositing active
} else {
compositingChangedProxy(KWindowSystem::self()->compositingActive());
connect(KWindowSystem::self(), &KWindowSystem::compositingChanged
, this, &WindowSystem::compositingChangedProxy);
}
}
WindowSystem::~WindowSystem()
{
}
WindowSystem &WindowSystem::self()
{
static WindowSystem ws;
return ws;
}
bool WindowSystem::compositingActive() const
{
return m_compositing;
}
void WindowSystem::compositingChangedProxy(bool enable)
{
if (m_compositing == enable)
return;
m_compositing = enable;
emit compositingChanged();
}
} //end of namespace