spawn_window.c
static void sendXdndPosition(Display *disp, Window source, Window target, int time, int p_rootX, int p_rootY)
{
	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 = XdndPosition;
		message.xclient.format = 32;
		message.xclient.data.l[0] = source;
		//message.xclient.data.l[1] reserved
		message.xclient.data.l[2] = p_rootX << 16 | p_rootY;
		message.xclient.data.l[3] = time;
		message.xclient.data.l[4] = XdndActionCopy;

		// Send it to target window
		if (XSendEvent(disp, target, False, 0, &message) == 0)
			philError("XSendEvent");
	}
}
// This sends the XdndPosition messages, which update the target on the state of the cursor
// and selected action
This sends the XdndPosition messages, which update the target on the state of the cursor
and selected action
This sends the XdndPosition messages which update the target on the state of the cursor and selected action
static void sendXdndPosition(Display *disp, Window source, Window target, int time, int p_rootX, int p_rootY)
{
	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 = XdndPosition;
		message.xclient.format = 32;
		message.xclient.data.l[0] = source;
		message.xclient.data.l[2] = p_rootX << 16 | p_rootY;
		message.xclient.data.l[3] = time;
		message.xclient.data.l[4] = XdndActionCopy;
		if (XSendEvent(disp, target, False, 0, &message) == 0)
			philError("XSendEvent");
	}
}
static void sendXdndPosition ( Display * disp , Window source , Window target , int time , int p_rootX , int p_rootY ) { 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 = XdndPosition ; message . xclient . format = 32 ; message . xclient . data . l [ 0 ] = source ; message . xclient . data . l [ 2 ] = p_rootX << 16 | p_rootY ; message . xclient . data . l [ 3 ] = time ; message . xclient . data . l [ 4 ] = XdndActionCopy ; if ( XSendEvent ( disp , target , False , 0 , & message ) == 0 ) philError ( " " ) ; } }
This sends the XdndPosition messages, which update the target on the state of the cursor
and selected action
This sends the XdndPosition messages which update the target on the state of the cursor and selected action
// Declare message struct and populate its values //message.xclient.data.l[1] reserved // Send it to target window