D19613: Support NET_WM_STATE_FOCUSED

David Edmundson <[email protected]>
Newsgroups gmane.comp.kde.devel.kwin
Message-ID <[email protected]>
davidedmundson created this revision.
davidedmundson added a reviewer: KWin.
Herald added a project: KWin.
Herald added a subscriber: kwin.
davidedmundson requested review of this revision.

REVISION 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

REPOSITORY
  R108 KWin

BRANCH
  origin-master (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D19613

AFFECTED FILES
  activation.cpp
  netinfo.cpp

To: davidedmundson, #kwin
Cc: kwin, jraleigh, GB_2, mkulinski, ragreen, jackyalcine, Pitel, iodelay, bwowk, ZrenBot, ngraham, alexeymin, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.