[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.
This commit is contained in:
parent
a23a9d38f9
commit
89a4df651d
3 changed files with 13 additions and 1 deletions
|
@ -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);
|
||||
|
|
2
utils.h
2
utils.h
|
@ -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…
Reference in a new issue