forked from enlightenment/efl
efl selection manager - avoid multiple selection get callbacks for req
do one request and get multiple returns if you have multiple windows. this affected terminology in one proces, multiple windows the sel get cb is called multiple times from one selection if you cnp between windows a few times. @fix
This commit is contained in:
parent
18217d8a1e
commit
e3b6f5a959
|
@ -927,6 +927,8 @@ _efl_sel_manager_x11_selection_notify(void *udata, int type EINA_UNUSED, void *e
|
||||||
return ECORE_CALLBACK_PASS_ON;
|
return ECORE_CALLBACK_PASS_ON;
|
||||||
}
|
}
|
||||||
sel_debug("Target is %s", ev->target);
|
sel_debug("Target is %s", ev->target);
|
||||||
|
if (!sel->asked) return ECORE_CALLBACK_PASS_ON;
|
||||||
|
sel->asked--;
|
||||||
|
|
||||||
if (ev->selection != ECORE_X_SELECTION_XDND &&
|
if (ev->selection != ECORE_X_SELECTION_XDND &&
|
||||||
(!strcmp(ev->target, "TARGETS") || !strcmp(ev->target, "ATOMS")))
|
(!strcmp(ev->target, "TARGETS") || !strcmp(ev->target, "ATOMS")))
|
||||||
|
@ -1288,6 +1290,7 @@ _x11_efl_sel_manager_selection_get(const Efl_Object *request, Efl_Selection_Mana
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sel->asked = 2;
|
||||||
sel->request(xwin, ECORE_X_SELECTION_TARGET_TARGETS);
|
sel->request(xwin, ECORE_X_SELECTION_TARGET_TARGETS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -123,6 +123,8 @@ struct _Sel_Manager_Selection
|
||||||
Efl_Selection_Action action;
|
Efl_Selection_Action action;
|
||||||
Eina_Bool active : 1;
|
Eina_Bool active : 1;
|
||||||
|
|
||||||
|
unsigned char asked : 2;
|
||||||
|
|
||||||
Efl_Object *owner;
|
Efl_Object *owner;
|
||||||
Efl_Object *request_obj;
|
Efl_Object *request_obj;
|
||||||
void *data_func_data;
|
void *data_func_data;
|
||||||
|
|
Loading…
Reference in New Issue