<table><tr><td style="">luebking added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D7096" rel="noreferrer">View Revision</a></tr></table><br /><div><div><p>There's no technical advantage in a local static, only a design one. You prevent it from future mis-use beyond its limited purpose, because m_activeWindow isn't actually a "property" of RootInfo.<br />
If you however at some point need several instances, that's no longer an option (resp. you'd need a local hash which is but even uglier than the "false" member)</p>

<p>Likewise this is not about protecting* the active window, but if a client does shit, RootInfo::activeWindow() still reflects a common idea, while m_activeWindow does not (which sets up the case for the above arguement to protect m_activeWindow against unqualified reads to query the active window - which i think is at least part of Davids concern)</p>

<p>*questionale itfp, it's rather race-prone and there's just a bug in the other client that needs to be fixed.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R108 KWin</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D7096" rel="noreferrer">https://phabricator.kde.org/D7096</a></div></div><br /><div><strong>To: </strong>graesslin, KWin, Plasma, davidedmundson<br /><strong>Cc: </strong>luebking, davidedmundson, plasma-devel, kwin, ZrenBot, progwolff, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart, lukas<br /></div>