[wayland] Sync resizes

Similar to X11 world: we send a sync request on each size change and
block till we get the next damage with the proper size.

Testing seems to show a very smooth resize experience. We automatically
sync to the resize speed of the client.

Maybe we need a timeout in case the client isn't able to resize to the
requested size.
master
Martin Gräßlin 9 years ago
parent a23a9d38f9
commit 89a4df651d

@ -739,4 +739,14 @@ QPoint ShellClient::transientPlacementHint() const
return m_shellSurface->transientOffset();
}
bool ShellClient::isWaitingForMoveResizeSync() const
{
return m_positionAfterResize.isValid();
}
void ShellClient::doResizeSync()
{
requestGeometry(moveResizeGeometry());
}
}

@ -122,6 +122,8 @@ protected:
void setGeometryRestore(const QRect &geo) override {
m_geomMaximizeRestore = geo;
}
void doResizeSync() override;
bool isWaitingForMoveResizeSync() const override;
private Q_SLOTS:
void clientFullScreenChanged(bool fullScreen);

@ -206,7 +206,7 @@ static inline int bitCount(uint32_t mask)
class ClearablePoint
{
public:
inline bool isValid() {
inline bool isValid() const {
return m_valid;
}

Loading…
Cancel
Save