D23923: Drop checkArea helper

Frederik Gladhorn noreply at phabricator.kde.org
Sat Sep 14 21:23:54 BST 2019


gladhorn added inline comments.

INLINE COMMENTS

> placement.cpp:140
>      int tx, ty;
>  
> +    if (px < area.x()) {

You could add an assert here to verify that area is not null, in case of regressions it'll be easier to debug the issue.

> placement.cpp:223
>      // get the maximum allowed windows space
> -    const QRect maxRect = checkArea(c, area);
> -    int x = maxRect.left(), y = maxRect.top();
> +    int x = area.left(), y = area.top();
>      x_optimal = x; y_optimal = y;

Unrelated, but since you touch the line, I at least prefer one line per variable, it's super easy to overlook the y assignment otherwise.

REPOSITORY
  R108 KWin

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

To: zzag, #kwin
Cc: gladhorn, romangg, kwin, LeGast00n, The-Feren-OS-Dev, sbergeron, jraleigh, fbampaloukas, GB_2, mkulinski, ragreen, jackyalcine, Pitel, iodelay, crozbo, bwowk, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwin/attachments/20190914/825c3f20/attachment-0001.html>


More information about the kwin mailing list