spawn_window.c
static void sendXdndDrop(Display *disp, Window source, Window target)
{
	if (xdndState.xdndExchangeStarted && xdndState.amISource) {
		// Declare message struct and populate its values
		XEvent message;
		memset(&message, 0, sizeof(message));
		message.xclient.type = ClientMessage;
		message.xclient.display = disp;
		message.xclient.window = target;
		message.xclient.message_type = XdndDrop;
		message.xclient.format = 32;
		message.xclient.data.l[0] = source;
		//message.xclient.data.l[1] reserved
		message.xclient.data.l[2] = xdndState.xdndLastPositionTimestamp;

		// Send it to target window
		if (XSendEvent(disp, target, False, 0, &message) == 0)
			philError("XSendEvent");
	}
}
// This is sent by the source to the target to say it can call XConvertSelection
This is sent by the source to the target to say it can call XConvertSelection
This is sent by the source to the target to say it can call XConvertSelection
static void sendXdndDrop(Display *disp, Window source, Window target)
{
	if (xdndState.xdndExchangeStarted && xdndState.amISource) {
		XEvent message;
		memset(&message, 0, sizeof(message));
		message.xclient.type = ClientMessage;
		message.xclient.display = disp;
		message.xclient.window = target;
		message.xclient.message_type = XdndDrop;
		message.xclient.format = 32;
		message.xclient.data.l[0] = source;
		message.xclient.data.l[2] = xdndState.xdndLastPositionTimestamp;
		if (XSendEvent(disp, target, False, 0, &message) == 0)
			philError("XSendEvent");
	}
}
static void sendXdndDrop ( Display * disp , Window source , Window target ) { if ( xdndState . xdndExchangeStarted && xdndState . amISource ) { XEvent message ; memset ( & message , 0 , sizeof ( message ) ) ; message . xclient . type = ClientMessage ; message . xclient . display = disp ; message . xclient . window = target ; message . xclient . message_type = XdndDrop ; message . xclient . format = 32 ; message . xclient . data . l [ 0 ] = source ; message . xclient . data . l [ 2 ] = xdndState . xdndLastPositionTimestamp ; if ( XSendEvent ( disp , target , False , 0 , & message ) == 0 ) philError ( " " ) ; } }
This is sent by the source to the target to say it can call XConvertSelection
This is sent by the source to the target to say it can call XConvertSelection
// Declare message struct and populate its values //message.xclient.data.l[1] reserved // Send it to target window