e_dnd: drag end when mouse up without motion 63/294663/1
authorJunseok Kim <juns.kim@samsung.com>
Thu, 22 Jun 2023 05:40:06 +0000 (14:40 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Thu, 22 Jun 2023 10:10:19 +0000 (19:10 +0900)
There was a bug that drag didn't end when mouse just click without any
motion.
It caused by the device id assign when the pointer moves.
For fix the issue, end drag that the device_id didn't assigned on
mouse_up callback.

Change-Id: I2e52915a006de65fe16de36e466a466e70dd7410

src/bin/e_dnd.c

index 755cee5dba0ca0c9b7434b40fdf011db7fb2df65..93b275d312a185d2304264b1c413338f2c65d11c 100644 (file)
@@ -633,7 +633,9 @@ _e_dnd_cb_mouse_up(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
    int device_id = e_comp_wl_data_current_device_id_get();
 
    if (ev->window != _drag_win) return ECORE_CALLBACK_PASS_ON;
-   if (ev->multi.device != device_id) return ECORE_CALLBACK_PASS_ON;
+   if ((device_id >= 0) &&
+       (ev->multi.device != device_id))
+     return ECORE_CALLBACK_PASS_ON;
 
    if (_drag_current && _drag_current->button_mask)
      {