Skip to content

Commit b90a156

Browse files
committed
wip: doesn't seem right
1 parent 70415b5 commit b90a156

5 files changed

Lines changed: 11 additions & 45 deletions

File tree

src/protocol/plugin-manager-v1.xml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -118,21 +118,9 @@
118118
<arg name="xembed_winid" type="int"/>
119119
<arg name="plugin_id" type="string"/>
120120
<arg name="item_key" type="string"/>
121-
<arg name="callback" type="new_id" interface="plugin_manager_callback_v1"/>
121+
<arg name="callback" type="new_id" interface="wl_callback"/>
122122
</request>
123123
</interface>
124-
<interface name="plugin_manager_callback_v1" version="1">
125-
<description summary="callback for plugin manager operations">
126-
This interface is used for receiving completion notifications for asynchronous operations.
127-
</description>
128-
<request name="destroy" type="destructor">
129-
</request>
130-
<event name="done">
131-
<description summary="operation completed">
132-
This event indicates that the requested operation has been completed by the compositor.
133-
</description>
134-
</event>
135-
</interface>
136124
<interface name="plugin_popup" version="1">
137125
<request name="destroy" type="destructor">
138126
</request>

src/tray-wayland-integration/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ if(Qt${QT_VERSION_MAJOR}_VERSION VERSION_GREATER_EQUAL 6.10)
77
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS GuiPrivate WaylandClientPrivate REQUIRED)
88
endif()
99
find_package(Dtk${DTK_VERSION_MAJOR} REQUIRED COMPONENTS Gui Widget)
10+
pkg_search_module(WaylandClient REQUIRED IMPORTED_TARGET wayland-client)
1011

1112
find_package(ECM REQUIRED MO_MODULE)
1213
set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${ECM_MODULE_PATH}")
@@ -53,6 +54,7 @@ PRIVATE
5354
Qt${QT_VERSION_MAJOR}::WaylandClient
5455
Qt${QT_VERSION_MAJOR}::WaylandClientPrivate
5556
Wayland::Client
57+
PkgConfig::WaylandClient
5658
)
5759

5860
set_target_properties(dockpluginmanager PROPERTIES

src/tray-wayland-integration/pluginmanagerintegration.cpp

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
#include "plugin.h"
77
#include "pluginsurface_p.h"
88

9+
#include <wayland-client-protocol.h>
10+
#include <private/qwayland-wayland.h>
911
#include <qwayland-plugin-manager-v1.h>
1012
#include <QtWaylandClient/private/qwaylandwindow_p.h>
1113

@@ -48,10 +50,9 @@ void PluginManagerIntegration::requestMessage(const QString &plugin_id, const QS
4850
request_message(plugin_id, item_key, msg);
4951
}
5052

51-
PluginManagerCallback *PluginManagerIntegration::moveXembedWindow(uint32_t xembedWinId, const QString &pluginId, const QString &itemKey)
53+
struct ::wl_callback *PluginManagerIntegration::moveXembedWindow(uint32_t xembedWinId, const QString &pluginId, const QString &itemKey)
5254
{
53-
auto callback = new PluginManagerCallback();
54-
move_xembed_window(xembedWinId, pluginId, itemKey);
55+
auto callback = move_xembed_window(xembedWinId, pluginId, itemKey);
5556
return callback;
5657
}
5758

@@ -130,17 +131,4 @@ bool PluginManagerIntegration::tryCreatePopupForSubWindow(QWindow *window)
130131
return false;
131132
}
132133

133-
PluginManagerCallback::PluginManagerCallback()
134-
{
135-
}
136-
137-
PluginManagerCallback::~PluginManagerCallback()
138-
{
139-
}
140-
141-
void PluginManagerCallback::plugin_manager_callback_v1_done()
142-
{
143-
Q_EMIT done();
144-
}
145-
146134
}

src/tray-wayland-integration/pluginmanagerintegration_p.h

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
#pragma once
66

77
#include "qwayland-plugin-manager-v1.h"
8+
#include <wayland-client-protocol.h>
89

910
#include <QtWaylandClient/private/qwaylandshellintegration_p.h>
1011

1112
namespace Plugin {
12-
class PluginManagerCallback;
1313
class PluginManagerIntegration : public QtWaylandClient::QWaylandShellIntegrationTemplate<PluginManagerIntegration>, public QtWayland::plugin_manager_v1
1414
{
1515
Q_OBJECT
@@ -21,7 +21,7 @@ class PluginManagerIntegration : public QtWaylandClient::QWaylandShellIntegratio
2121

2222
public:
2323
void requestMessage(const QString &plugin_id, const QString &item_key, const QString &msg);
24-
PluginManagerCallback *moveXembedWindow(uint32_t xembedWinId, const QString &pluginId, const QString &itemKey);
24+
struct ::wl_callback *moveXembedWindow(uint32_t xembedWinId, const QString &pluginId, const QString &itemKey);
2525

2626
Q_SIGNALS:
2727
void eventMessage(const QString &msg);
@@ -45,18 +45,4 @@ class PluginManagerIntegration : public QtWaylandClient::QWaylandShellIntegratio
4545
static PluginManagerIntegration *s_instance;
4646
};
4747

48-
class PluginManagerCallback : public QObject, public QtWayland::plugin_manager_callback_v1
49-
{
50-
Q_OBJECT
51-
public:
52-
PluginManagerCallback();
53-
~PluginManagerCallback();
54-
55-
Q_SIGNALS:
56-
void done();
57-
58-
protected:
59-
void plugin_manager_callback_v1_done() override;
60-
};
61-
6248
}

src/tray-wayland-integration/pluginsurface_p.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
#pragma once
66

77
#include "plugin.h"
8+
9+
#include <wayland-client-protocol.h>
810
#include "qwayland-plugin-manager-v1.h"
911

1012
#include <QtWaylandClient/private/qwaylandshellsurface_p.h>

0 commit comments

Comments
 (0)