D22053: [libtaskmanager] Track stacking order and window activation (on X11)

Anthony Fieroni noreply at phabricator.kde.org
Wed Jun 26 19:12:24 BST 2019


anthonyfieroni added inline comments.

INLINE COMMENTS

> xwindowtasksmodel.cpp:673-675
> +        if (d->lastActivated.contains(window)) {
> +            return d->lastActivated.value(window);
> +        }

That's double lookup in intensive called function, what about

  int idx = d->lastActivated.indexOf(window);
  if (idx >= 0)
       return d->lastActivated.at(idx);

REPOSITORY
  R120 Plasma Workspace

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

To: hein, #plasma
Cc: anthonyfieroni, ngraham, plasma-devel, LeGast00n, jraleigh, fbampaloukas, GB_2, ragreen, Pitel, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20190626/f6bb0338/attachment.html>


More information about the Plasma-devel mailing list