diff --git a/src/wine-host/editor.cpp b/src/wine-host/editor.cpp index 788983ac..ad3805b0 100644 --- a/src/wine-host/editor.cpp +++ b/src/wine-host/editor.cpp @@ -202,7 +202,7 @@ Editor::Editor(MainContext& main_context, std::optional> timer_proc) : use_xembed(config.editor_xembed), x11_connection(xcb_connect(nullptr, nullptr), xcb_disconnect), - dnd_proxy_handle(WineXdndProxy::init_proxy()), + dnd_proxy_handle(WineXdndProxy::get_handle()), client_area(get_maximum_screen_dimensions(*x11_connection)), // Create a window without any decoratiosn for easy embedding. The // combination of `WS_EX_TOOLWINDOW` and `WS_POPUP` causes the window to @@ -365,7 +365,7 @@ Editor::Editor(MainContext& main_context, // Set up our proxy for translating Wine drag-and-drop events into XDND // events // TODO: We're going to need to store this somewhere to pass the events - WineXdndProxy::init_proxy(); + WineXdndProxy::get_handle(); } void Editor::handle_x11_events() const noexcept { diff --git a/src/wine-host/xdnd-proxy.cpp b/src/wine-host/xdnd-proxy.cpp index 65e8a89e..6c6c19e3 100644 --- a/src/wine-host/xdnd-proxy.cpp +++ b/src/wine-host/xdnd-proxy.cpp @@ -180,7 +180,8 @@ void CALLBACK dnd_winevent_callback(HWINEVENTHOOK /*hWinEventHook*/, // This shouldn't be possible, but you can never be too sure! if (instance_reference_count <= 0 || !instance) { - std::cerr << "Drag-and-drop proxy wasn't initialized yet" << std::endl; + std::cerr << "Drag-and-drop proxy has not yet been initialized" + << std::endl; return; } } @@ -213,7 +214,7 @@ WineXdndProxy::Handle::Handle(Handle&& o) noexcept : proxy(o.proxy) { instance_reference_count += 1; } -WineXdndProxy::Handle WineXdndProxy::init_proxy() { +WineXdndProxy::Handle WineXdndProxy::get_handle() { // See the `instance` global above for an explanation on what's going on // here. if (instance_reference_count.fetch_add(1) == 0) { diff --git a/src/wine-host/xdnd-proxy.h b/src/wine-host/xdnd-proxy.h index 99527f41..e50522a3 100644 --- a/src/wine-host/xdnd-proxy.h +++ b/src/wine-host/xdnd-proxy.h @@ -90,7 +90,7 @@ class WineXdndProxy { * @note This function, like everything other GUI realted, should be called * from the main thread that's running the Win32 message loop. */ - static WineXdndProxy::Handle init_proxy(); + static WineXdndProxy::Handle get_handle(); private: std::unique_ptr x11_connection;