Set color scheme X property in the X11Integration
ClosedPublic

Authored by graesslin on Oct 13 2016, 6:22 AM.

Details

Summary

So for the _KDE_NET_WM_COLOR_SCHEME property was set in KStyle. This has
a few disadvantages:

  • it only works for QWidgets
  • it requires a style inheriting from KStyle

This change brings the behavior into the plasma-integration QPT. It's an
integration feature for our platform theme as it's a hint for KWin.

The existing event filter in the X11Integration is used to monitor for
all PlatformSurface events and sets the required property on the newly
created X11 window.

In addition it monitors for the ApplicationPaletteChange to update the
property as needed on all toplevel windows.

Test Plan

Removed code from kstyle and used the KColorSchemeManager test
application.

Diff Detail

Repository
R135 Integration for Qt applications in Plasma
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
graesslin updated this revision to Diff 7366.Oct 13 2016, 6:22 AM
graesslin retitled this revision from to Set color scheme X property in the X11Integration.
graesslin updated this object.
graesslin edited the test plan for this revision. (Show Details)
graesslin added a reviewer: Plasma.
Restricted Application added a project: Plasma. · View Herald TranscriptOct 13 2016, 6:22 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
sebas accepted this revision.Oct 16 2016, 2:52 PM
sebas added a reviewer: sebas.
This revision is now accepted and ready to land.Oct 16 2016, 2:52 PM
This revision was automatically updated to reflect the committed changes.