ecore_wl2_dnd: send exist serial if there're no matching wl_data_source 86/296286/1
authorJunseok Kim <juns.kim@samsung.com>
Tue, 25 Jul 2023 02:07:45 +0000 (11:07 +0900)
committerJunseok Kim <juns.kim@samsung.com>
Tue, 25 Jul 2023 02:10:18 +0000 (11:10 +0900)
Send exist serial number of selection or drag if there're no matching
wl_data_source to prevent failure of multiple selection set.
This is temporary workaround, so we have to decide better way to control
multiple selection set.

@tizen_only

Change-Id: I2a158066af6704be3a66a87de11761fc0122214f

src/lib/ecore_wl2/ecore_wl2_dnd.c

index e6366fa..f0e41e1 100644 (file)
@@ -136,8 +136,17 @@ data_source_send(void *data, struct wl_data_source *source, const char *mime_typ
    ev->seat = input->id;
    if (source == input->data.selection.source)
      ev->serial = input->data.selection.serial;
-   else
+   //TIZEN_ONLY(20230725): workaround for multiple selection set
+   else if (source == input->data.drag.serial)
      ev->serial = input->data.drag.serial;
+   else
+     {
+        if (input->data.selection.serial)
+          ev->serial = input->data.selection.serial;
+        else
+          ev->serial = input->data.drag.serial;
+     }
+   //
    ev->display = input->display;
    ev->display->refs++;