Commit 408ed806 authored by Erik Kurzinger's avatar Erik Kurzinger Committed by Vlad Zahorodnii

[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
parent c7aa7212
......@@ -197,7 +197,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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment