From 76e57ab5d0b20bbd54cf952e949da908762b26ea Mon Sep 17 00:00:00 2001 From: Vlad Zagorodniy Date: Thu, 5 Sep 2019 10:51:47 +0300 Subject: [PATCH] Make checkForOverlayWindow X11Compositor only Summary: Overlay windows is an X11 thing. Test Plan: Compiles. Reviewers: #kwin Subscribers: kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D23608 --- composite.cpp | 7 ------- composite.h | 13 +++++-------- workspace.cpp | 7 +++++-- 3 files changed, 10 insertions(+), 17 deletions(-) diff --git a/composite.cpp b/composite.cpp index 416277cdba..1636b324cd 100644 --- a/composite.cpp +++ b/composite.cpp @@ -867,13 +867,6 @@ void WaylandCompositor::start() } } -bool WaylandCompositor::checkForOverlayWindow(WId w) const -{ - Q_UNUSED(w) - // There is no overlay window in Wayland/XWayland. - return false; -} - int WaylandCompositor::refreshRate() const { // TODO: This makes no sense on Wayland. First step would be to atleast diff --git a/composite.h b/composite.h index 94a6306d0e..4b6616dd96 100644 --- a/composite.h +++ b/composite.h @@ -99,11 +99,6 @@ public: return m_scene; } - /** - * Checks whether @p w is the Scene's overlay window. - */ - virtual bool checkForOverlayWindow(WId w) const = 0; - /** * @brief Static check to test whether the Compositor is available and active. * @@ -191,8 +186,6 @@ public: void toggleCompositing() override; - bool checkForOverlayWindow(WId w) const override; - protected: void start() override; @@ -252,7 +245,11 @@ public: void configChanged() override; - bool checkForOverlayWindow(WId w) const override; + /** + * Checks whether @p w is the Scene's overlay window. + */ + bool checkForOverlayWindow(WId w) const; + /** * @returns Whether the Scene's Overlay X Window is visible. */ diff --git a/workspace.cpp b/workspace.cpp index cf08e281a3..9a6ef1781b 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -610,8 +610,11 @@ Client* Workspace::createClient(xcb_window_t w, bool is_mapped) Unmanaged* Workspace::createUnmanaged(xcb_window_t w) { - if (m_compositor && m_compositor->checkForOverlayWindow(w)) - return NULL; + if (X11Compositor *compositor = X11Compositor::self()) { + if (compositor->checkForOverlayWindow(w)) { + return nullptr; + } + } Unmanaged* c = new Unmanaged(); if (!c->track(w)) { Unmanaged::deleteUnmanaged(c);