Spawn a thread to fake do our XDND polling

We cannot integrate this into our event loop like we planned, because
Wine a) grabs the mouse pointer so we cannot do that, and b) blocks the
GUI thread. So instead we will spawn our own thread and do polling based
XDND. When Wine's tracker window gets destroyed, we know that the left
mouse button has been released.
This commit is contained in:
Robbert van der Helm
2021-07-10 19:28:40 +02:00
parent 42ce69943a
commit 091ab0f0df
4 changed files with 161 additions and 30 deletions
+6
View File
@@ -33,6 +33,12 @@
#include "utils.h"
#include "xdnd-proxy.h"
/**
* The most significant bit in an X11 event's response type is used to indicate
* the event source.
*/
constexpr uint8_t xcb_event_type_mask = 0b0111'1111;
/**
* The maximum number of Win32 messages to handle per message loop. This is
* needed because otherwise some plugins can run into an infinite loop. I've