From 9654479ca9e30643fbded861f1b1c89f5472ca21 Mon Sep 17 00:00:00 2001 From: audoban Date: Fri, 30 Dec 2016 02:13:33 -0500 Subject: [PATCH] static method for get a instance of abstractwindowinterface NOTE: WaylandWindowInterface has not been implemented --- app/abstractwindowinterface.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/app/abstractwindowinterface.cpp b/app/abstractwindowinterface.cpp index edf970246..84948f899 100644 --- a/app/abstractwindowinterface.cpp +++ b/app/abstractwindowinterface.cpp @@ -1,8 +1,11 @@ #include "abstractwindowinterface.h" +#include "xwindowinterface.h" #include #include +#include + namespace Latte { AbstractWindowInterface::AbstractWindowInterface(QQuickWindow *const view, QObject *parent) @@ -13,9 +16,18 @@ AbstractWindowInterface::AbstractWindowInterface(QQuickWindow *const view, QObje AbstractWindowInterface::~AbstractWindowInterface() { - + } - +AbstractWindowInterface *AbstractWindowInterface::getInstance(QQuickWindow * const view, QObject *parent) +{ + if (KWindowSystem::isPlatformWayland()) { + //! TODO: WaylandWindowInterface + return nullptr; + } + + /* if(KWindowSystem::isPlatformX11) */ + return new XWindowInterface(view, parent); +} }