From 38118b57692a4489e3a2415fccde93dc072a4702 Mon Sep 17 00:00:00 2001 From: SooChan Lim Date: Fri, 28 Aug 2020 13:14:04 +0900 Subject: [PATCH] DSWindow: remove setWindowShell and getWindowShell methods. bool setWindowShell(DSWindowShell *winShell); DSWindowShell *getWindowShell(void); Change-Id: I64870d9f324619357e2c668d8442ab199b6527b7 --- src/DSWindow/DSWindow.cpp | 31 ------------------------------- src/DSWindow/DSWindow.h | 3 --- src/DSWindow/DSWindowPrivate.h | 4 ---- src/DSZone/DSZone.cpp | 3 --- tests/DSWindow-test.cpp | 6 ------ 5 files changed, 47 deletions(-) diff --git a/src/DSWindow/DSWindow.cpp b/src/DSWindow/DSWindow.cpp index 6267a96..d9e0599 100644 --- a/src/DSWindow/DSWindow.cpp +++ b/src/DSWindow/DSWindow.cpp @@ -43,7 +43,6 @@ DSWindowPrivate::DSWindowPrivate(DSWindow *p_ptr) __created(false), __hasFocus(false), __waylandSurface(nullptr), - __winShell(nullptr), __acceptsFocus(true), __allowUserGeometry(false), __title(""), @@ -161,23 +160,6 @@ bool DSWindowPrivate::isCreated() return __created; } -bool DSWindowPrivate::setWindowShell(DSWindowShell *winShell) -{ - if (__winShell) - { - DSLOG_ERR("DSWindow", "Already exist DSWindowShell..."); - return false; - } - - __winShell = winShell; - return true; -} - -DSWindowShell *DSWindowPrivate::getWindowShell(void) -{ - return __winShell; -} - bool DSWindowPrivate::setVkbdFloating(bool set) { __vkbd_floating = set; @@ -450,19 +432,6 @@ DSWaylandSurface *DSWindow::surface() return priv->__waylandSurface.get(); } - -bool DSWindow::setWindowShell(DSWindowShell *winShell) -{ - DS_GET_PRIV(DSWindow); - return priv->setWindowShell(winShell); -} - -DSWindowShell *DSWindow::getWindowShell(void) -{ - DS_GET_PRIV(DSWindow); - return priv->getWindowShell(); -} - void DSWindow::registerCallbackSizeChanged(DSObject *slot, std::function)> func) { __sizeChangedSignal.connect(slot, func); diff --git a/src/DSWindow/DSWindow.h b/src/DSWindow/DSWindow.h index 2a70cd0..fc4d810 100644 --- a/src/DSWindow/DSWindow.h +++ b/src/DSWindow/DSWindow.h @@ -90,9 +90,6 @@ public: DSWaylandSurface *surface(); - bool setWindowShell(DSWindowShell *winShell); - DSWindowShell *getWindowShell(void); - void registerCallbackSizeChanged(DSObject *slot, std::function)> func); void registerCallbackBufferChanged(DSObject *slot, std::function)> func); void registerCallbackWindowRaiseToTop(DSObject *slot, std::function func); diff --git a/src/DSWindow/DSWindowPrivate.h b/src/DSWindow/DSWindowPrivate.h index a6a8200..3e87830 100644 --- a/src/DSWindow/DSWindowPrivate.h +++ b/src/DSWindow/DSWindowPrivate.h @@ -70,9 +70,6 @@ public: bool setFocus(void); bool isCreated(); - bool setWindowShell(DSWindowShell *winShell); - DSWindowShell *getWindowShell(void); - bool setVkbdFloating(bool set); bool getVkbdFloating(); @@ -89,7 +86,6 @@ private: bool __created; bool __hasFocus; std::shared_ptr __waylandSurface; - DSWindowShell *__winShell; bool __acceptsFocus; bool __allowUserGeometry; std::string __title; diff --git a/src/DSZone/DSZone.cpp b/src/DSZone/DSZone.cpp index 58ce34c..2493f8c 100644 --- a/src/DSZone/DSZone.cpp +++ b/src/DSZone/DSZone.cpp @@ -161,9 +161,6 @@ void DSZone::__onSurfaceCreated(std::shared_ptr waylandSurface // create DSWindowShell std::shared_ptr shell = __createWindowShell(window); - - // set DSWindowShell to DSWindow - window->setWindowShell(shell.get()); } void DSZone::__onSurfaceDestroy(std::shared_ptr waylandSurface) diff --git a/tests/DSWindow-test.cpp b/tests/DSWindow-test.cpp index 88f8b48..1ac52c9 100644 --- a/tests/DSWindow-test.cpp +++ b/tests/DSWindow-test.cpp @@ -119,12 +119,6 @@ TEST_F(DSWindowTest, WindowShellTest) auto winShell = std::make_shared(win.get()); EXPECT_TRUE(winShell != nullptr); - - EXPECT_TRUE(win->setWindowShell(winShell.get()) == true); - - DSWindowShell *getWinShell = nullptr; - getWinShell = win->getWindowShell(); - EXPECT_TRUE(winShell.get() == getWinShell); } TEST_F(DSWindowTest, TitleTest) -- 2.7.4