From: Heeyong Song Date: Mon, 9 Jan 2023 09:36:38 +0000 (+0900) Subject: Remove unnecessray ClipBoard creation X-Git-Tag: accepted/tizen/unified/20230111.174540~1^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F33%2F286533%2F2;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git Remove unnecessray ClipBoard creation Change-Id: I126e2f715e37de0488d5d918c5cd1d415dd3896f --- 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