D5461: Don't update the focused pointer Surface if a button is pressed

Mark Gaiser noreply at phabricator.kde.org
Sat Apr 15 10:01:24 UTC 2017


markg added inline comments.

INLINE COMMENTS

> pointer_input.cpp:440
> +    auto areButtonsPressed = [this] {
> +        for (auto it = m_buttons.constBegin(), end = m_buttons.constEnd(); it != end; it++) {
> +            if (it.value() == InputRedirection::PointerButtonPressed) {

Just curious, why do you define end as opposed tho this:
for (auto it = m_buttons.constBegin(); it != m_buttons.constEnd(); it++) {

}

Another route you can go which looks much cleaner imho (requires Qt 5.7 because of qAsConst):
for (auto entry, qAsConst(m_buttons)) {

}

Just my 2 cents.

REPOSITORY
  R108 KWin

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

To: graesslin, #kwin, #plasma
Cc: markg, plasma-devel, kwin, spstarr, progwolff, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20170415/d4bf8d43/attachment.html>


More information about the Plasma-devel mailing list