KWin contextmenus usability and window/app specific palettes

René J. V. Bertin rjvbertin at gmail.com
Sun Mar 19 16:02:12 UTC 2017


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?

> 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)?

I'm currently updating QtCurve so it inherits KStyle instead of QCommonStyle . 
No idea yet if that's related but it should probably be done anyway.

R.



More information about the Plasma-devel mailing list