From 91b538105ad312ed035fb7a0e3d798e88a2ae6f7 Mon Sep 17 00:00:00 2001 From: Erik Kurzinger Date: Fri, 26 Oct 2018 11:18:39 +0300 Subject: [PATCH] [effects/desktopgrid] Specify screen projection matrix when drawing moving window Summary: Currently, when the user is moving a window in the desktop grid it is drawn from the paintScreen function to ensure it appears above all other windows. However, when drawing the window, the screenProjectionMatrix for the WindowPaintData structure is never specified. Because of this, the window will not be visible if OpenGL compositing along with Lanczos scaling are in use since its coordinates will never be projected into screen-space (unless the window is maximized, in which case the scaling code is bypassed). BUG: 361371 BUG: 364509 FIXED-IN: 5.14.3 Test Plan: Ensure OpenGL compositing is enabled and the scaling method is set to "Accurate" on hardware supporting this option. Additionally, ensure the desktop grid effect is active and is configured to use Present Windows. Open a window and ensure is it not maximized. Click on the window and drag it around - its contents should remain visible the entire time and follow the mouse. Reviewers: #kwin, zzag, graesslin, davidedmundson Reviewed By: #kwin, zzag, davidedmundson Subscribers: broulik, davidedmundson, kwin, #kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D16430 --- effects/desktopgrid/desktopgrid.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/effects/desktopgrid/desktopgrid.cpp b/effects/desktopgrid/desktopgrid.cpp index 41f7eb6da5..c735f793aa 100644 --- a/effects/desktopgrid/desktopgrid.cpp +++ b/effects/desktopgrid/desktopgrid.cpp @@ -202,7 +202,7 @@ void DesktopGridEffect::paintScreen(int mask, QRegion region, ScreenPaintData& d // the moving window has to be painted on top of all desktops QPoint diff = cursorPos() - m_windowMoveStartPoint; QRect geo = m_windowMoveGeometry.translated(diff); - WindowPaintData d(windowMove); + WindowPaintData d(windowMove, data.projectionMatrix()); d *= QVector2D((qreal)geo.width() / (qreal)windowMove->width(), (qreal)geo.height() / (qreal)windowMove->height()); d += QPoint(geo.left() - windowMove->x(), geo.top() - windowMove->y()); effects->drawWindow(windowMove, PAINT_WINDOW_TRANSFORMED | PAINT_WINDOW_LANCZOS, infiniteRegion(), d);