ECORE_X_SELECTION_PRIMARY,
ECORE_X_SELECTION_SECONDARY,
ECORE_X_SELECTION_XDND,
- ECORE_X_SELECTION_CLIPBOARD
+ ECORE_X_SELECTION_CLIPBOARD,
+ ECORE_X_SELECTION_OTHER
} Ecore_X_Selection;
typedef enum _Ecore_X_Event_Mode
{
Ecore_X_Window win;
Ecore_X_Selection selection;
+ Ecore_X_Atom atom;
Ecore_X_Time time;
};
Ecore_X_Window win;
Ecore_X_Time time;
Ecore_X_Selection selection;
+ Ecore_X_Atom atom;
char *target;
void *data;
};
-I$(top_builddir)/src/lib/ecore_txt \
-I$(top_builddir)/src/lib/ecore_x \
-I$(top_builddir)/src/lib/ecore_input \
+@EVAS_CFLAGS@ \
@EINA_CFLAGS@
noinst_LTLIBRARIES = libecore_x_xcb.la
Ecore_X_Atom sel;
ev = (xcb_selection_clear_event_t *)event;
- if (!(d = _ecore_x_selection_get(ev->selection)))
- return;
- if (ev->time > d->time)
+ d = _ecore_x_selection_get(ev->selection);
+ if (d && (ev->time > d->time))
{
_ecore_x_selection_set(XCB_NONE, NULL, 0,
ev->selection);
e = malloc(sizeof(Ecore_X_Event_Selection_Clear));
e->win = ev->owner;
e->time = ev->time;
- sel = ev->selection;
+ e->atom = sel = ev->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
+ else if (sel == ECORE_X_ATOM_SELECTION_CLIPBOARD)
e->selection = ECORE_X_SELECTION_CLIPBOARD;
+ else
+ e->selection = ECORE_X_SELECTION_OTHER;
ecore_event_add(ECORE_X_EVENT_SELECTION_CLEAR, e, NULL, NULL);
}
if (!e) return;
e->win = ev->requestor;
e->time = ev->time;
+ e->atom = selection;
e->target = _ecore_x_selection_target_get(ev->target);
if (selection == ECORE_X_ATOM_SELECTION_PRIMARY)
else if (selection == ECORE_X_ATOM_SELECTION_CLIPBOARD)
e->selection = ECORE_X_SELECTION_CLIPBOARD;
else
- {
- free(e);
- return;
- }
+ e->selection = ECORE_X_SELECTION_OTHER;
+
e->data = _ecore_x_selection_parse(e->target, data, num_ret, format);
ecore_event_add(ECORE_X_EVENT_SELECTION_NOTIFY, e, _ecore_x_event_free_selection_notify, NULL);
-I$(top_builddir)/src/lib/ecore_txt \
-I$(top_builddir)/src/lib/ecore_x \
-I$(top_builddir)/src/lib/ecore_input \
+@EVAS_CFLAGS@ \
@EINA_CFLAGS@
noinst_LTLIBRARIES = libecore_x_xlib.la
Ecore_X_Atom sel;
_ecore_x_last_event_mouse_move = 0;
- if (!(d = _ecore_x_selection_get(xevent->xselectionclear.selection)))
- return;
- if (xevent->xselectionclear.time > d->time)
+ d = _ecore_x_selection_get(xevent->xselectionclear.selection);
+ if (d && (xevent->xselectionclear.time > d->time))
{
_ecore_x_selection_set(None, NULL, 0,
xevent->xselectionclear.selection);
e = malloc(sizeof(Ecore_X_Event_Selection_Clear));
e->win = xevent->xselectionclear.window;
e->time = xevent->xselectionclear.time;
- sel = xevent->xselectionclear.selection;
+ e->atom = 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
+ else if (sel == ECORE_X_ATOM_SELECTION_CLIPBOARD)
e->selection = ECORE_X_SELECTION_CLIPBOARD;
+ else
+ e->selection = ECORE_X_SELECTION_OTHER;
ecore_event_add(ECORE_X_EVENT_SELECTION_CLEAR, e, NULL, NULL);
}
if (!e) return;
e->win = xevent->xselection.requestor;
e->time = xevent->xselection.time;
+ e->atom = selection;
e->target = _ecore_x_selection_target_get(xevent->xselection.target);
if (selection == ECORE_X_ATOM_SELECTION_PRIMARY)
else if (selection == ECORE_X_ATOM_SELECTION_CLIPBOARD)
e->selection = ECORE_X_SELECTION_CLIPBOARD;
else
- {
- free(e);
- return;
- }
+ e->selection = ECORE_X_SELECTION_OTHER;
+
e->data = _ecore_x_selection_parse(e->target, data, num_ret, format);
ecore_event_add(ECORE_X_EVENT_SELECTION_NOTIFY, e,