Merge lp:~uriboni/unity-2d/spread-safer-window-image-provider into lp:unity-2d/3.0
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Florian Boucault | ||||
Approved revision: | 536 | ||||
Merged at revision: | 541 | ||||
Proposed branch: | lp:~uriboni/unity-2d/spread-safer-window-image-provider | ||||
Merge into: | lp:unity-2d/3.0 | ||||
Diff against target: |
169 lines (+76/-35) 2 files modified
libunity-2d-private/Unity2d/windowimageprovider.cpp (+71/-35) libunity-2d-private/Unity2d/windowimageprovider.h (+5/-0) |
||||
To merge this branch: | bzr merge lp:~uriboni/unity-2d/spread-safer-window-image-provider | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Florian Boucault (community) | functional | Approve | |
Review via email: mp+57856@code.launchpad.net |
Commit message
[spread] Implement a safer logic to convert the captured window pixmap into images that is resistant to the window being unmapped while we convert.
Description of the change
This MR makes sure that if the conversion of the captured window pixmap to fails due to the window being unmapped while we're converting it, we don't crash (and we retry to grab the pixmap following the alternative code path for unmapped windows).
The reason for the crash is explained in large detail in the attached bug.
To test this patch I suggest you do *not* apply the fix in lp:~uriboni/unity-2d/spread-no-windows-when-inactive , then follow the instructions in the bug report and verify that no matter how many times you try you don't get the crash.
A more scientific approach (given the fact that the bug is not reproducible reliably, but only randomly after usually two or three tries) would be to go in with a debugger and verify that we're actually at least once failing to convert the image and recover safely from that.
Functionally fine, fixes the crasher and does not introduce regressions.