D26960: RFC: [KWindowShadows] Check for X connection
This revision was automatically updated to reflect the committed changes. Closed by commit R278:21d67e31f718: [KWindowShadows] Check for X connection (authored by broulik). REPOSITORY R278 KWindowSystem CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D26960?vs=74486=74489 REVISION DETAIL https://phabricator.kde.org/D26960 AFFECTED FILES src/platforms/xcb/kwindowshadow.cpp To: broulik, #plasma, zzag, davidedmundson Cc: davidedmundson, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns
D26960: RFC: [KWindowShadows] Check for X connection
davidedmundson accepted this revision. davidedmundson added a comment. Ok, panel shadows is a singleton. That explains things. REPOSITORY R278 KWindowSystem REVISION DETAIL https://phabricator.kde.org/D26960 To: broulik, #plasma, zzag, davidedmundson Cc: davidedmundson, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns
D26960: RFC: [KWindowShadows] Check for X connection
davidedmundson added a comment. Heh, I'm going to quote a conversation with you: David Edmundson, [17.01.20 10:07] would you say it's always wrong to have a QWindow outlive a QApplication? Kai Uwe, [17.01.20 10:08] I would say yes, why? David Edmundson, [17.01.20 10:08] wondering if I need to comment on some code that would crash if that happened Kai Uwe, [17.01.20 10:13] when qapp is gone the qpt and stuff will be torn down and then it will naturally crash if a window outlives it, no? Then you went and proved that windows are torn down. If we have a tile alive it means either a KWindowShadow object is alive or the QStyle is still alive, and both should be destroyed before the QPA. Do you have the full bt of the crash? REPOSITORY R278 KWindowSystem REVISION DETAIL https://phabricator.kde.org/D26960 To: broulik, #plasma, zzag Cc: davidedmundson, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns
D26960: RFC: [KWindowShadows] Check for X connection
zzag accepted this revision. This revision is now accepted and ready to land. REPOSITORY R278 KWindowSystem REVISION DETAIL https://phabricator.kde.org/D26960 To: broulik, #plasma, zzag Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns
D26960: RFC: [KWindowShadows] Check for X connection
broulik created this revision. broulik added reviewers: Plasma, zzag. Herald added a project: Frameworks. Herald added a subscriber: kde-frameworks-devel. broulik requested review of this revision. REVISION SUMMARY On teardown of plasmashell the shared pointer with shadows is unref'd quite late at which point `QX11Info::connection()` already return null, leading to a crash in those xcb calls. The old code in Plasma PanelShadows checked for `QX11Info::display()` being null, which is restored here. TEST PLAN Not sure if this is a good idea? is X smart enough to clean up after us? - Still crashes in Breeze style but no longer without it REPOSITORY R278 KWindowSystem REVISION DETAIL https://phabricator.kde.org/D26960 AFFECTED FILES src/platforms/xcb/kwindowshadow.cpp To: broulik, #plasma, zzag Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns