Diffusion KWin ce1a5eae156a

Support NET_WM_STATE_FOCUSED

Authored by davidedmundson on May 10 2019, 2:32 PM.

Description

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

Details

Committed
davidedmundsonMay 10 2019, 2:32 PM
Reviewer
KWin
Differential Revision
D19613: Support NET_WM_STATE_FOCUSED
Parents
R108:988ca97c96f1: Update kf5 version requirement to 5.58.0 GIT_SILENT
Branches
Unknown
Tags
Unknown