forked from enlightenment/efl
ecore_x: don't add a x selection clear event if the time is the same as when selection was made.
Summary: Without this, selection can get cleared when changing focus. For example, if we have 2 entries: The first entry is focused and has a selection. When we focus the second entry, we want to select all the text. But the old selection gets unfocused and sends a clear signal to the new focused entry and it gets unselected. This should fix T2739. Reviewers: raster, tasn, devilhorns Subscribers: herdsman, thiepha, cedric Maniphest Tasks: T2739 Differential Revision: https://phab.enlightenment.org/D3127 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
This commit is contained in:
parent
8ab190daec
commit
fb75f6df5a
|
@ -1360,14 +1360,15 @@ _ecore_x_event_handle_property_notify(XEvent *xevent)
|
|||
void
|
||||
_ecore_x_event_handle_selection_clear(XEvent *xevent)
|
||||
{
|
||||
// Ecore_X_Selection_Intern *d;
|
||||
Ecore_X_Selection_Intern *d;
|
||||
Ecore_X_Event_Selection_Clear *e;
|
||||
Ecore_X_Atom sel;
|
||||
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
_ecore_x_last_event_mouse_move = 0;
|
||||
/* errr..... why? paranoia.
|
||||
d = _ecore_x_selection_get(xevent->xselectionclear.selection);
|
||||
if (d && (xevent->xselectionclear.time <= d->time)) return;
|
||||
/* errr..... why? paranoia.
|
||||
if (d && (xevent->xselectionclear.time > d->time))
|
||||
{
|
||||
_ecore_x_selection_set(None, NULL, 0,
|
||||
|
|
Loading…
Reference in New Issue