You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
plasma-workspace/0005-xembed-sni-proxy-Add-M...

48 lines
1.6 KiB

From 4ade115a1248cc3c1128a3d10982429ab76cf8f8 Mon Sep 17 00:00:00 2001
From: David Redondo <kde@david-redondo.de>
Date: Mon, 28 Jun 2021 15:56:55 +0200
Subject: [PATCH 5/7] xembed-sni-proxy: Add Menu property
Because we did not have this property the adaptor used a default
constructed empty path. An empty path is invalid though and Qt
would refuse to marshall it.
Unconditionally advertise '/' as the menu path even though we don't have
one. Callers looking for a menu there will receive an error that there's
not the interface that they expected at the path.
BUG:439229
FIXED-IN:5.22.3
(cherry picked from commit b9de2c8546874efcc993913bd55d0ef252b866a8)
---
xembed-sni-proxy/sniproxy.h | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/xembed-sni-proxy/sniproxy.h b/xembed-sni-proxy/sniproxy.h
index 732eb3e6a..967ee0bd3 100644
--- a/xembed-sni-proxy/sniproxy.h
+++ b/xembed-sni-proxy/sniproxy.h
@@ -44,6 +44,7 @@ class SNIProxy : public QObject
Q_PROPERTY(int WindowId READ WindowId)
Q_PROPERTY(bool ItemIsMenu READ ItemIsMenu)
Q_PROPERTY(KDbusImageVector IconPixmap READ IconPixmap)
+ Q_PROPERTY(QDBusObjectPath Menu READ menu CONSTANT)
public:
explicit SNIProxy(xcb_window_t wid, QObject *parent = nullptr);
@@ -52,7 +53,10 @@ public:
void update();
void resizeWindow(const uint16_t width, const uint16_t height) const;
void hideContainerWindow(xcb_window_t windowId) const;
-
+ QDBusObjectPath menu() const
+ {
+ return QDBusObjectPath("/");
+ }
/**
* @return the category of the application associated to this item
* @see Category
--
2.31.1