diff --git a/platformsupport/scenes/qpainter/backend.cpp b/platformsupport/scenes/qpainter/backend.cpp index 2dd518ca3e..9da7184ffb 100644 --- a/platformsupport/scenes/qpainter/backend.cpp +++ b/platformsupport/scenes/qpainter/backend.cpp @@ -23,15 +23,6 @@ QPainterBackend::~QPainterBackend() { } -OverlayWindow* QPainterBackend::overlayWindow() -{ - return nullptr; -} - -void QPainterBackend::showOverlay() -{ -} - void QPainterBackend::screenGeometryChanged(const QSize &size) { Q_UNUSED(size) diff --git a/platformsupport/scenes/qpainter/backend.h b/platformsupport/scenes/qpainter/backend.h index 2fca89809c..fec328c884 100644 --- a/platformsupport/scenes/qpainter/backend.h +++ b/platformsupport/scenes/qpainter/backend.h @@ -14,33 +14,15 @@ class QRegion; class QSize; class QString; -namespace KWin { -class OverlayWindow; +namespace KWin +{ class QPainterBackend { public: virtual ~QPainterBackend(); virtual void present(int mask, const QRegion &damage) = 0; - - /** - * @brief Returns the OverlayWindow used by the backend. - * - * A backend does not have to use an OverlayWindow, this is mostly for the X world. - * In case the backend does not use an OverlayWindow it is allowed to return @c null. - * It's the task of the caller to check whether it is @c null. - * - * @return :OverlayWindow* - */ - virtual OverlayWindow *overlayWindow(); - virtual bool usesOverlayWindow() const = 0; virtual void prepareRenderingFrame() = 0; - /** - * @brief Shows the Overlay Window - * - * Default implementation does nothing. - */ - virtual void showOverlay(); /** * @brief React on screen geometry changes. * diff --git a/plugins/platforms/drm/scene_qpainter_drm_backend.cpp b/plugins/platforms/drm/scene_qpainter_drm_backend.cpp index 09ae03810b..d5bd99739f 100644 --- a/plugins/platforms/drm/scene_qpainter_drm_backend.cpp +++ b/plugins/platforms/drm/scene_qpainter_drm_backend.cpp @@ -124,11 +124,6 @@ void DrmQPainterBackend::present(int mask, const QRegion &damage) } } -bool DrmQPainterBackend::usesOverlayWindow() const -{ - return false; -} - bool DrmQPainterBackend::perScreenRendering() const { return true; diff --git a/plugins/platforms/drm/scene_qpainter_drm_backend.h b/plugins/platforms/drm/scene_qpainter_drm_backend.h index 58c7d2d674..32965105be 100644 --- a/plugins/platforms/drm/scene_qpainter_drm_backend.h +++ b/plugins/platforms/drm/scene_qpainter_drm_backend.h @@ -30,7 +30,6 @@ public: QImage *buffer() override; QImage *bufferForScreen(int screenId) override; bool needsFullRepaint() const override; - bool usesOverlayWindow() const override; void prepareRenderingFrame() override; void present(int mask, const QRegion &damage) override; bool perScreenRendering() const override; diff --git a/plugins/platforms/fbdev/scene_qpainter_fb_backend.cpp b/plugins/platforms/fbdev/scene_qpainter_fb_backend.cpp index 110213c493..c40151d0fb 100644 --- a/plugins/platforms/fbdev/scene_qpainter_fb_backend.cpp +++ b/plugins/platforms/fbdev/scene_qpainter_fb_backend.cpp @@ -82,11 +82,6 @@ void FramebufferQPainterBackend::present(int mask, const QRegion &damage) p.drawImage(QPoint(0, 0), m_backend->isBGR() ? m_renderBuffer.rgbSwapped() : m_renderBuffer); } -bool FramebufferQPainterBackend::usesOverlayWindow() const -{ - return false; -} - bool FramebufferQPainterBackend::perScreenRendering() const { return true; diff --git a/plugins/platforms/fbdev/scene_qpainter_fb_backend.h b/plugins/platforms/fbdev/scene_qpainter_fb_backend.h index 7ea657a838..25b22be762 100644 --- a/plugins/platforms/fbdev/scene_qpainter_fb_backend.h +++ b/plugins/platforms/fbdev/scene_qpainter_fb_backend.h @@ -27,7 +27,6 @@ public: QImage *buffer() override; QImage *bufferForScreen(int screenId) override; bool needsFullRepaint() const override; - bool usesOverlayWindow() const override; void prepareRenderingFrame() override; void present(int mask, const QRegion &damage) override; bool perScreenRendering() const override; diff --git a/plugins/platforms/virtual/scene_qpainter_virtual_backend.cpp b/plugins/platforms/virtual/scene_qpainter_virtual_backend.cpp index 4604ec0e47..8dcee1e2b4 100644 --- a/plugins/platforms/virtual/scene_qpainter_virtual_backend.cpp +++ b/plugins/platforms/virtual/scene_qpainter_virtual_backend.cpp @@ -65,11 +65,6 @@ void VirtualQPainterBackend::present(int mask, const QRegion &damage) } } -bool VirtualQPainterBackend::usesOverlayWindow() const -{ - return false; -} - bool VirtualQPainterBackend::perScreenRendering() const { return true; diff --git a/plugins/platforms/virtual/scene_qpainter_virtual_backend.h b/plugins/platforms/virtual/scene_qpainter_virtual_backend.h index d690f1afe0..cc976dd7a8 100644 --- a/plugins/platforms/virtual/scene_qpainter_virtual_backend.h +++ b/plugins/platforms/virtual/scene_qpainter_virtual_backend.h @@ -29,7 +29,6 @@ public: QImage *buffer() override; QImage *bufferForScreen(int screenId) override; bool needsFullRepaint() const override; - bool usesOverlayWindow() const override; void prepareRenderingFrame() override; void present(int mask, const QRegion &damage) override; bool perScreenRendering() const override; diff --git a/plugins/platforms/wayland/scene_qpainter_wayland_backend.cpp b/plugins/platforms/wayland/scene_qpainter_wayland_backend.cpp index 38b4486314..68cbc21a00 100644 --- a/plugins/platforms/wayland/scene_qpainter_wayland_backend.cpp +++ b/plugins/platforms/wayland/scene_qpainter_wayland_backend.cpp @@ -142,11 +142,6 @@ WaylandQPainterBackend::~WaylandQPainterBackend() { } -bool WaylandQPainterBackend::usesOverlayWindow() const -{ - return false; -} - bool WaylandQPainterBackend::perScreenRendering() const { return true; diff --git a/plugins/platforms/wayland/scene_qpainter_wayland_backend.h b/plugins/platforms/wayland/scene_qpainter_wayland_backend.h index d271b558ae..bacbc6d192 100644 --- a/plugins/platforms/wayland/scene_qpainter_wayland_backend.h +++ b/plugins/platforms/wayland/scene_qpainter_wayland_backend.h @@ -64,8 +64,6 @@ public: explicit WaylandQPainterBackend(WaylandBackend *b); ~WaylandQPainterBackend() override; - bool usesOverlayWindow() const override; - QImage *buffer() override; QImage *bufferForScreen(int screenId) override; diff --git a/plugins/platforms/x11/windowed/scene_qpainter_x11_backend.cpp b/plugins/platforms/x11/windowed/scene_qpainter_x11_backend.cpp index 5670f9e131..ab85b2106b 100644 --- a/plugins/platforms/x11/windowed/scene_qpainter_x11_backend.cpp +++ b/plugins/platforms/x11/windowed/scene_qpainter_x11_backend.cpp @@ -80,11 +80,6 @@ void X11WindowedQPainterBackend::present(int mask, const QRegion &damage) } } -bool X11WindowedQPainterBackend::usesOverlayWindow() const -{ - return false; -} - bool X11WindowedQPainterBackend::perScreenRendering() const { return true; diff --git a/plugins/platforms/x11/windowed/scene_qpainter_x11_backend.h b/plugins/platforms/x11/windowed/scene_qpainter_x11_backend.h index e9266e2790..f2aac58aab 100644 --- a/plugins/platforms/x11/windowed/scene_qpainter_x11_backend.h +++ b/plugins/platforms/x11/windowed/scene_qpainter_x11_backend.h @@ -32,7 +32,6 @@ public: QImage *buffer() override; QImage *bufferForScreen(int screenId) override; bool needsFullRepaint() const override; - bool usesOverlayWindow() const override; void prepareRenderingFrame() override; void present(int mask, const QRegion &damage) override; bool perScreenRendering() const override; diff --git a/plugins/scenes/qpainter/scene_qpainter.cpp b/plugins/scenes/qpainter/scene_qpainter.cpp index c03521ce03..d990680072 100644 --- a/plugins/scenes/qpainter/scene_qpainter.cpp +++ b/plugins/scenes/qpainter/scene_qpainter.cpp @@ -117,7 +117,6 @@ qint64 SceneQPainter::paint(const QRegion &_damage, const QList &top m_painter->restore(); m_painter->end(); } - m_backend->showOverlay(); m_backend->present(mask, overallUpdate); // do cleanup diff --git a/plugins/scenes/qpainter/scene_qpainter.h b/plugins/scenes/qpainter/scene_qpainter.h index 7be413996a..4b84ce9a5a 100644 --- a/plugins/scenes/qpainter/scene_qpainter.h +++ b/plugins/scenes/qpainter/scene_qpainter.h @@ -169,13 +169,13 @@ public: inline bool SceneQPainter::usesOverlayWindow() const { - return m_backend->usesOverlayWindow(); + return false; } inline OverlayWindow* SceneQPainter::overlayWindow() const { - return m_backend->overlayWindow(); + return nullptr; } inline