mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-10 04:30:12 +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()
|
||||
: hook_handle(
|
||||
: x11_connection(xcb_connect(nullptr, nullptr), xcb_disconnect),
|
||||
hook_handle(
|
||||
SetWinEventHook(EVENT_OBJECT_CREATE,
|
||||
EVENT_OBJECT_CREATE,
|
||||
nullptr,
|
||||
|
||||
@@ -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>,
|
||||
|
||||
Reference in New Issue
Block a user