From 49bc80229dcf29d12fc7fd26030c8aa4484c09df Mon Sep 17 00:00:00 2001 From: Heeyong Song Date: Mon, 9 Jan 2023 18:36:38 +0900 Subject: [PATCH] Remove unnecessray ClipBoard creation Change-Id: I75e2fa682007e6ef4c24eaaaf81600085994f62c --- dali/internal/window-system/common/event-handler.cpp | 8 ++++++-- dali/internal/window-system/common/event-handler.h | 3 +-- 2 files changed, 7 insertions(+), 4 deletions(-) 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 -- 2.7.4