From f4627e38f18273ad61a30bc83abf95b5bab5b492 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Tue, 18 Oct 2016 16:22:57 +0200 Subject: [PATCH] Expose GLRenderTarget::virtualScreenGeometry Summary: A simple way to get the current per-output geometry. It's also needed by effects using render targets. Reviewers: #kwin, #plasma_on_wayland Subscribers: plasma-devel, kwin Tags: #plasma_on_wayland, #kwin Differential Revision: https://phabricator.kde.org/D3100 --- libkwineffects/kwinglutils.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/libkwineffects/kwinglutils.h b/libkwineffects/kwinglutils.h index 6e386a7134..6e1b437ac0 100644 --- a/libkwineffects/kwinglutils.h +++ b/libkwineffects/kwinglutils.h @@ -515,12 +515,23 @@ public: * Sets the virtual screen geometry to @p g. * This is the geometry of the OpenGL window currently being rendered to * in the virtual geometry space the rendering geometries use. + * @see virtualScreenGeometry * @since 5.9 **/ static void setVirtualScreenGeometry(const QRect &g) { s_virtualScreenGeometry = g; } + /** + * The geometry of the OpenGL window currently being rendered to + * in the virtual geometry space the rendering system uses. + * @see setVirtualScreenGeometry + * @since 5.9 + **/ + static QRect virtualScreenGeometry() { + return s_virtualScreenGeometry; + } + protected: void initFBO();