diff --git a/plugins/scenes/opengl/scene_opengl.h b/plugins/scenes/opengl/scene_opengl.h index c0ea8b5bf5..eb0d1da22e 100644 --- a/plugins/scenes/opengl/scene_opengl.h +++ b/plugins/scenes/opengl/scene_opengl.h @@ -147,6 +147,8 @@ class OpenGLWindowPixmap; class OpenGLWindow final : public Scene::Window { + Q_OBJECT + public: enum Leaf { ShadowLeaf, DecorationLeaf, ContentLeaf, PreviousContentLeaf }; diff --git a/plugins/scenes/qpainter/scene_qpainter.h b/plugins/scenes/qpainter/scene_qpainter.h index 18400162d4..39eb2c5304 100644 --- a/plugins/scenes/qpainter/scene_qpainter.h +++ b/plugins/scenes/qpainter/scene_qpainter.h @@ -91,6 +91,8 @@ private: class SceneQPainter::Window : public Scene::Window { + Q_OBJECT + public: Window(SceneQPainter *scene, Toplevel *c); ~Window() override; diff --git a/plugins/scenes/xrender/scene_xrender.h b/plugins/scenes/xrender/scene_xrender.h index 20c35bec35..c6ed6d9578 100644 --- a/plugins/scenes/xrender/scene_xrender.h +++ b/plugins/scenes/xrender/scene_xrender.h @@ -186,9 +186,10 @@ private: QScopedPointer m_backend; }; -class SceneXrender::Window - : public Scene::Window +class SceneXrender::Window : public Scene::Window { + Q_OBJECT + public: Window(Toplevel* c, SceneXrender *scene); ~Window() override; diff --git a/scene.cpp b/scene.cpp index 4f04dca4e6..8f3fac10b9 100644 --- a/scene.cpp +++ b/scene.cpp @@ -703,8 +703,9 @@ QVector Scene::openGLPlatformInterfaceExtensions() const // Scene::Window //**************************************** -Scene::Window::Window(Toplevel * c) - : toplevel(c) +Scene::Window::Window(Toplevel *client, QObject *parent) + : QObject(parent) + , toplevel(client) , filter(ImageFilterFast) , m_shadow(nullptr) , m_currentPixmap() diff --git a/scene.h b/scene.h index e9a9171ee5..8fe6158aa9 100644 --- a/scene.h +++ b/scene.h @@ -286,11 +286,13 @@ protected: }; // The base class for windows representations in composite backends -class Scene::Window +class Scene::Window : public QObject { + Q_OBJECT + public: - Window(Toplevel* c); - virtual ~Window(); + explicit Window(Toplevel *client, QObject *parent = nullptr); + ~Window() override; // perform the actual painting of the window virtual void performPaint(int mask, const QRegion ®ion, const WindowPaintData &data) = 0; // do any cleanup needed when the window's composite pixmap is discarded