D15135: [wayland] Syncronise pending geometry with acked configure requests
Roman Gilg <[email protected]>
| Newsgroups | gmane.comp.kde.devel.kwin |
|---|---|
| Message-ID | <[email protected]> |
romangg added inline comments.
INLINE COMMENTS
> davidedmundson wrote in shell_client.cpp:1210
> Do you mean something like
>
> QPoint position = geom.topLeft();
> it = m_pendingConfigureRequests.begin();
> while (it != m_pendingConfigureRequests.end()) {
> if (it->serialId == m_lastAckedConfigureRequest) {
> if (position != it->positionAfterResize) {
> addLayerRepaint(geometry());
> }
> position = it->positionAfterResize;
>
> m_pendingConfigureRequests.erase(m_pendingConfigureRequests.begin(), it);
> break;
> }
> it++;
> }
> doSetGeometry(QRect(position, m_clientSize + QSize(borderLeft() + borderRight(), borderTop() + borderBottom())));
>
> ?
Yes. Use it++ in the erase statement to also erase the last acked one. Also there should still be an early loop exit in case the last acked configure request is lower and a cleanup in case the client does never send acks or acks without correct serials. Otherwise the vector can grow quickly.
REPOSITORY
R108 KWin
REVISION DETAIL
https://phabricator.kde.org/D15135
To: davidedmundson, #kwin, romangg
Cc: romangg, kwin, mkulinski, ragreen, jackyalcine, Pitel, iodelay, bwowk, ZrenBot, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart