Am 2017-03-19 17:02, schrieb René J. V. Bertin:
Martin Gräßlin wrote:
Thanks for the info.
I need to explain the whole interaction:
1. Applications can use KColorSchemeManager to set a color scheme.
2. This gets installed as a dynamic property in the QGuiApplication
This happens in KColorSchemeManager or at a lower level?
The dynamic property gets set by KColorSchemeManager.
3. plasma-integration reads this dynamic property and installs an X
property on each created window
4. KWin reads the property and creates a QPalette from it
5. The palette gets stored for each window and is passed to the
decoration and to the useractions context menu
Reading this on is tempted to think that as long as a style handles a
widget's
QPalette correctly there should be no issue like what I'm seeing. And
QtCurve
does handle palettes correctly for contextmenus, except in KWin5 when
it's not
using the standard palette.
It'll probably be easier to understand why the contextmenu isn't
updated
correctly when the application changes its palette rather than via a
special
rule.
The code in question is in useractions.cpp in multiple places, just
search for setPalette.
Is m_client.data()->palette() how useractions.cpp accesses the dynamic
property
mentioned under point 2)?
KWin is only involved starting in point 4. 1-3 are in the application.
Cheers
Martin