[plasma/kwayland] src/client: Add support for wl_fixes.ack_global_remove
Vlad Zahorodnii <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit 9115224d3ed5e78803e4c97900a8205d2b7af1ef by Vlad Zahorodnii.
Committed on 22/07/2026 at 09:44.
Pushed by vladz into branch 'master'.
Add support for wl_fixes.ack_global_remove
M +7 -1 src/client/registry.cpp
https://invent.kde.org/plasma/kwayland/-/commit/9115224d3ed5e78803e4c97900a8205d2b7af1ef
diff --git a/src/client/registry.cpp b/src/client/registry.cpp
index e9638828..796c9182 100644
--- a/src/client/registry.cpp
+++ b/src/client/registry.cpp
@@ -496,7 +496,7 @@ void Registry::Private::handleAnnounce(uint32_t name, const char *interface, uin
{
Interface i = nameToInterface(interface);
if (qstrcmp(interface, wl_fixes_interface.name) == 0) {
- fixes.setup(reinterpret_cast<wl_fixes *>(wl_registry_bind(registry, name, &wl_fixes_interface, 1)));
+ fixes.setup(reinterpret_cast<wl_fixes *>(wl_registry_bind(registry, name, &wl_fixes_interface, std::min(version, 2u))));
if (queue) {
queue->addProxy(fixes);
}
@@ -529,6 +529,12 @@ void Registry::Private::handleRemove(uint32_t name)
}
}
Q_EMIT q->interfaceRemoved(name);
+
+#ifdef WL_FIXES_ACK_GLOBAL_REMOVE
+ if (fixes && wl_fixes_get_version(fixes) >= WL_FIXES_ACK_GLOBAL_REMOVE_SINCE_VERSION) {
+ wl_fixes_ack_global_remove(fixes, registry, name);
+ }
+#endif
}
bool Registry::Private::hasInterface(Registry::Interface interface) const