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.
41 lines
786 B
C++
41 lines
786 B
C++
#include "windowsystem.h"
|
|
|
|
#include <KWindowSystem>
|
|
|
|
namespace Latte {
|
|
|
|
WindowSystem::WindowSystem(QObject *parent) :
|
|
QObject(parent)
|
|
{
|
|
if (KWindowSystem::isPlatformWayland()) {
|
|
//! TODO: Wayland compositing
|
|
} else {
|
|
compositingChangedProxy(KWindowSystem::self()->compositingActive());
|
|
connect(KWindowSystem::self(), SIGNAL(compositingChanged(bool))
|
|
, this, SLOT(compositingChangedProxy(bool)));
|
|
}
|
|
}
|
|
|
|
WindowSystem &WindowSystem::self()
|
|
{
|
|
static WindowSystem wm;
|
|
return wm;
|
|
}
|
|
|
|
WindowSystem::~WindowSystem()
|
|
{
|
|
}
|
|
|
|
bool WindowSystem::compositingActive() const
|
|
{
|
|
return m_enabled;
|
|
}
|
|
|
|
void WindowSystem::compositingChangedProxy(bool enabled)
|
|
{
|
|
m_enabled = enabled;
|
|
emit compositingChanged();
|
|
}
|
|
|
|
} //end of namespace
|