Merge branch 'devel/master' into tizen
authorDaekwang Ryu <dkdk.ryu@samsung.com>
Tue, 26 Apr 2022 01:46:57 +0000 (10:46 +0900)
committerDaekwang Ryu <dkdk.ryu@samsung.com>
Tue, 26 Apr 2022 01:46:57 +0000 (10:46 +0900)
Change-Id: Ibfdac56d5312de4775b748fae37993cd35a84551

12 files changed:
dali/devel-api/adaptor-framework/drag-and-drop.cpp
dali/devel-api/adaptor-framework/drag-and-drop.h
dali/devel-api/adaptor-framework/proxy-accessible.h
dali/internal/drag-and-drop/common/drag-and-drop-impl.h
dali/internal/drag-and-drop/generic/drag-and-drop-impl-generic.cpp
dali/internal/drag-and-drop/generic/drag-and-drop-impl-generic.h
dali/internal/drag-and-drop/tizen-wayland/drag-and-drop-impl-ecore-wl2.cpp
dali/internal/drag-and-drop/tizen-wayland/drag-and-drop-impl-ecore-wl2.h
dali/internal/imaging/common/webp-loading.cpp
dali/internal/system/common/trigger-event.cpp
dali/public-api/dali-adaptor-version.cpp
packaging/dali-adaptor.spec

index b8eeeb6..707f691 100644 (file)
@@ -39,9 +39,9 @@ DragAndDrop DragAndDrop::Get()
   return Internal::Adaptor::GetDragAndDrop();
 }
 
-bool DragAndDrop::StartDragAndDrop(Dali::Actor source, Dali::Actor shadow, const DragData& dragData)
+bool DragAndDrop::StartDragAndDrop(Dali::Actor source, Dali::Window shadowWindow, const DragData& dragData, Dali::DragAndDrop::SourceFunction callback)
 {
-  return GetImplementation(*this).StartDragAndDrop(source, shadow, dragData);
+  return GetImplementation(*this).StartDragAndDrop(source, shadowWindow, dragData, callback);
 }
 
 bool DragAndDrop::AddListener(Dali::Actor target, DragAndDropFunction callback)
index 1337047..eb2dc89 100644 (file)
@@ -19,6 +19,7 @@
  */
 
 // EXTERNAL INCLUDES
+#include <dali/public-api/adaptor-framework/window.h>
 #include <dali/public-api/actors/actor.h>
 #include <dali/public-api/math/rect.h>
 #include <dali/public-api/object/base-handle.h>
@@ -47,6 +48,17 @@ class DALI_ADAPTOR_API DragAndDrop : public BaseHandle
 {
 public:
   /**
+   * @brief Enumeration for the drag source event type in the source object
+   */
+  enum class SourceEventType
+  {
+    START,   ///< Drag and drop is started.
+    CANCEL,  ///< Drag and drop is cancelled.
+    ACCEPT,  ///< Drag and drop is accepted.
+    FINISH   ///< Drag and drop is finished.
+  };
+
+  /**
    * @brief Enumeration for the drag event type in the target object
    */
   enum class DragType
@@ -143,6 +155,7 @@ public:
   };
 
   using DragAndDropFunction = std::function<void(const DragEvent&)>;
+  using SourceFunction = std::function<void(enum SourceEventType)>;
 
   /**
    * @brief Create an uninitialized DragAndDrop.
@@ -174,11 +187,12 @@ public:
    * @brief Start the drag operation.
    *
    * @param[in] source The drag source object.
-   * @param[in] shadow The shadow object for drag object.
+   * @param[in] shadowWindow The shadow window for drag object.
    * @param[in] dragData The data to send to target object.
+   * @param[in] callback The drag source event callback.
    * @return bool true if the drag operation is started successfully.
    */
-  bool StartDragAndDrop(Dali::Actor source, Dali::Actor shadow, const DragData& dragData);
+  bool StartDragAndDrop(Dali::Actor source, Dali::Window shadowWindow, const DragData& dragData, Dali::DragAndDrop::SourceFunction callback);
 
   /**
    * @brief Add the listener for receiving the drag and drop events.
index e60c7e1..33e6b1b 100644 (file)
@@ -24,6 +24,7 @@
 // INTERNAL INCLUDES
 #include <dali/devel-api/adaptor-framework/accessibility.h>
 #include <dali/devel-api/atspi-interfaces/accessible.h>
+#include <dali/devel-api/atspi-interfaces/component.h>
 
 namespace Dali::Accessibility
 {
@@ -32,21 +33,25 @@ namespace Dali::Accessibility
  *
  * To be used as a proxy object, in those situations where you want to return an address in
  * a different bridge (embedding for example), but the object itself isn't planned to be used
- * otherwise. This object has no parent, no children, an empty name and so on.
+ * otherwise. This object has a settable parent, no children, an empty name and so on.
  */
-class DALI_ADAPTOR_API ProxyAccessible : public virtual Accessible
+class DALI_ADAPTOR_API ProxyAccessible : public virtual Accessible, public virtual Component
 {
 public:
-  ProxyAccessible() = default;
-
-  ProxyAccessible(Address address)
-  : mAddress(std::move(address))
+  ProxyAccessible()
+  : mAddress{},
+    mParent{nullptr}
   {
   }
 
   void SetAddress(Address address)
   {
-    this->mAddress = std::move(address);
+    mAddress = std::move(address);
+  }
+
+  void SetParent(Accessible* parent)
+  {
+    mParent = parent;
   }
 
   std::string GetName() const override
@@ -61,7 +66,7 @@ public:
 
   Accessible* GetParent() override
   {
-    return nullptr;
+    return mParent;
   }
 
   size_t GetChildCount() const override
@@ -104,6 +109,11 @@ public:
     return {};
   }
 
+  bool IsProxy() const override
+  {
+    return true;
+  }
+
   Address GetAddress() const override
   {
     return mAddress;
@@ -124,8 +134,51 @@ public:
     return Dali::Actor{};
   }
 
+  Rect<> GetExtents(CoordinateType type) const override
+  {
+    auto* parent = Component::DownCast(mParent);
+
+    return parent ? parent->GetExtents(type) : Rect<>{};
+  }
+
+  ComponentLayer GetLayer() const override
+  {
+    return ComponentLayer::WINDOW;
+  }
+
+  int16_t GetMdiZOrder() const override
+  {
+    return false;
+  }
+
+  bool GrabFocus() override
+  {
+    return false;
+  }
+
+  double GetAlpha() const override
+  {
+    return 0.0;
+  }
+
+  bool GrabHighlight() override
+  {
+    return false;
+  }
+
+  bool ClearHighlight() override
+  {
+    return false;
+  }
+
+  bool IsScrollable() const override
+  {
+    return false;
+  }
+
 private:
-  Address mAddress;
+  Address     mAddress;
+  Accessible* mParent;
 };
 
 } // namespace Dali::Accessibility
index 1f274ea..0a8c679 100644 (file)
@@ -50,7 +50,7 @@ public:
   /**
    * @copydoc Dali::DragAndDrop::StartDragAndDrop()
    */
-  virtual bool StartDragAndDrop(Dali::Actor source, Dali::Actor shadow, const Dali::DragAndDrop::DragData& data) = 0;
+  virtual bool StartDragAndDrop(Dali::Actor source, Dali::Window shadowWindow, const Dali::DragAndDrop::DragData& data, Dali::DragAndDrop::SourceFunction callback) = 0;
 
   /**
    * @copydoc Dali::DragAndDrop::AddListener()
index 8c82a56..18abea7 100644 (file)
@@ -61,7 +61,7 @@ DragAndDropGeneric::~DragAndDropGeneric()
 {
 }
 
-bool DragAndDropGeneric::StartDragAndDrop(Dali::Actor source, Dali::Actor shadow, const Dali::DragAndDrop::DragData& dragData)
+bool DragAndDropGeneric::StartDragAndDrop(Dali::Actor source, Dali::Window shadowWindow, const Dali::DragAndDrop::DragData& dragData, Dali::DragAndDrop::SourceFunction callback)
 {
   return true;
 }
index 5397a01..434f234 100644 (file)
@@ -49,7 +49,7 @@ public:
   /**
    * @copydoc Dali::DragAndDrop::StartDragAndDrop()
    */
-  bool StartDragAndDrop(Dali::Actor source, Dali::Actor shadow, const Dali::DragAndDrop::DragData& data) override;
+  bool StartDragAndDrop(Dali::Actor source, Dali::Window shadowWindow, const Dali::DragAndDrop::DragData& data, Dali::DragAndDrop::SourceFunction callback) override;
 
   /**
    * @copydoc Dali::DragAndDrop::AddListener()
index dd020c0..1f81f63 100644 (file)
@@ -51,6 +51,29 @@ static Eina_Bool EcoreEventDataSend(void* data, int type, void* event)
   return ECORE_CALLBACK_PASS_ON;
 }
 
+static Eina_Bool EcoreEventDataSourceEnd(void* data, int type, void* event)
+{
+  Ecore_Wl2_Event_Data_Source_End *ev = reinterpret_cast<Ecore_Wl2_Event_Data_Source_End*>(event);
+  DragAndDropEcoreWl* dndImpl = reinterpret_cast<DragAndDropEcoreWl*>(data);
+  if(ev->cancelled)
+  {
+    dndImpl->CallSourceEvent(Dali::DragAndDrop::SourceEventType::CANCEL);
+  }
+  else
+  {
+    dndImpl->CallSourceEvent(Dali::DragAndDrop::SourceEventType::ACCEPT);
+  }
+
+  return ECORE_CALLBACK_PASS_ON;
+}
+
+static Eina_Bool EcoreEventDataSourceDrop(void* data, int type, void* event)
+{
+  DragAndDropEcoreWl* dndImpl = reinterpret_cast<DragAndDropEcoreWl*>(data);
+  dndImpl->CallSourceEvent(Dali::DragAndDrop::SourceEventType::FINISH);
+  return ECORE_CALLBACK_PASS_ON;
+}
+
 static Eina_Bool EcoreEventOfferDataReady(void* data, int type, void* event)
 {
   DragAndDropEcoreWl* dndImpl = reinterpret_cast<DragAndDropEcoreWl*>(data);
@@ -75,6 +98,16 @@ static Eina_Bool EcoreEventDataDrop(void* data, int type, void* event)
   return ECORE_CALLBACK_PASS_ON;
 }
 
+static Eina_Bool EcoreEventDataEnter(void* data, int type, void* event)
+{
+  Ecore_Wl2_Event_Dnd_Enter* ev = reinterpret_cast<Ecore_Wl2_Event_Dnd_Enter*>(event);
+
+  // Set default offer is reject
+  ecore_wl2_offer_accept(ev->offer, NULL);
+
+  return ECORE_CALLBACK_PASS_ON;
+}
+
 Dali::DragAndDrop GetDragAndDrop()
 {
   Dali::DragAndDrop dnd;
@@ -104,21 +137,33 @@ Dali::DragAndDrop GetDragAndDrop()
 
 DragAndDropEcoreWl::DragAndDropEcoreWl()
 {
-  mSendHandler    = ecore_event_handler_add(ECORE_WL2_EVENT_DATA_SOURCE_SEND, EcoreEventDataSend, this);
-  mReceiveHandler = ecore_event_handler_add(ECORE_WL2_EVENT_OFFER_DATA_READY, EcoreEventOfferDataReady, this);
-  mMotionHandler  = ecore_event_handler_add(ECORE_WL2_EVENT_DND_MOTION, EcoreEventDataMotion, this);
-  mDropHandler    = ecore_event_handler_add(ECORE_WL2_EVENT_DND_DROP, EcoreEventDataDrop, this);
+  // Source Events
+  mSendHandler       = ecore_event_handler_add(ECORE_WL2_EVENT_DATA_SOURCE_SEND, EcoreEventDataSend, this);
+  mSourceEndHandler  = ecore_event_handler_add(ECORE_WL2_EVENT_DATA_SOURCE_END, EcoreEventDataSourceEnd, this);
+  mSourceDropHandler = ecore_event_handler_add(ECORE_WL2_EVENT_DATA_SOURCE_DROP, EcoreEventDataSourceDrop, this);
+
+  // Target Events
+  mReceiveHandler    = ecore_event_handler_add(ECORE_WL2_EVENT_OFFER_DATA_READY, EcoreEventOfferDataReady, this);
+  mMotionHandler     = ecore_event_handler_add(ECORE_WL2_EVENT_DND_MOTION, EcoreEventDataMotion, this);
+  mDropHandler       = ecore_event_handler_add(ECORE_WL2_EVENT_DND_DROP, EcoreEventDataDrop, this);
+  mEnterHandler      = ecore_event_handler_add(ECORE_WL2_EVENT_DND_ENTER, EcoreEventDataEnter, this);
 }
 
 DragAndDropEcoreWl::~DragAndDropEcoreWl()
 {
+  // Source Events
   ecore_event_handler_del(mSendHandler);
+  ecore_event_handler_del(mSourceEndHandler);
+  ecore_event_handler_del(mSourceDropHandler);
+
+  // Target Events
   ecore_event_handler_del(mReceiveHandler);
   ecore_event_handler_del(mMotionHandler);
   ecore_event_handler_del(mDropHandler);
+  ecore_event_handler_del(mEnterHandler);
 }
 
-bool DragAndDropEcoreWl::StartDragAndDrop(Dali::Actor source, Dali::Actor shadow, const Dali::DragAndDrop::DragData& data)
+bool DragAndDropEcoreWl::StartDragAndDrop(Dali::Actor source, Dali::Window shadowWindow, const Dali::DragAndDrop::DragData& data, Dali::DragAndDrop::SourceFunction callback)
 {
   // Get Parent Window
   auto parent = Dali::DevelWindow::Get(source);
@@ -127,16 +172,11 @@ bool DragAndDropEcoreWl::StartDragAndDrop(Dali::Actor source, Dali::Actor shadow
   mMimeType = data.GetMimeType();
   mData     = data.GetData();
 
-  // Apply Shadow Property
-  shadow.SetProperty(Dali::Actor::Property::SIZE, Vector2(150, 150));
-  shadow.SetProperty(Dali::Actor::Property::OPACITY, 0.9f);
+  // Set Source Event
+  mSourceCallback = callback;
 
-  // Create Drag Window
-  mDragWindow = Dali::Window::New(Dali::PositionSize(0, 0, 150, 150), "DragWindow", "class", true);
-  mDragWindow.SetTransparency(true);
-  mDragWindow.SetSize(Dali::Window::WindowSize(150, 150));
-  mDragWindow.SetBackgroundColor(Color::TRANSPARENT);
-  mDragWindow.Add(shadow);
+  // Set Drag Window
+  mDragWindow = shadowWindow;
 
   // Start Drag and Drop
   Ecore_Wl2_Window*  parentWindow = AnyCast<Ecore_Wl2_Window*>(parent.GetNativeHandle());
@@ -158,6 +198,9 @@ bool DragAndDropEcoreWl::StartDragAndDrop(Dali::Actor source, Dali::Actor shadow
   // Start wayland drag and drop
   mSerial = ecore_wl2_dnd_drag_start(input, parentWindow, dragWindow);
 
+  // Call Start Event
+  CallSourceEvent(Dali::DragAndDrop::SourceEventType::START);
+
   return true;
 }
 
@@ -197,6 +240,14 @@ bool DragAndDropEcoreWl::RemoveListener(Dali::Actor target)
   return true;
 }
 
+void DragAndDropEcoreWl::CallSourceEvent(Dali::DragAndDrop::SourceEventType type)
+{
+  if(mSourceCallback)
+  {
+    mSourceCallback(type);
+  }
+}
+
 void DragAndDropEcoreWl::SendData(void* event)
 {
   Ecore_Wl2_Event_Data_Source_Send* ev = reinterpret_cast<Ecore_Wl2_Event_Data_Source_Send*>(event);
@@ -248,6 +299,7 @@ void DragAndDropEcoreWl::ReceiveData(void* event)
     Dali::DragAndDrop::DragEvent dragEvent(Dali::DragAndDrop::DragType::DROP, mPosition, ev->mimetype, ev->data);
     mDropTargets[mTargetIndex].callback(dragEvent);
     mDropTargets[mTargetIndex].inside = false;
+    ecore_wl2_offer_finish(ev->offer);
   }
   mTargetIndex = -1;
 }
@@ -273,6 +325,8 @@ bool DragAndDropEcoreWl::CalculateDragEvent(void* event)
       dragEvent.SetAction(Dali::DragAndDrop::DragType::ENTER);
       dragEvent.SetPosition(curPosition);
       mDropTargets[i].callback(dragEvent);
+      // Accept Offer
+      ecore_wl2_offer_mimes_set(ev->offer, ecore_wl2_offer_mimes_get(ev->offer));
     }
     else if(!currentInside && mDropTargets[i].inside)
     {
@@ -281,6 +335,8 @@ bool DragAndDropEcoreWl::CalculateDragEvent(void* event)
       dragEvent.SetAction(Dali::DragAndDrop::DragType::LEAVE);
       dragEvent.SetPosition(curPosition);
       mDropTargets[i].callback(dragEvent);
+      // Reject Offer
+      ecore_wl2_offer_accept(ev->offer, NULL);
     }
     else if(currentInside && mDropTargets[i].inside)
     {
@@ -315,7 +371,6 @@ bool DragAndDropEcoreWl::CalculateViewRegion(void* event)
       char* mimetype = (char*)eina_array_data_get(ecore_wl2_offer_mimes_get(ev->offer), 0);
       if(mimetype)
       {
-        ecore_wl2_offer_accept(ev->offer, mimetype);
         ecore_wl2_offer_receive(ev->offer, mimetype);
         Ecore_Wl2_Display* display = ecore_wl2_connected_display_get(NULL);
         Ecore_Wl2_Input*   input   = ecore_wl2_input_default_input_get(display);
index e039633..4727222 100644 (file)
@@ -56,7 +56,7 @@ public:
   /**
    * @copydoc Dali::DragAndDrop::StartDragAndDrop()
    */
-  bool StartDragAndDrop(Dali::Actor source, Dali::Actor shadow, const Dali::DragAndDrop::DragData& data) override;
+  bool StartDragAndDrop(Dali::Actor source, Dali::Window shadowWindow, const Dali::DragAndDrop::DragData& data, Dali::DragAndDrop::SourceFunction callback) override;
 
   /**
    * @copydoc Dali::DragAndDrop::AddListener()
@@ -88,6 +88,11 @@ public:
    */
   bool CalculateViewRegion(void* event) override;
 
+  /**
+   * @brief Call drag source events.
+   */
+  void CallSourceEvent(Dali::DragAndDrop::SourceEventType type);
+
 private:
   DragAndDropEcoreWl(const DragAndDropEcoreWl&) = delete;
   DragAndDropEcoreWl& operator=(DragAndDropEcoreWl&) = delete;
@@ -95,17 +100,21 @@ private:
   DragAndDropEcoreWl& operator=(DragAndDropEcoreWl&&) = delete;
 
 private:
-  Dali::Window            mDragWindow;
-  uint32_t                mSerial{0u};
-  Ecore_Event_Handler*    mSendHandler{nullptr};
-  Ecore_Event_Handler*    mReceiveHandler{nullptr};
-  Ecore_Event_Handler*    mMotionHandler{nullptr};
-  Ecore_Event_Handler*    mDropHandler{nullptr};
-  int                     mTargetIndex{0};
-  std::string             mMimeType;
-  std::string             mData;
-  int                     mDataSize{0};
-  Dali::Vector2           mPosition;
+  Dali::Window                      mDragWindow;
+  uint32_t                          mSerial{0u};
+  Ecore_Event_Handler*              mSendHandler{nullptr};
+  Ecore_Event_Handler*              mSourceEndHandler{nullptr};
+  Ecore_Event_Handler*              mSourceDropHandler{nullptr};
+  Ecore_Event_Handler*              mReceiveHandler{nullptr};
+  Ecore_Event_Handler*              mMotionHandler{nullptr};
+  Ecore_Event_Handler*              mDropHandler{nullptr};
+  Ecore_Event_Handler*              mEnterHandler{nullptr};
+  int                               mTargetIndex{0};
+  std::string                       mMimeType;
+  std::string                       mData;
+  int                               mDataSize{0};
+  Dali::Vector2                     mPosition;
+  Dali::DragAndDrop::SourceFunction mSourceCallback{nullptr};
   std::vector<DropTarget> mDropTargets;
 }; // class DragAndDropEcoreWl
 
index 0cb8932..a5b8dab 100644 (file)
@@ -113,12 +113,30 @@ public:
     // mFrameCount will be 1 if the input image is non-animated image or animated image with single frame.
     if(DALI_LIKELY(ReadWebPInformation()))
     {
+#ifdef DALI_WEBP_AVAILABLE
+      WebPDataInit(&mWebPData);
+      mWebPData.size  = mBufferSize;
+      mWebPData.bytes = mBuffer;
+
+      WebPDemuxer* demuxer = WebPDemux(&mWebPData);
+      uint32_t flags = WebPDemuxGetI(demuxer, WEBP_FF_FORMAT_FLAGS);
+      if(flags & ANIMATION_FLAG)
+      {
+        mIsAnimatedImage = true;
+      }
+
+      if(!mIsAnimatedImage)
+      {
+        int32_t imageWidth, imageHeight;
+        if(WebPGetInfo(mBuffer, mBufferSize, &imageWidth, &imageHeight))
+        {
+          mImageSize = ImageDimensions(imageWidth, imageHeight);
+        }
+      }
+#endif
 #ifdef DALI_ANIMATED_WEBP_ENABLED
       if(mIsAnimatedImage)
       {
-        WebPDataInit(&mWebPData);
-        mWebPData.size  = mBufferSize;
-        mWebPData.bytes = mBuffer;
         WebPAnimDecoderOptions webPAnimDecoderOptions;
         WebPAnimDecoderOptionsInit(&webPAnimDecoderOptions);
         webPAnimDecoderOptions.color_mode = MODE_RGBA;
@@ -129,16 +147,6 @@ public:
         mImageSize  = ImageDimensions(mWebPAnimInfo.canvas_width, mWebPAnimInfo.canvas_height);
       }
 #endif
-#ifdef DALI_WEBP_AVAILABLE
-      if(!mIsAnimatedImage)
-      {
-        int32_t imageWidth, imageHeight;
-        if(WebPGetInfo(mBuffer, mBufferSize, &imageWidth, &imageHeight))
-        {
-          mImageSize = ImageDimensions(imageWidth, imageHeight);
-        }
-      }
-#endif
       mLoadSucceeded = true;
     }
     else
@@ -178,32 +186,14 @@ public:
         }
       }
 
-      fp = fileReader->GetFile();
+      if(fileReader)
+      {
+        fp = fileReader->GetFile();
+      }
     }
 
     if(DALI_LIKELY(fp != nullptr))
     {
-      if(DALI_LIKELY(!fseek(fp, 12, SEEK_SET)))
-      {
-        uint8_t mHeaderBuffer[5];
-        fread(mHeaderBuffer, sizeof(WebPByteType), 5, fp);
-        unsigned char VP8X[4]    = {'V', 'P', '8', 'X'};
-        bool          isExtended = true;
-        for(uint32_t i = 0; i < 4; ++i)
-        {
-          if(mHeaderBuffer[i] != VP8X[i])
-          {
-            isExtended = false;
-            break;
-          }
-        }
-        if(isExtended)
-        {
-          unsigned char extension = mHeaderBuffer[4];
-          mIsAnimatedImage        = ((extension >> 1) & 1) ? true : false;
-        }
-      }
-
       if(mBufferSize == 0)
       {
         if(DALI_UNLIKELY(fseek(fp, 0, SEEK_END) <= -1))
@@ -225,14 +215,16 @@ public:
 
   void ReleaseResource()
   {
+#ifdef DALI_WEBP_AVAILABLE
+    if(&mWebPData != nullptr)
+    {
+      mWebPData.bytes = nullptr;
+      WebPDataInit(&mWebPData);
+    }
+#endif
 #ifdef DALI_ANIMATED_WEBP_ENABLED
     if(mIsAnimatedImage)
     {
-      if(&mWebPData != nullptr)
-      {
-        mWebPData.bytes = nullptr;
-        WebPDataInit(&mWebPData);
-      }
       if(mWebPAnimDecoder != nullptr)
       {
         WebPAnimDecoderDelete(mWebPAnimDecoder);
@@ -273,8 +265,11 @@ public:
   bool            mIsAnimatedImage;
   bool            mIsLocalResource;
 
-#ifdef DALI_ANIMATED_WEBP_ENABLED
+#ifdef DALI_WEBP_AVAILABLE
   WebPData                 mWebPData{0};
+#endif
+
+#ifdef DALI_ANIMATED_WEBP_ENABLED
   WebPAnimDecoder*         mWebPAnimDecoder{nullptr};
   WebPAnimInfo             mWebPAnimInfo{0};
   Dali::Devel::PixelBuffer mPreLoadedFrame{};
index 1f94e51..8f769af 100644 (file)
@@ -104,11 +104,14 @@ void TriggerEvent::Triggered(FileDescriptorMonitor::EventType eventBitMask, int
     DALI_LOG_WARNING("Unable to read to UpdateEvent File descriptor\n");
   }
 
+  // Save value to prevent duplicate deletion
+  TriggerEventInterface::Options options = mOptions;
+
   // Call the connected callback
   CallbackBase::Execute(*mCallback);
 
   //check if we should delete ourselves after the trigger
-  if(mOptions == TriggerEventInterface::DELETE_AFTER_TRIGGER)
+  if(options == TriggerEventInterface::DELETE_AFTER_TRIGGER)
   {
     delete this;
   }
index e0b2095..a08cb01 100644 (file)
@@ -27,7 +27,7 @@ namespace Dali
 {
 const unsigned int ADAPTOR_MAJOR_VERSION = 2;
 const unsigned int ADAPTOR_MINOR_VERSION = 1;
-const unsigned int ADAPTOR_MICRO_VERSION = 18;
+const unsigned int ADAPTOR_MICRO_VERSION = 19;
 const char* const  ADAPTOR_BUILD_DATE    = __DATE__ " " __TIME__;
 
 #ifdef DEBUG_ENABLED
index b084e32..0919e34 100644 (file)
@@ -17,7 +17,7 @@
 
 Name:       dali2-adaptor
 Summary:    The DALi Tizen Adaptor
-Version:    2.1.18
+Version:    2.1.19
 Release:    1
 Group:      System/Libraries
 License:    Apache-2.0 and BSD-3-Clause and MIT