From: Heeyong Song Date: Mon, 9 Jan 2023 09:36:38 +0000 (+0900) Subject: Remove unnecessray ClipBoard creation X-Git-Tag: dali_2.2.9~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;ds=sidebyside;h=49bc80229dcf29d12fc7fd26030c8aa4484c09df;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git Remove unnecessray ClipBoard creation Change-Id: I75e2fa682007e6ef4c24eaaaf81600085994f62c --- diff --git a/dali/internal/window-system/common/event-handler.cpp b/dali/internal/window-system/common/event-handler.cpp index 691f5e6..c3056db 100644 --- a/dali/internal/window-system/common/event-handler.cpp +++ b/dali/internal/window-system/common/event-handler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2023 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -53,7 +53,6 @@ EventHandler::EventHandler(WindowBase* windowBase, DamageObserver& damageObserve : mStyleMonitor(StyleMonitor::Get()), mDamageObserver(damageObserver), mClipboardEventNotifier(ClipboardEventNotifier::Get()), - mClipboard(Clipboard::Get()), mPaused(false) { // Connect signals @@ -181,6 +180,11 @@ void EventHandler::OnSelectionDataReceived(void* event) selectionData = clipBoardImpl.ExcuteBuffered(false, event); } + if(!mClipboardEventNotifier) + { + mClipboardEventNotifier = ClipboardEventNotifier::Get(); + } + if(selectionData && mClipboardEventNotifier) { ClipboardEventNotifier& clipboardEventNotifier(ClipboardEventNotifier::GetImplementation(mClipboardEventNotifier)); diff --git a/dali/internal/window-system/common/event-handler.h b/dali/internal/window-system/common/event-handler.h index 3158efd..b6bf33a 100644 --- a/dali/internal/window-system/common/event-handler.h +++ b/dali/internal/window-system/common/event-handler.h @@ -2,7 +2,7 @@ #define DALI_INTERNAL_EVENT_HANDLER_H /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2023 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -210,7 +210,6 @@ private: DamageObserver& mDamageObserver; ///< Reference to the DamageObserver, set on construction, to sent damage events to. Dali::ClipboardEventNotifier mClipboardEventNotifier; ///< Pointer to the clipboard event notifier - Dali::Clipboard mClipboard; ///< Pointer to the clipboard using ObserverContainer = std::vector; ObserverContainer mObservers; ///< A list of event observer pointers