mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-06-19 18:03:56 +02:00
Add an X11 connection to the drag-and-drop proxy
This commit is contained in:
@@ -134,7 +134,8 @@ void CALLBACK dnd_winevent_callback(HWINEVENTHOOK /*hWinEventHook*/,
|
|||||||
}
|
}
|
||||||
|
|
||||||
WineXdndProxy::WineXdndProxy()
|
WineXdndProxy::WineXdndProxy()
|
||||||
: hook_handle(
|
: x11_connection(xcb_connect(nullptr, nullptr), xcb_disconnect),
|
||||||
|
hook_handle(
|
||||||
SetWinEventHook(EVENT_OBJECT_CREATE,
|
SetWinEventHook(EVENT_OBJECT_CREATE,
|
||||||
EVENT_OBJECT_CREATE,
|
EVENT_OBJECT_CREATE,
|
||||||
nullptr,
|
nullptr,
|
||||||
|
|||||||
@@ -18,6 +18,12 @@
|
|||||||
|
|
||||||
#include <memory>
|
#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>
|
#include <windows.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -45,6 +51,8 @@ class WineXdndProxy {
|
|||||||
static WineXdndProxy& init_proxy();
|
static WineXdndProxy& init_proxy();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
std::unique_ptr<xcb_connection_t, decltype(&xcb_disconnect)> x11_connection;
|
||||||
|
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wignored-attributes"
|
#pragma GCC diagnostic ignored "-Wignored-attributes"
|
||||||
std::unique_ptr<std::remove_pointer_t<HWINEVENTHOOK>,
|
std::unique_ptr<std::remove_pointer_t<HWINEVENTHOOK>,
|
||||||
|
|||||||
Reference in New Issue
Block a user