diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d2ac0ec..ac79785d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,13 @@ Versioning](https://semver.org/spec/v2.0.0.html). - The `editor_double_embed` option added in yabridge 1.4.0 has been removed as the `editor_coordinate_hack` option supersedes it. +### Fixed + +- Fixed the drag-and-drop implementation now sending an `XdndStatus` message on + the very first tick. This fixes drag-and-drop from _Samplab_ which has a + broken drag-and-drop implementation and only starts the operation after the + left mouse button has already been released. + ### Packaging notes - We now target VST3 SDK version 3.7.3 with git tag `v3.7.3_build_20-patched`. diff --git a/src/wine-host/xdnd-proxy.cpp b/src/wine-host/xdnd-proxy.cpp index aa34414f..b9479888 100644 --- a/src/wine-host/xdnd-proxy.cpp +++ b/src/wine-host/xdnd-proxy.cpp @@ -457,19 +457,17 @@ void WineXdndProxy::run_xdnd_loop() { // window has not yet sent an `XdndStatus` reply to our last // `XdndPosition` message, then we need to spool this message and try // again on the next iteration. - if (last_xdnd_window) { - // XXX: We'll always stick with the copy action for now because that - // seems safer than allowing the host to move the file - const uint32_t position = - (xdnd_window_query->root_x << 16) | xdnd_window_query->root_y; - if (!waiting_for_status_message) { - send_xdnd_message(xdnd_window_query->child, - xcb_xdnd_position_message, 0, position, - XCB_CURRENT_TIME, xcb_xdnd_copy_action); - waiting_for_status_message = true; - } else { - next_position_message_position = position; - } + // XXX: We'll always stick with the copy action for now because that + // seems safer than allowing the host to move the file + const uint32_t position = + (xdnd_window_query->root_x << 16) | xdnd_window_query->root_y; + if (!waiting_for_status_message) { + send_xdnd_message(xdnd_window_query->child, + xcb_xdnd_position_message, 0, position, + XCB_CURRENT_TIME, xcb_xdnd_copy_action); + waiting_for_status_message = true; + } else { + next_position_message_position = position; } // For efficiency's sake we'll only flush all of the client messages