Make sure the Windows dnd operation terminates

I've seen a weird edge case where this doesn't happen once, but i
haven't been able to reproduce it. Hopefully this fixes it.
This commit is contained in:
Robbert van der Helm
2021-07-12 12:21:52 +02:00
parent 11d3ec9010
commit a478436af6
2 changed files with 27 additions and 7 deletions
+11 -3
View File
@@ -136,9 +136,9 @@ class WineXdndProxy {
* Initiate the XDDN protocol by taking ownership of the `XdndSelection`
* selection and setting up the event listeners.
*/
void begin_xdnd(
const boost::container::small_vector_base<boost::filesystem::path>&
file_paths);
void begin_xdnd(const boost::container::small_vector_base<
boost::filesystem::path>& file_paths,
HWND tracker_window);
/**
* Release ownership of the selection stop listening for X11 events.
@@ -240,6 +240,14 @@ class WineXdndProxy {
*/
std::string dragged_files_uri_list;
/**
* Wine's tracker window for tracking the drag-and-drop operation. When the
* XDND operation succeeds, we make sure to close this window to avoid the
* potential for weird race conditions where the plugin may still think
* we're doing drag-and-drop.
*/
HWND tracker_window;
/**
* We need to poll for mouse position changes from another thread, because
* when the drag-and-drop operation starts Wine will be blocking the GUI