D7096: Only send active window changes to X11 root window if the X11 window changed

Martin Flöser noreply at phabricator.kde.org
Sun Aug 20 06:29:40 UTC 2017


graesslin added a comment.


  In https://phabricator.kde.org/D7096#137461, @davidedmundson wrote:
  
  > under X, any other process can change _net_active_window
  
  
  No! Other processes are not allowed to change _net_active_window, see https://specifications.freedesktop.org/wm-spec/wm-spec-latest.html#idm140200472702304
  
  Important quote: "This is a read-only property set by the Window Manager."
  
  > If that happens we need our m_activeWindow to reflect that, otherwise kwin can be out of sync and not send anything.
  
  KWin does not detect if a client changes the property directly. Didn't before. If that ever happened it went out of sync. Similar for any other Window Manager property (c.f. events.cpp, search for rootInfo()->event). We don't read them back. I do not see any reason to adjust this.
  
  > NetRootInfo already contains an activeWindow() method, which seems up-to-date, can we use that instead of the member var?
  
  No, we cannot. The setActiveWindow method does not store the value. So once you call setActiveWindow, activeWindow has a wrong value till one received the property change and passes it to the NetRootInfo. So no, it's not up-to-date.

REPOSITORY
  R108 KWin

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

To: graesslin, #kwin, #plasma, davidedmundson
Cc: davidedmundson, plasma-devel, kwin, ZrenBot, progwolff, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart, lukas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20170820/665051ee/attachment.html>


More information about the Plasma-devel mailing list