|
8 | 8 |
|
9 | 9 | #include <qwayland-plugin-manager-v1.h> |
10 | 10 | #include <QtWaylandClient/private/qwaylandwindow_p.h> |
| 11 | +#include <wayland-client-protocol.h> |
11 | 12 |
|
12 | 13 | namespace Plugin { |
13 | 14 | PluginManagerIntegration::PluginManagerIntegration() |
@@ -48,6 +49,21 @@ void PluginManagerIntegration::requestMessage(const QString &plugin_id, const QS |
48 | 49 | request_message(plugin_id, item_key, msg); |
49 | 50 | } |
50 | 51 |
|
| 52 | +static const wl_callback_listener xembedWindowMovedListener = { |
| 53 | + [](void *data, struct wl_callback *callback, uint32_t time) { |
| 54 | + Q_UNUSED(time); |
| 55 | + wl_callback_destroy(callback); |
| 56 | + static_cast<PluginManagerIntegration*>(data)->xembedWindowMovedCallback(); |
| 57 | + } |
| 58 | +}; |
| 59 | + |
| 60 | +struct ::wl_callback *PluginManagerIntegration::moveXembedWindow(uint32_t xembedWinId, const QString &pluginId, const QString &itemKey) |
| 61 | +{ |
| 62 | + auto callback = move_xembed_window(xembedWinId, pluginId, itemKey); |
| 63 | + wl_callback_add_listener(callback, &xembedWindowMovedListener, this); |
| 64 | + return callback; |
| 65 | +} |
| 66 | + |
51 | 67 | void PluginManagerIntegration::plugin_manager_v1_position_changed(uint32_t dock_position) |
52 | 68 | { |
53 | 69 | if (dock_position != m_dockPosition) { |
@@ -89,6 +105,11 @@ void PluginManagerIntegration::plugin_manager_v1_theme_changed(const QString &th |
89 | 105 | PlatformInterfaceProxy::instance()->setIconThemeName(icon_theme_name.toLocal8Bit()); |
90 | 106 | } |
91 | 107 |
|
| 108 | +void PluginManagerIntegration::xembedWindowMovedCallback() |
| 109 | +{ |
| 110 | + emit xembedWindowMoved(); |
| 111 | +} |
| 112 | + |
92 | 113 | bool PluginManagerIntegration::tryCreatePopupForSubWindow(QWindow *window) |
93 | 114 | { |
94 | 115 | auto parentWindow = window->transientParent(); |
@@ -122,4 +143,5 @@ bool PluginManagerIntegration::tryCreatePopupForSubWindow(QWindow *window) |
122 | 143 |
|
123 | 144 | return false; |
124 | 145 | } |
| 146 | + |
125 | 147 | } |
0 commit comments