Commit 3987c0ae authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

Properly handle destruction of XdgOutputV1Interface

The xdg-output spec omits whether the compositor has to destroy all xdg-
output resources when the associated wl_output global is removed.

This means that no xdg-output resource should be destroyed unless the
client has called the destructor request; otherwise the client may panic
due to protocol errors.

Starting with Qt 5.15.2, it's okay to destroy generated wrapper objects
without destroying associated resources. Destructor requests will be
handled behind the scenes for inert and orphaned resources by code that
is generated by qtwaylandscanner.

BUG: 426293
parent a0c32a25
......@@ -108,6 +108,9 @@ XdgOutputV1Interface::XdgOutputV1Interface(QObject *parent)
// Starting from 5.15.2, qtwaylandscanner properly handles destruction of inert/orphaned resources.
// Generated code typically cleans up resource objects when the client calls the relevant destructor
// In multi-cast mode our wrapper can be deleted at any time whilst a client resource exists.
// any existing resources that have a pending message will then crash the compositor.
......@@ -118,7 +121,7 @@ XdgOutputV1Interface::~XdgOutputV1Interface()
void XdgOutputV1Interface::setLogicalSize(const QSize &size)
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