simplify _e_comp_wl_data_device_drag_finished() slightly

This commit is contained in:
Mike Blumenkrantz 2017-02-10 17:23:43 -05:00
parent 1f7bd4b83d
commit b568e7abb1
1 changed files with 41 additions and 41 deletions

View File

@ -551,19 +551,20 @@ _e_comp_wl_data_device_drag_finished(E_Drag *drag, int dropped)
e_comp_wl->drag = NULL; e_comp_wl->drag = NULL;
e_comp_wl->drag_client = NULL; e_comp_wl->drag_client = NULL;
e_screensaver_inhibit_toggle(0); e_screensaver_inhibit_toggle(0);
if (e_comp_wl->selection.target && (!dropped)) if (dropped) return;
{ if (e_comp_wl->selection.target)
#ifndef HAVE_WAYLAND_ONLY #ifndef HAVE_WAYLAND_ONLY
if (e_client_has_xwindow(e_comp_wl->selection.target)) if (e_comp_wl->selection.target && e_client_has_xwindow(e_comp_wl->selection.target))
{ {
ecore_x_client_message32_send(e_client_util_win_get(e_comp_wl->selection.target), ecore_x_client_message32_send(e_client_util_win_get(e_comp_wl->selection.target),
ECORE_X_ATOM_XDND_DROP, ECORE_X_ATOM_XDND_DROP,
ECORE_X_EVENT_MASK_NONE, ECORE_X_EVENT_MASK_NONE,
e_comp->cm_selection, 0, e_comp->cm_selection, 0,
ecore_x_current_time_get(), 0, 0); ecore_x_current_time_get(), 0, 0);
return;
} }
else
#endif #endif
if (e_comp_wl->selection.target)
{ {
struct wl_resource *res; struct wl_resource *res;
E_Comp_Wl_Data_Source *data_source = e_comp_wl->drag_source; E_Comp_Wl_Data_Source *data_source = e_comp_wl->drag_source;
@ -598,7 +599,6 @@ _e_comp_wl_data_device_drag_finished(E_Drag *drag, int dropped)
e_comp_wl->drag_source = NULL; e_comp_wl->drag_source = NULL;
} }
} }
}
static void static void
_e_comp_wl_data_device_drag_key(E_Drag *drag EINA_UNUSED, Ecore_Event_Key *ev) _e_comp_wl_data_device_drag_key(E_Drag *drag EINA_UNUSED, Ecore_Event_Key *ev)