spawn_window.c
static void sendXdndStatus(Display *disp, Window source, Window target, Atom action)
{
	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 = XdndStatus;
		message.xclient.format = 32;
		message.xclient.data.l[0] = source;
		message.xclient.data.l[1] = 1; // Sets accept and want position flags

		// Send back window rectangle coordinates and width
		message.xclient.data.l[2] = 0;
		message.xclient.data.l[3] = 0;

		// Specify action we accept
		message.xclient.data.l[4] = action;

		// Send it to target window
		if (XSendEvent(disp, target, False, 0, &message) == 0)
			philError("XSendEvent");
	}
}
// This is sent by the target to the source to say whether or not it will accept the drop
This is sent by the target to the source to say whether or not it will accept the drop
This is sent by the target to the source to say whether or not it will accept the drop
static void sendXdndStatus(Display *disp, Window source, Window target, Atom action)
{
	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 = XdndStatus;
		message.xclient.format = 32;
		message.xclient.data.l[0] = source;
		message.xclient.data.l[1] = 1; 
		message.xclient.data.l[2] = 0;
		message.xclient.data.l[3] = 0;
		message.xclient.data.l[4] = action;
		if (XSendEvent(disp, target, False, 0, &message) == 0)
			philError("XSendEvent");
	}
}
static void sendXdndStatus ( Display * disp , Window source , Window target , Atom action ) { 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 = XdndStatus ; message . xclient . format = 32 ; message . xclient . data . l [ 0 ] = source ; message . xclient . data . l [ 1 ] = 1 ; message . xclient . data . l [ 2 ] = 0 ; message . xclient . data . l [ 3 ] = 0 ; message . xclient . data . l [ 4 ] = action ; if ( XSendEvent ( disp , target , False , 0 , & message ) == 0 ) philError ( " " ) ; } }
This is sent by the target to the source to say whether or not it will accept the drop
This is sent by the target to the source to say whether or not it will accept the drop
// Declare message struct and populate its values // Sets accept and want position flags // Send back window rectangle coordinates and width // Specify action we accept // Send it to target window