From ad4fb1a0ec7c4620b9d9b50d7e6adcf042f1f421 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Mon, 12 Jul 2021 13:35:10 +0200 Subject: [PATCH] Don't define X11 error throwing macro in DND proxy We didn't need this after all because we don't integrate with the editor's X11 event loop. --- src/wine-host/xdnd-proxy.cpp | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/src/wine-host/xdnd-proxy.cpp b/src/wine-host/xdnd-proxy.cpp index 5be44ff0..15dbe52a 100644 --- a/src/wine-host/xdnd-proxy.cpp +++ b/src/wine-host/xdnd-proxy.cpp @@ -25,16 +25,6 @@ using namespace std::literals::chrono_literals; namespace fs = boost::filesystem; -// As defined in `editor.cpp` -#define THROW_X11_ERROR(error) \ - do { \ - if (error) { \ - free(error); \ - throw std::runtime_error("X11 error in " + \ - std::string(__PRETTY_FUNCTION__)); \ - } \ - } while (0) - /** * The window class name Wine uses for its `DoDragDrop()` tracker window. * @@ -528,9 +518,9 @@ void WineXdndProxy::run_xdnd_loop() { // We May very well still have one unsent position change left maybe_send_spooled_status_message(); + // After we receive the last `XdndStatus` message we'll know whether the + // window accepts or denies the drop if (!waiting_for_status_message) { - // After we receive the last `XdndStatus` message we'll know - // whether the window accepts or denies the drop if (last_window_accepted_status) { send_xdnd_message(*last_xdnd_window, xcb_xdnd_drop_message, 0, XCB_CURRENT_TIME, 0, 0); @@ -867,5 +857,3 @@ void CALLBACK dnd_winevent_callback(HWINEVENTHOOK /*hWinEventHook*/, std::cerr << error.what() << std::endl; } } - -#undef THROW_X11_ERROR