Skip to content

Use only GTK Module for managing window decorations CSS

Now we are no longer use gtk.css file inside ~/.config/gtk-3.0/ directory for window decorations. To load decorations into GTK apps we now exclusively use GTK module.

The module is a GTK-app addon, that loads the buttons on application startup, then it reacts to changes of windows_decorations.css file in config directory and loads and unloads it dynamically depending on its presence.

For example: file is present - it is loaded on the startup, file is deleted - it is unloaded, file is created or changed - it is loaded, while the past version of it is unloaded.

File presence is controlled by kde-gtk-config kded5 module.

BUG: 428322

BUG: 428120

BUG: 428842

🧪 Test Plan

This test plan is based on the one found in !2 (merged)

Before doing any of these tests:

  1. Restart kded5 (once).
  2. Apply new kconf_update script.

To open a GTK 3 application with the loaded module:

export GTK_PATH="~/kde/usr/lib/gtk-3.0/"

1. Main functionality

  1. Open Window Decorations KCM
  2. Open the GTK application with CSD
  3. Change window decorations
  4. GTK app should use the new decorations from the KCM

2. Change on colors' change

  1. Set window decorations to Breeze
  2. Open Colors KCM
  3. Open the GTK app
  4. Change color scheme
  5. Decorations must be using new colors

3. Change on Breeze decoration's "circle" setting change

  1. Set window decorations to Breeze
  2. Open Breeze window decoration settings
  3. Open the GTK app
  4. Change the setting "Draw a circle around close button"
  5. Decoration now should respect the above setting

4. Change on GTK theme change

  1. Set GTK theme to Breeze
  2. Open the GTK app
  3. Change window decorations, decorations should change
  4. Set GTK theme in Application Style KCM to something other (Pick some random GTK theme)
  5. Decorations should be from that GTK theme
  6. Change window decorations, decorations should not change


5. Initial loading

After changing the decorations:

  1. Close the GTK app
  2. Open the GTK app
  3. Decorations should be in place

6. Bugs related test

From the bug report:

  1. Set the window decorations to something vivid
  2. Do not open GTK app yet.
  3. Open GTK page, set GTK theme to Breeze.
  4. Open GTK app.
  5. At this moment change the GTK theme in settings
  6. Now the decorations are broken fine!.

Merge request reports