| Summary: | KWin's context menus don't have shadows on wayland | ||
|---|---|---|---|
| Product: | [Plasma] kwin | Reporter: | Kai Uwe Broulik <kde> |
| Component: | wayland-generic | Assignee: | KWin default assignee <kwin-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | Flags: | mgraesslin:
Wayland+
mgraesslin: X11- mgraesslin: ReviewRequest+ |
| Priority: | NOR | ||
| Version First Reported In: | git master | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | http://commits.kde.org/breeze/088c7672981ba6d4b83946a280683764ce300d60 | Version Fixed/Implemented In: | 5.8.4 |
| Sentry Crash Report: | |||
| Attachments: | Screenshot with menus | ||
|
Description
Kai Uwe Broulik
2016-11-02 20:54:59 UTC
Uh that might get tricky I just investigated a bit. The main problem here is that the KStyle tries to init Wayland prior to KWin having an internal Wayland connection. Created attachment 101993 [details]
Screenshot with menus
Made some progress and found a solution which gets the menus to show. But it seems to create severe regressions on tear down.
And as I feared. The ShadowHelper destroys the Wayland objects after KWin destroyed the internal Wayland connection. With latest libwayland that will cause a crash on tear-down. See: * https://phabricator.kde.org/D3239 * https://phabricator.kde.org/D3240 * https://phabricator.kde.org/D3241 Git commit ee7da425cefcd5cbe480335a144eee6218207dd9 by Martin Gräßlin. Committed on 07/11/2016 at 10:28. Pushed by graesslin into branch 'Plasma/5.8'. Unpolish QStyle on QApp prior to destroying internal Wayland connection Summary: The QStyle might interact with our internal Wayland connection. If the cleanup happens after destroying our internal Wayland connection KWin will crash at tear-down. With this change the QStyle can perform cleanup already prior to the deconstruction of the Wayland connection. Reviewers: #kwin, #plasma_on_wayland Subscribers: plasma-devel, kwin Tags: #plasma_on_wayland, #kwin Differential Revision: https://phabricator.kde.org/D3241 M +4 -0 autotests/integration/kwin_wayland_test.cpp M +4 -0 main_wayland.cpp http://commits.kde.org/kwin/ee7da425cefcd5cbe480335a144eee6218207dd9 Git commit 088c7672981ba6d4b83946a280683764ce300d60 by Martin Gräßlin. Committed on 03/11/2016 at 09:55. Pushed by graesslin into branch 'Plasma/5.8'. [kstyle] Delay init of Wayland setup till next event cycle Summary: This is a change mostly for KWin (the Wayland compositor). The internal Wayland connection is created after the QStyle is created in the case of KWin. But both are created before the event dispatcher is run for the first time. So delaying by one cycle makes it work for KWin and also all other Wayland applications. FIXED-IN: 5.8.4 Reviewers: #plasma, broulik, hpereiradacosta Subscribers: plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D3239 M +2 -1 kstyle/breezeshadowhelper.cpp M +3 -3 kstyle/breezeshadowhelper.h http://commits.kde.org/breeze/088c7672981ba6d4b83946a280683764ce300d60 Git commit a0433d089aa96ff60b625be10082e914c19b58d3 by Martin Gräßlin. Committed on 07/11/2016 at 10:47. Pushed by graesslin into branch 'Plasma/5.8'. [kstyle] Implement application unpolish to delete ShadowHelper Summary: Another change mostly for KWin (Wayland compositor). KWin destroys it's internal Wayland connection prior to the QStyle getting destroyed. As the ShadowHelper initialized Wayland objects those would be destroyed after the connection is destroyed. With latest Wayland library this would cause a crash. Thus unpolish is implemented in the style and deletes the ShadowHelper. KWin can on tear down invoke the unpolish and thus make sure it doesn't crash. Reviewers: #plasma, broulik, hpereiradacosta Subscribers: plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D3240 M +15 -0 kstyle/breezestyle.cpp M +6 -1 kstyle/breezestyle.h http://commits.kde.org/breeze/a0433d089aa96ff60b625be10082e914c19b58d3 |