static Eina_Bool _ecore_xcb_dnd_converter_copy(char *target __UNUSED__, void *data, int size, void **data_ret, int *size_ret, Ecore_X_Atom *tprop __UNUSED__, int *count __UNUSED__);
/* local variables */
-static int _ecore_xcb_dnd_init_count;
+static int _ecore_xcb_dnd_init_count = 0;
static Ecore_X_DND_Source *_source = NULL;
static Ecore_X_DND_Target *_target = NULL;
static Version_Cache_Item *_version_cache = NULL;
if (_target->state == ECORE_X_DND_TARGET_IDLE) return;
+ DBG("Ecore_X_Dnd_Send_Status");
memset(&ev, 0, sizeof(xcb_client_message_event_t));
_target->will_accept = will_accept;
memset(&ev, 0, sizeof(xcb_client_message_event_t));
+ DBG("Ecore_X_Dnd_Drop");
if (_source->dest)
{
ev.response_type = XCB_CLIENT_MESSAGE;
ev.format = 32;
ev.window = _source->dest;
- ev.data.data32[0] = _source->win;
- ev.data.data32[1] = 0;
if (_source->will_accept)
{
ev.type = ECORE_X_ATOM_XDND_DROP;
+ ev.data.data32[0] = _source->win;
+ ev.data.data32[1] = 0;
ev.data.data32[2] = _source->time;
xcb_send_event(_ecore_xcb_conn, 0, _source->dest,
else
{
ev.type = ECORE_X_ATOM_XDND_LEAVE;
+ ev.data.data32[0] = _source->win;
+ ev.data.data32[1] = 0;
+
xcb_send_event(_ecore_xcb_conn, 0, _source->dest,
XCB_EVENT_MASK_NO_EVENT, (const char *)&ev);
ecore_x_flush();
LOGFN(__FILE__, __LINE__, __FUNCTION__);
+ DBG("Ecore_X_Dnd_Aware_Set");
if (on)
ecore_x_window_prop_property_set(win, ECORE_X_ATOM_XDND_AWARE,
ECORE_X_ATOM_ATOM, 32, &prop_data, 1);
LOGFN(__FILE__, __LINE__, __FUNCTION__);
+ DBG("Ecore_X_Dnd_Type_Set");
atom = ecore_x_atom_get(type);
ecore_x_window_prop_property_get(win, ECORE_X_ATOM_XDND_TYPE_LIST,
ECORE_X_ATOM_ATOM, 32, &old_data, &num);
LOGFN(__FILE__, __LINE__, __FUNCTION__);
+ DBG("Ecore_X_Dnd_Types_Set");
if (!num_types)
ecore_x_window_prop_property_del(win, ECORE_X_ATOM_XDND_TYPE_LIST);
else
LOGFN(__FILE__, __LINE__, __FUNCTION__);
+ DBG("Ecore_X_Dnd_Actions_Set");
if (!num_actions)
ecore_x_window_prop_property_del(win, ECORE_X_ATOM_XDND_ACTION_LIST);
else
if (!ecore_x_dnd_version_get(source)) return EINA_FALSE;
+ DBG("Ecore_X_Dnd_Begin");
/* Take ownership of XdndSelection */
if (!ecore_x_selection_xdnd_set(source, data, size)) return EINA_FALSE;
if (_target->state == ECORE_X_DND_TARGET_IDLE) return;
+ DBG("Ecore_X_Dnd_Send_Finished");
memset(&ev, 0, sizeof(xcb_client_message_event_t));
ev.response_type = XCB_CLIENT_MESSAGE;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
+ DBG("Ecore_X_Dnd_Drag");
memset(&ev, 0, sizeof(xcb_client_message_event_t));
ev.response_type = XCB_CLIENT_MESSAGE;
Ecore_X_Event_Xdnd_Enter *e;
Ecore_X_DND_Target *target;
+ DBG("Got Xdnd Enter Event");
if (!(e = calloc(1, sizeof(Ecore_X_Event_Xdnd_Enter)))) return;
target = _ecore_xcb_dnd_target_get();
target->state = ECORE_X_DND_TARGET_ENTERED;
if (!ecore_x_window_prop_property_get(target->source,
ECORE_X_ATOM_XDND_TYPE_LIST,
- XCB_ATOM_ATOM, 32,
+ ECORE_X_ATOM_ATOM, 32,
&data, &num_ret))
{
WRN("DND: Could not fetch data type list from source window");
Ecore_X_Event_Xdnd_Position *e;
Ecore_X_DND_Target *target;
+ DBG("Got Xdnd Position Event");
target = _ecore_xcb_dnd_target_get();
if ((target->source != (Ecore_X_Window)ev->data.data32[0]) ||
- (target->win != ev->window)) return; // NB: Maybe ev->event ??
+ (target->win != ev->window)) return;
target->pos.x = ev->data.data32[2] >> 16;
target->pos.y = ev->data.data32[2] & 0xFFFFUL;
target->action = ev->data.data32[4];
Ecore_X_Event_Xdnd_Status *e;
Ecore_X_DND_Source *source;
+ DBG("Got Xdnd Status Event");
source = _ecore_xcb_dnd_source_get();
if ((source->win != ev->window) ||
(source->dest != (Ecore_X_Window)ev->data.data32[0]))
Ecore_X_Event_Xdnd_Leave *e;
Ecore_X_DND_Target *target;
+ DBG("Got Xdnd Leave Event");
target = _ecore_xcb_dnd_target_get();
if ((target->source != (Ecore_X_Window)ev->data.data32[0]) ||
(target->win != ev->window))
Ecore_X_Event_Xdnd_Drop *e;
Ecore_X_DND_Target *target;
+ DBG("Got Xdnd Drop Event");
target = _ecore_xcb_dnd_target_get();
if ((target->source != (Ecore_X_Window)ev->data.data32[0]) ||
(target->win != ev->window))
return;
target->time = (target->version >= 1) ?
- (Ecore_X_Time)ev->data.data32[2] : ecore_x_current_time_get();
+ (Ecore_X_Time)ev->data.data32[2] : _ecore_xcb_event_last_time;
e = calloc(1, sizeof(Ecore_X_Event_Xdnd_Drop));
if (!e) return;
Ecore_X_DND_Source *source;
Eina_Bool completed = EINA_TRUE;
+ DBG("Got Xdnd Finished Event");
source = _ecore_xcb_dnd_source_get();
if ((source->win != ev->window) ||
(source->dest != (Ecore_X_Window)ev->data.data32[0]))