Eina_Position2D cpos;
Eina_Position2D fpos = EINA_POSITION2D(0, 0);
Ecore_Wl2_Event_Dnd_Leave *ev = event;
+ // TIZEN_ONLY(20240306): fix dnd motion coordinates after rotation
+ EINA_SAFETY_ON_NULL_RETURN_VAL(ee, ECORE_CALLBACK_PASS_ON);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(ev, ECORE_CALLBACK_PASS_ON);
+ //
Ecore_Evas_Engine_Wl_Data *wdata = ee->engine.data;
if (ee->prop.window != (Ecore_Window)ev->win) return ECORE_CALLBACK_PASS_ON;
- //evas_output_framespace_get(ee->evas, &fpos.x, &fpos.y, NULL, NULL);
ecore_wl2_input_pointer_xy_get(ecore_wl2_display_input_find(ev->display, ev->seat), &cpos.x, &cpos.y);
- ecore_evas_dnd_leave(data, ev->seat, EINA_POSITION2D(cpos.x - fpos.x, cpos.y - fpos.y));
+ // TIZEN_ONLY(20240306): fix dnd motion coordinates after rotation
+ if (ECORE_EVAS_PORTRAIT(ee))
+ ecore_evas_dnd_leave(data, ev->seat, EINA_POSITION2D(cpos.x - fpos.x, cpos.y - fpos.y));
+ else
+ ecore_evas_dnd_leave(data, ev->seat, EINA_POSITION2D(ee->h - cpos.y - fpos.y, cpos.x - fpos.x));
+ //
wdata->external_offer = NULL;
return ECORE_CALLBACK_PASS_ON;
{
Ecore_Evas *ee = data;
Ecore_Wl2_Event_Dnd_Motion *ev = event;
- Eina_Position2D fpos = EINA_POSITION2D(0, 0);
+ // TIZEN_ONLY(20240306): fix dnd motion coordinates after rotation
+ int fx = 0;
+ int fy = 0;
+ EINA_SAFETY_ON_NULL_RETURN_VAL(ee, ECORE_CALLBACK_PASS_ON);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(ev, ECORE_CALLBACK_PASS_ON);
if (ee->prop.window != (Ecore_Window)ev->win) return ECORE_CALLBACK_PASS_ON;
- evas_output_framespace_get(ee->evas, &fpos.x, &fpos.y, NULL, NULL);
- ecore_evas_dnd_position_set(data, ev->seat, EINA_POSITION2D(ev->x - fpos.x, ev->y - fpos.y));
+ if (!ee->prop.fullscreen)
+ evas_output_framespace_get(ee->evas, &fx, &fy, NULL, NULL);
+
+ if (ECORE_EVAS_PORTRAIT(ee))
+ ecore_evas_dnd_position_set(data, ev->seat, EINA_POSITION2D(ev->x - fx, ev->y - fy));
+ else
+ ecore_evas_dnd_position_set(data, ev->seat, EINA_POSITION2D(ee->h - ev->y - fx, ev->x - fy));
+ //
return ECORE_CALLBACK_PASS_ON;
}
static Eina_Bool