mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-10 04:30:12 +02:00
Fetch basic atoms for XDND
This commit is contained in:
@@ -22,13 +22,20 @@
|
|||||||
#include "boost-fix.h"
|
#include "boost-fix.h"
|
||||||
|
|
||||||
#include <boost/container/small_vector.hpp>
|
#include <boost/container/small_vector.hpp>
|
||||||
|
#include "editor.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The window class name Wine uses for its `DoDragDrop()` tracker window.
|
* The window class name Wine uses for its `DoDragDrop()` tracker window.
|
||||||
*
|
*
|
||||||
* https://github.com/wine-mirror/wine/blob/d10887b8f56792ebcca717ccc28a289f7bcaf107/dlls/ole32/ole2.c#L101-L104
|
* https://github.com/wine-mirror/wine/blob/d10887b8f56792ebcca717ccc28a289f7bcaf107/dlls/ole32/ole2.c#L101-L104
|
||||||
*/
|
*/
|
||||||
static constexpr char OLEDD_DRAGTRACKERCLASS[] = "WineDragDropTracker32";
|
constexpr char OLEDD_DRAGTRACKERCLASS[] = "WineDragDropTracker32";
|
||||||
|
|
||||||
|
// These are the XDND atom names as described in
|
||||||
|
// https://www.freedesktop.org/wiki/Specifications/XDND/#atomsandproperties
|
||||||
|
constexpr char xdnd_selection_name[] = "XdndSelection";
|
||||||
|
constexpr char xdnd_aware_property_name[] = "XdndAware";
|
||||||
|
constexpr char xdnd_proxy_property_name[] = "XdndProxy";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* We're doing a bit of a hybrid between a COM-style reference counted smart
|
* We're doing a bit of a hybrid between a COM-style reference counted smart
|
||||||
@@ -102,7 +109,15 @@ WineXdndProxy::WineXdndProxy()
|
|||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
WINEVENT_OUTOFCONTEXT | WINEVENT_SKIPOWNPROCESS),
|
WINEVENT_OUTOFCONTEXT | WINEVENT_SKIPOWNPROCESS),
|
||||||
UnhookWinEvent) {}
|
UnhookWinEvent) {
|
||||||
|
// XDND uses a whole load of atoms for its messages, properties, and
|
||||||
|
// selections
|
||||||
|
xcb_xdnd_selection = get_atom_by_name(*x11_connection, xdnd_selection_name);
|
||||||
|
xcb_xdnd_aware_property =
|
||||||
|
get_atom_by_name(*x11_connection, xdnd_aware_property_name);
|
||||||
|
xcb_xdnd_proxy_property =
|
||||||
|
get_atom_by_name(*x11_connection, xdnd_proxy_property_name);
|
||||||
|
}
|
||||||
|
|
||||||
WineXdndProxy::Handle::Handle(WineXdndProxy* proxy) : proxy(proxy) {}
|
WineXdndProxy::Handle::Handle(WineXdndProxy* proxy) : proxy(proxy) {}
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,8 @@
|
|||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
|
#include "boost-fix.h"
|
||||||
|
|
||||||
// Use the native version of xcb
|
// Use the native version of xcb
|
||||||
#pragma push_macro("_WIN32")
|
#pragma push_macro("_WIN32")
|
||||||
#undef _WIN32
|
#undef _WIN32
|
||||||
@@ -159,4 +161,10 @@ class WineXdndProxy {
|
|||||||
std::decay_t<decltype(&UnhookWinEvent)>>
|
std::decay_t<decltype(&UnhookWinEvent)>>
|
||||||
hook_handle;
|
hook_handle;
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
|
|
||||||
|
// These are the atoms used for the XDND protocol, as described by
|
||||||
|
// https://www.freedesktop.org/wiki/Specifications/XDND/#atomsandproperties
|
||||||
|
xcb_atom_t xcb_xdnd_selection;
|
||||||
|
xcb_atom_t xcb_xdnd_aware_property;
|
||||||
|
xcb_atom_t xcb_xdnd_proxy_property;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user