Handle buffer scales changing dynamically
ClosedPublic

Authored by davidedmundson on Aug 23 2017, 2:17 PM.

Details

Summary

Currently when a client changes it's buffer size the result is corrupt
until we move the window.

When a client buffer scale changes we need to redraw the whole window,
and most importantly flush the cached window quads, which reference the
scale.

This is not handled by the doSetGeometry() from the size changing as the
normalised size of the client remains the same so it no-ops.

Test Plan

Opened gtk3-demo and changed screen scale. It's now perfect.
Patch for Qt to work correctly incoming.

Diff Detail

Repository
R108 KWin
Branch
xdgv6
Lint
No Linters Available
Unit
No Unit Test Coverage
davidedmundson created this revision.Aug 23 2017, 2:17 PM
Restricted Application added a project: KWin. · View Herald TranscriptAug 23 2017, 2:17 PM
Restricted Application added subscribers: KWin, kwin, plasma-devel. · View Herald Transcript
graesslin added inline comments.
shell_client.cpp
226

Should we maybe introduce a dedicated signal?

davidedmundson added inline comments.Aug 23 2017, 2:47 PM
shell_client.cpp
226

Explicitly for scale changed?

Can do, but at that point we may as well have Scene connect to
c->surface(), &SurfaceInterface::scaleChanged

which would also work.

I'm fine with any.

graesslin added inline comments.Aug 23 2017, 3:01 PM
shell_client.cpp
226

that sounds lovely.

Move into scene

Restricted Application edited projects, added Plasma; removed KWin. · View Herald TranscriptAug 24 2017, 12:47 PM
graesslin accepted this revision.Aug 24 2017, 1:50 PM
This revision is now accepted and ready to land.Aug 24 2017, 1:50 PM
This revision was automatically updated to reflect the committed changes.