forked from enlightenment/efl
Generate Ecore event for selection clear
SVN revision: 8397
This commit is contained in:
parent
862a18b206
commit
6f41c8705e
|
@ -359,8 +359,9 @@ struct _Ecore_X_Event_Window_Colormap
|
||||||
|
|
||||||
struct _Ecore_X_Event_Selection_Clear
|
struct _Ecore_X_Event_Selection_Clear
|
||||||
{
|
{
|
||||||
Ecore_X_Window win;
|
Ecore_X_Window win;
|
||||||
Ecore_X_Time time;
|
Ecore_X_Selection selection;
|
||||||
|
Ecore_X_Time time;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _Ecore_X_Event_Selection_Request
|
struct _Ecore_X_Event_Selection_Request
|
||||||
|
|
|
@ -849,6 +849,8 @@ void
|
||||||
_ecore_x_event_handle_selection_clear(XEvent *xevent)
|
_ecore_x_event_handle_selection_clear(XEvent *xevent)
|
||||||
{
|
{
|
||||||
Ecore_X_Selection_Data *d;
|
Ecore_X_Selection_Data *d;
|
||||||
|
Ecore_X_Event_Selection_Clear *e;
|
||||||
|
Atom sel;
|
||||||
|
|
||||||
if(!(d = _ecore_x_selection_get(xevent->xselectionclear.selection)))
|
if(!(d = _ecore_x_selection_get(xevent->xselectionclear.selection)))
|
||||||
return;
|
return;
|
||||||
|
@ -857,6 +859,20 @@ _ecore_x_event_handle_selection_clear(XEvent *xevent)
|
||||||
_ecore_x_selection_set(None, NULL, 0,
|
_ecore_x_selection_set(None, NULL, 0,
|
||||||
xevent->xselectionclear.selection);
|
xevent->xselectionclear.selection);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Generate event for app cleanup */
|
||||||
|
e = malloc(sizeof(Ecore_X_Event_Selection_Clear));
|
||||||
|
e->win = xevent->xselectionclear.window;
|
||||||
|
e->time = xevent->xselectionclear.time;
|
||||||
|
sel = xevent->xselectionclear.selection;
|
||||||
|
if (sel == _ecore_x_atom_selection_primary)
|
||||||
|
e->selection = ECORE_X_SELECTION_PRIMARY;
|
||||||
|
else if (sel == _ecore_x_atom_selection_secondary)
|
||||||
|
e->selection = ECORE_X_SELECTION_SECONDARY;
|
||||||
|
else
|
||||||
|
e->selection = ECORE_X_SELECTION_CLIPBOARD;
|
||||||
|
ecore_event_add(ECORE_X_EVENT_SELECTION_CLEAR, e, _ecore_x_event_free_generic, NULL);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in New Issue