Commit a244769a authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

Make layer-surface acknowledged configure serials double-buffered state

This will be needed to delay surface commits.
parent c5691ba4
......@@ -45,6 +45,8 @@ public:
QMargins margins;
QSize desiredSize = QSize(0, 0);
int exclusiveZone = 0;
quint32 acknowledgedConfigure;
bool acknowledgedConfigureIsSet = false;
bool acceptsFocus = false;
};
......@@ -241,7 +243,8 @@ void LayerSurfaceV1InterfacePrivate::zwlr_layer_surface_v1_ack_configure(Resourc
}
}
if (!isClosed) {
Q_EMIT q->configureAcknowledged(serial);
pending.acknowledgedConfigure = serial;
pending.acknowledgedConfigureIsSet = true;
}
}
......@@ -266,6 +269,12 @@ void LayerSurfaceV1InterfacePrivate::commit()
return;
}
if (pending.acknowledgedConfigureIsSet) {
current.acknowledgedConfigure = pending.acknowledgedConfigure;
pending.acknowledgedConfigureIsSet = false;
Q_EMIT q->configureAcknowledged(pending.acknowledgedConfigure);
}
if (Q_UNLIKELY(surface->isMapped() && !isConfigured)) {
wl_resource_post_error(resource()->handle, error_invalid_surface_state,
"a buffer has been attached to a layer surface prior "
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment