Fix colours of header bar for active and inactive windows
AcceptedPublic

Authored by davidedmundson on Mar 8 2019, 1:17 AM.

Details

Reviewers
zzag
ngraham
Group Reviewers
Breeze
VDG
Summary

Use and generate correct colours from the window manager palette rather
than the window palette in the headerbar.

BUG: 403426

This works beautifully on wayland, on X11 kwin doesn't send
NET_WM_STATE_FOCUSSED and GTK doesn't correctly handle WMs that don't support it.

Might be worth not committing this till then.

Test Plan

Ran gtk3-demo which requests CSDs

Diff Detail

Repository
R98 Breeze for Gtk
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 9306
Build 9324: arc lint + arc unit
davidedmundson created this revision.Mar 8 2019, 1:17 AM
Restricted Application added a project: Plasma. · View Herald TranscriptMar 8 2019, 1:17 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
davidedmundson requested review of this revision.Mar 8 2019, 1:17 AM

two window titles of different colours matching breeze.

ngraham added a subscriber: ngraham.

Nice!

zzag added a comment.Mar 8 2019, 9:11 AM

What's the reason for removing the linear gradient?

zzag added a comment.Mar 8 2019, 9:12 AM

(also, it would be enough just to add a group reviewer)

davidedmundson edited the summary of this revision. (Show Details)Mar 8 2019, 10:24 AM

What's the reason for removing the linear gradient?

In the old code it was a gradient between $WindowBackgroundNormal and $WindowBackgroundNormal which obviously did nothing so I removed it.

But I think you're right that breeze technically should change slightly.

zzag added a comment.EditedMar 8 2019, 11:29 AM

On X11, gtk isn't selecting the backdrop class. Probably because kwin doesn't support one of their new activation flags which would be a GTK bug for not following their fallback correctly.

If this is the case, then it's a bit awkward because GTK doesn't follow spec they wrote.

Might be worth not committing this till then.

Are GTK developers aware of this problem?

But I think you're right that breeze technically should change slightly.

Given that Breeze kdecoration settings are not synchronized with GTK theme, I think it's fine to have solid background color (though it would be great to match defaults).

src/gtk320/widgets/_headerbar.scss
14

This is probably redundant.

This comment was removed by davidedmundson.
zzag added inline comments.Mar 8 2019, 11:48 AM
src/gtk320/widgets/_headerbar.scss
14

Argh, please ignore this comment. It looks like background-image: none, background-color: ..., is used throughout the theme.

Are GTK developers aware of this problem?

There's an old bug report, I've just added some info to it.
https://gitlab.gnome.org/GNOME/gtk/issues/499

I'm not 100% against adding the focus state in kwin.

zzag accepted this revision.Mar 8 2019, 2:28 PM
This revision is now accepted and ready to land.Mar 8 2019, 2:28 PM
ngraham retitled this revision from Fix colours of header bar for acitve and inactive windows to Fix colours of header bar for active and inactive windows.Mar 8 2019, 2:56 PM
ngraham accepted this revision.Mar 8 2019, 10:26 PM

+1 for adding the focused state to KWin so this works on X11!