Fix crash on repainting an invalid sizes decoration
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 Reviewers: #plasma Subscribers: plasma-devel Projects: #plasma Differential Revision: https://phabricator.kde.org/D1383
Showing
- autotests/wayland/CMakeLists.txt 9 additions, 0 deletionsautotests/wayland/CMakeLists.txt
- autotests/wayland/dont_crash_empty_deco.cpp 221 additions, 0 deletionsautotests/wayland/dont_crash_empty_deco.cpp
- client.h 1 addition, 1 deletionclient.h
- scene_opengl.cpp 5 additions, 0 deletionsscene_opengl.cpp
Loading
Please register or sign in to comment