Closed nihadguluzade closed 4 years ago
Okay this is a bit tricky.
The color is being calculated when the window is first created. The custom rules will apply to a window that's called "Spotify", but not to a window that's first called "Snap App" and then later renames itself to "Spotify". A similar issue arises when you try to create a custom rule set for incognito Firefox windows.
Can you do me a favor and try something out though? After creating this rule for Spotify, close and then reopen Spotify to see that it in fact didn't change color. Then open up krunner and type kwin_x11 --replace
and hit enter. The Spotify window should have the proper color now.
If this works, a possible solution would be to add a delay to the functions before they fetch the application properties if that's even possible from within the window decorations.
krunner command indeed changed the title bar color for the currently opened Spotify. Probably it might be related to the title name changing, because when I start the program title bar is first "Spotify" then changes to "Spotify Premium". However, as I said, from the settings of hello, I chose Matching windows property to the Window class name, not the Window title.
Yes, but something changes from the initial rendering of the window to when you can actually use it. So I guess a delay in detecting the window properties is the only way to circumvent this. Hm.
Just leaving a brief comment to say that I'm experiencing this, and would offer to test any solutions you have. Opening and closing Hello settings causes the window manager to "refresh" or something, i see a flash on my screen and then spotify changes to the right titlebar color.
Upon closing the window decoration settings Plasma is essentially doing a refresh. So the flash you see is exactly what you'd get when you'd do a kwin_x11 --replace
.
Closing this as I most likely won't be working on this any further (see 5f57998e).
Describe the bug In the settings, from the Window-Specific Overrides tab I add the Spotify app (Window Class Name is Spotify), pick the custom title bar colour and apply it. Although it does change the title bar color of the currently opened Spotify application, the color gets back to normal after restarting/reopening the application.
To Reproduce
Expected behavior The custom title bar color of the Spotify should stay when reopening the application.
Additional context Using KDE Plasma Version 5.17.5, openSUSE Tumbleweed 20200123.