mirror of
https://invent.kde.org/plasma/layer-shell-qt.git
synced 2025-07-18 21:14:26 -04:00
Port to asynchronous roundtrip
When a resize is driven client side we wait for the compositor to have a chance to reconfigure us before submitting the next frame. Using a blocking round trip caused an issue. Instead block isExposed and trigger an expose event whilst a sync is in progress.
This commit is contained in:
@ -30,7 +30,7 @@ public:
|
||||
|
||||
bool isExposed() const override
|
||||
{
|
||||
return m_configured;
|
||||
return m_configured && !m_waitForSyncCallback;
|
||||
}
|
||||
void attachPopup(QtWaylandClient::QWaylandShellSurface *popup) override;
|
||||
|
||||
@ -49,6 +49,9 @@ public:
|
||||
void requestXdgActivationToken(quint32 serial) override;
|
||||
|
||||
private:
|
||||
void requestWaylandSync();
|
||||
void handleWaylandSyncDone();
|
||||
void sendExpose();
|
||||
void zwlr_layer_surface_v1_configure(uint32_t serial, uint32_t width, uint32_t height) override;
|
||||
void zwlr_layer_surface_v1_closed() override;
|
||||
|
||||
@ -57,7 +60,11 @@ private:
|
||||
QtWaylandClient::QWaylandWindow *m_window;
|
||||
QSize m_pendingSize;
|
||||
QString m_activationToken;
|
||||
|
||||
bool m_configured = false;
|
||||
|
||||
static const wl_callback_listener syncCallbackListener;
|
||||
struct wl_callback *m_waitForSyncCallback = nullptr;
|
||||
};
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user