window: Create palette only when needed
Creating a DecorationPalete
(e.g. the KColorScheme
inside) is
relatively expensive. Currently, this is done once a client is mapped,
regardless of whether it actually has a server-side decoration.
This change makes it create the palette only when it is actually used, e.g. the window indeed has a server-side decoration or when the user actions menu is invoked.
Verified that:
- No decoration palette is created at all when only client-side-decorated / undecorated windows are created
- Decoration color scheme is correct (both default and when started with custom scheme)
- Changing decoration color scheme in the application (e.g. KWrite Settings → Window Color Scheme) is reflected immediately
- User actions menu has the correct color scheme, both when using server-side and client-side decoration
Kai Uwe Broulik kai_uwe.broulik@mbition.io on behalf of MBition GmbH
https://github.com/mercedes-benz/foss/blob/master/PROVIDER_INFORMATION.md