Add an X11 connection to the drag-and-drop proxy

This commit is contained in:
Robbert van der Helm
2021-07-10 00:09:06 +02:00
parent b3001cc22b
commit b1e3488a24
2 changed files with 10 additions and 1 deletions
+2 -1
View File
@@ -134,7 +134,8 @@ void CALLBACK dnd_winevent_callback(HWINEVENTHOOK /*hWinEventHook*/,
}
WineXdndProxy::WineXdndProxy()
: hook_handle(
: x11_connection(xcb_connect(nullptr, nullptr), xcb_disconnect),
hook_handle(
SetWinEventHook(EVENT_OBJECT_CREATE,
EVENT_OBJECT_CREATE,
nullptr,
+8
View File
@@ -18,6 +18,12 @@
#include <memory>
// Use the native version of xcb
#pragma push_macro("_WIN32")
#undef _WIN32
#include <xcb/xcb.h>
#pragma pop_macro("_WIN32")
#include <windows.h>
/**
@@ -45,6 +51,8 @@ class WineXdndProxy {
static WineXdndProxy& init_proxy();
private:
std::unique_ptr<xcb_connection_t, decltype(&xcb_disconnect)> x11_connection;
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wignored-attributes"
std::unique_ptr<std::remove_pointer_t<HWINEVENTHOOK>,