[qpa] Prevent crash due to Surface getting null
ClosedPublic

Authored by graesslin on Jul 6 2017, 5:11 PM.

Details

Summary

This is a regression due to changes in Breeze to support Qt 5.8+ behavior
change. KWin's own QPA operates like < Qt 5.7 and breeze was programmed
against that. Due to that it can happen now that Breeze hits code paths
in which KWin does not have a surface.

To trigger one only needed to open the user actions menu twice.

This change adds a test case which simulates the problem and fixes all
crashes happening in the code path.

Most likely shadows are now broken for KWin's own windows, this change is
only to prevent the crash and thus is for 5.10 branch, while shadow
fixing will go to master branch.

BUG: 382063
FIXED-IN: 5.10.4

Test Plan

New test case

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 created this revision.Jul 6 2017, 5:11 PM
Restricted Application added a project: KWin. · View Herald TranscriptJul 6 2017, 5:11 PM
Restricted Application added subscribers: kwin, plasma-devel. · View Herald Transcript
davidedmundson accepted this revision.Jul 6 2017, 5:47 PM
This revision is now accepted and ready to land.Jul 6 2017, 5:47 PM
This revision was automatically updated to reflect the committed changes.