Skip to content
Commit ce1a5eae authored by David Edmundson's avatar David Edmundson
Browse files

Support NET_WM_STATE_FOCUSED

Summary:
This is used by GTK clients to know whether to draw as though they have
focus or not. Whilst it's most visible for CSDs headers, use of the
active/inactive palette (or backdrop class in GTK terms) applies
everywhere.

Rationale of the flag is to allow the WM to hint visual states without
giving input, i.e so you can hint that the parent of a modal dialog
should be shown as active. Though kwin only sets it on the truly active
window to match the behaviour our other windows follow.

BUG: 398832

I expect this to be potentially controversial as it's new code in X11,
so in advance:

* Unlike GTK_FRAME_EXTENTS, it is part of the specificiation (albeit
1.4) even i3 supports it.

* It does fix a real world issue

* It's only 2 lines (plus trivial boiler plate in kwindowsystem)

* It's in code path that we rely on for our existing code

* If there's a situation where this does break, the worst that will
happen is a client gets a visual hint to have focus incorrectly, which
ultimately is the same as the current state

Test Plan:
Used my CSS for breeze-gtk
moved between windows

Reviewers: #kwin, rooty, zzag

Reviewed By: #kwin, zzag

Subscribers: zzag, ognarb, ngraham, rooty, graesslin, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D19613
parent 988ca97c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment