Fix crash on repainting an invalid sizes decoration
ClosedPublic

Authored by graesslin on Apr 11 2016, 7:49 AM.

Details

Summary

If a window has an invalid size the decoration also has an invalid
size. This results in the texture used by the
SceneOpenGLDecorationRenderer to be invalid and being reset to null.
Of course we shouldn't try to use this texture to render to.

The change comes with a test case to simulate the situation. We cannot
simulate it with Wayland clients as the geometry can never be empty.
Thus we create an X11 client, resize it to an empty size and unmap it.

This is the first integration test case which creates an X11 Client!
It's also a test case which needs the OpenGL compositor. This will most
likely not work on build.kde.org yet - we need to see what to do about
it. Will need adjustments to get it at least skip on build.kde.org.

BUG: 361551
FIXED-IN: 5.6.3

Diff Detail

Repository
R108 KWin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
graesslin updated this revision to Diff 3273.Apr 11 2016, 7:49 AM
graesslin retitled this revision from to Fix crash on repainting an invalid sizes decoration.
graesslin updated this object.
graesslin edited the test plan for this revision. (Show Details)
graesslin added a reviewer: Plasma.
Restricted Application added a project: Plasma. · View Herald TranscriptApr 11 2016, 7:49 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
sebas accepted this revision.Apr 13 2016, 12:05 PM
sebas added a reviewer: sebas.
sebas added a subscriber: sebas.

Looks good to me (as far as I understand).

This revision is now accepted and ready to land.Apr 13 2016, 12:05 PM
This revision was automatically updated to reflect the committed changes.