forked from enlightenment/efl
From: Michal Pakula vel Rutka <m.pakula@samsung.com>
Subject: [E-devel] [Patch] [Ecore] Allow to send SelectionNotify event if there is no data from XGetWindowProperty. The issue I want to fix is that elementary clipboard does not return paste callback if selection does not contain any data. Currently when ecore_x_window_prop_property_get function is called asking for AnyProperty it returns 0 if there is no data (number of items stored equals 0). This causes ecore_x_event_handle_selection _notify to exit before SelectionNotify event is added and eventually elementary paste callback is not fired. My patch removes this condition and changes behaviour of this function by allowing to add SelectionNotify event even if data returned is empty. SVN revision: 77732
This commit is contained in:
parent
311ea71f36
commit
0a8bed1b66
|
@ -55,3 +55,4 @@ Vikram Narayanan <vikram186@gmail.com>
|
|||
Seong-ho Cho (DarkCircle) <darkcircle.0426@gmail.com>
|
||||
Patryk Kaczmarek <patryk.k@samsung.com>
|
||||
Daniel Willmann <d.willmann@samsung.com>
|
||||
Michal Pakula vel Rutka <m.pakula@samsung.com>
|
||||
|
|
|
@ -998,3 +998,7 @@
|
|||
* Wayland SHM now features a mechanism to synchronize rendering with
|
||||
the compositor, removing tearing effect in animations when using that
|
||||
engine.
|
||||
|
||||
2012-10-10 Michal Pakula vel Rutka
|
||||
|
||||
* Fix: Send ECORE_X_EVENT_SELECTION_NOTIFY even if there is no data.
|
||||
|
|
|
@ -37,6 +37,7 @@ Fixes:
|
|||
- ecore_x_randr to actually return crtcs properly.
|
||||
- ecore_x_randr to actually return crtcs possible outputs properly.
|
||||
- ecore_x_randr to actually return crtcs outputs properly.
|
||||
- send ECORE_X_EVENT_SELECTION_NOTIFY even if there is no data.
|
||||
|
||||
Improvements:
|
||||
|
||||
|
|
|
@ -1356,13 +1356,9 @@ _ecore_xcb_event_handle_selection_notify(xcb_generic_event_t *event)
|
|||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
format =
|
||||
ecore_x_window_prop_property_get(ev->requestor, ev->property,
|
||||
format = ecore_x_window_prop_property_get(ev->requestor, ev->property,
|
||||
XCB_GET_PROPERTY_TYPE_ANY, 8,
|
||||
&data, &num);
|
||||
if (!format) return;
|
||||
}
|
||||
|
||||
e = calloc(1, sizeof(Ecore_X_Event_Selection_Notify));
|
||||
if (!e) return;
|
||||
|
|
|
@ -748,7 +748,7 @@ _ecore_xcb_selection_parser_text(const char *target __UNUSED__,
|
|||
sel = calloc(1, sizeof(Ecore_X_Selection_Data_Text));
|
||||
if (!sel) return NULL;
|
||||
|
||||
if (_data[size - 1])
|
||||
if (data && data[size - 1])
|
||||
{
|
||||
size++;
|
||||
t = realloc(_data, size);
|
||||
|
@ -790,7 +790,7 @@ _ecore_xcb_selection_parser_files(const char *target,
|
|||
|
||||
ECORE_XCB_SELECTION_DATA(sel)->free = _ecore_xcb_selection_data_files_free;
|
||||
|
||||
if (_data[size - 1])
|
||||
if (data && data[size - 1])
|
||||
{
|
||||
size++;
|
||||
t = realloc(_data, size);
|
||||
|
|
|
@ -1415,14 +1415,10 @@ _ecore_x_event_handle_selection_notify(XEvent *xevent)
|
|||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
format = ecore_x_window_prop_property_get(xevent->xselection.requestor,
|
||||
xevent->xselection.property,
|
||||
AnyPropertyType, 8, &data,
|
||||
&num_ret);
|
||||
if (!format)
|
||||
return;
|
||||
}
|
||||
|
||||
e = calloc(1, sizeof(Ecore_X_Event_Selection_Notify));
|
||||
if (!e)
|
||||
|
|
|
@ -810,7 +810,7 @@ _ecore_x_selection_parser_files(const char *target,
|
|||
if (!sel) return NULL;
|
||||
ECORE_X_SELECTION_DATA(sel)->free = _ecore_x_selection_data_files_free;
|
||||
|
||||
if (data[size - 1])
|
||||
if (data && data[size - 1])
|
||||
{
|
||||
/* Isn't nul terminated */
|
||||
size++;
|
||||
|
@ -909,7 +909,7 @@ _ecore_x_selection_parser_text(const char *target __UNUSED__,
|
|||
|
||||
sel = calloc(1, sizeof(Ecore_X_Selection_Data_Text));
|
||||
if (!sel) return NULL;
|
||||
if (data[size - 1])
|
||||
if (data && data[size - 1])
|
||||
{
|
||||
/* Isn't nul terminated */
|
||||
size++;
|
||||
|
|
Loading…
Reference in New Issue