D23102: Reduce duplicate code calculating popup position
Vlad Zagorodniy
noreply at phabricator.kde.org
Tue Aug 13 09:16:26 BST 2019
zzag added inline comments.
INLINE COMMENTS
> gladhorn wrote in useractions.cpp:154-162
> I'm a bit unsure what you mean - the entire popup position trickery? I was wondering how much it's needed, but didn't want to break existing things. For now I assume the code is there for a reason - it seems to me that it want to move the popup high enough to not be positioned at the bottom in a way that it would be cut off. I'm not sure what Qt actually does... in theory I think it should move it up.
I don't see why we have to ensure that QMenu doesn't fall off screen. QMenu already does that for us. Besides that our code is incomplete(only one out of three cases is handled) and incorrect(`y + popupHeight >= area.height()` is wrong).
Remove `if (y != pos.top())` and everything that goes inside.
REPOSITORY
R108 KWin
REVISION DETAIL
https://phabricator.kde.org/D23102
To: gladhorn, #kwin, romangg, zzag
Cc: zzag, romangg, kwin, LeGast00n, 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/20190813/8fba137e/attachment-0001.html>
More information about the kwin
mailing list