[Tizen] Fix clipboard paste issue
[platform/core/uifw/dali-adaptor.git] / dali / internal / clipboard / ubuntu-x11 / clipboard-impl-x.cpp
index 070974f..807f9db 100644 (file)
@@ -222,26 +222,26 @@ bool Clipboard::IsVisible() const
   return false;
 }
 
-char* Clipboard::ExcuteBuffered(bool type, void* event)
+void Clipboard::ExcuteSend(void* event)
 {
-  if(!type)
-  {
-    // Receive
-    Ecore_X_Event_Selection_Notify* selectionNotifyEvent = static_cast<Ecore_X_Event_Selection_Notify*>(event);
+}
 
-    Ecore_X_Selection_Data* selectionData = static_cast<Ecore_X_Selection_Data*>(selectionNotifyEvent->data);
-    if(selectionData->data)
-    {
-      if(selectionNotifyEvent->selection == ECORE_X_SELECTION_SECONDARY)
-      {
-        // Claim the ownership of the SECONDARY selection.
-        ecore_x_selection_secondary_set(mImpl->mApplicationWindow, "", 1);
+void Clipboard::ExcuteReceive(void* event, char*& data, int& length)
+{
+  // Receive
+  Ecore_X_Event_Selection_Notify* selectionNotifyEvent = static_cast<Ecore_X_Event_Selection_Notify*>(event);
 
-        return (reinterpret_cast<char*>(selectionData->data));
-      }
+  Ecore_X_Selection_Data* selectionData = static_cast<Ecore_X_Selection_Data*>(selectionNotifyEvent->data);
+  if(selectionData->data)
+  {
+    if(selectionNotifyEvent->selection == ECORE_X_SELECTION_SECONDARY)
+    {
+      // Claim the ownership of the SECONDARY selection.
+      ecore_x_selection_secondary_set(mImpl->mApplicationWindow, "", 1);
+      data = reinterpret_cast<char*>(selectionData->data);
+      length = selectionData->length;
     }
   }
-  return NULL;
 }
 
 } // namespace Adaptor