static void
_kvm_hook_drag_start(void *d EINA_UNUSED, E_Drag *drag)
{
+ E_Comp_Wl_Data_Source *source;
+ struct wl_client *source_client, *kvm_client;
+
if (!drag) return;
if (!_kvm_service) return;
+ // Workaround: Feed mouse out/in to make sure that the mouse in to correct client.
+ // The evas event mouse in/out is not emit during dragging(mouse move with mouse button pressed).
+ // It makes the pointer still locked after mouse out from kvm window When the drag started.
+ source = e_comp_wl->drag_source;
+ source_client = wl_resource_get_client(source->resource);
+ kvm_client = wl_resource_get_client(_kvm_service->srv_kvm_res);
+ if (source_client == kvm_client)
+ {
+ e_comp_ungrab_input(1, 1);
+ }
+
e_service_kvm_send_drag_start();
}