e_dnd: move the ungrab to the object free

otherwise there are cases where the ungrabbing is not executing, and
blocking input.
This commit is contained in:
Marcel Hollerbach 2016-08-03 19:02:26 +02:00
parent 66b4ff408e
commit 348a051af1
2 changed files with 4 additions and 3 deletions

View File

@ -376,7 +376,6 @@ _e_comp_wl_data_source_cb_resource_destroy(struct wl_resource *resource)
if (e_comp_wl->drag_source == source) if (e_comp_wl->drag_source == source)
{ {
e_comp_wl->drag_source = NULL;
//free the drag here //free the drag here
e_object_del(E_OBJECT(e_comp_wl->drag)); e_object_del(E_OBJECT(e_comp_wl->drag));
e_comp_wl->drag = NULL; e_comp_wl->drag = NULL;

View File

@ -1072,8 +1072,6 @@ _e_drag_end(int x, int y)
_drag_current->cb.finished = NULL; _drag_current->cb.finished = NULL;
e_object_del(E_OBJECT(_drag_current)); e_object_del(E_OBJECT(_drag_current));
if (e_comp->comp_type == E_PIXMAP_TYPE_WL)
e_comp_ungrab_input(1, 1);
} }
static void static void
@ -1153,6 +1151,10 @@ _e_drag_free(E_Drag *drag)
ecore_x_window_free(_drag_win); ecore_x_window_free(_drag_win);
ecore_x_window_shadow_tree_flush(); ecore_x_window_shadow_tree_flush();
} }
else
{
e_comp_ungrab_input(1, 1);
}
#endif #endif
e_bindings_disabled_set(0); e_bindings_disabled_set(0);
_drag_win = 0; _drag_win = 0;