DSWindowShell: add APIs to set/get IDSWaylandShellSurface 05/241805/1
authorDoyoun Kang <doyoun.kang@samsung.com>
Thu, 13 Aug 2020 03:58:01 +0000 (12:58 +0900)
committerSung-Jin Park <sj76.park@samsung.com>
Thu, 20 Aug 2020 10:11:29 +0000 (19:11 +0900)
Change-Id: Ib74dceb66e5c34f5ee79e6f0a12fb5e15c841cb8

src/DSWindowShell/DSWindowShell.cpp
src/DSWindowShell/DSWindowShell.h
src/DSWindowShell/DSWindowShellPrivate.cpp
src/DSWindowShell/DSWindowShellPrivate.h
src/DSZone/DSZone.cpp

index 8431fb8..2f80857 100644 (file)
@@ -55,6 +55,18 @@ void DSWindowShell::destroy(void)
 
 }
 
+void DSWindowShell::setShellSurface(IDSWaylandShellSurface *shellSurface)
+{
+       DS_GET_PRIV(DSWindowShell);
+       priv->setShellSurface(shellSurface);
+}
+
+IDSWaylandShellSurface *DSWindowShell::getShellSurface(void)
+{
+       DS_GET_PRIV(DSWindowShell);
+       return priv->getShellSurface();
+}
+
 bool DSWindowShell::setPosition(int x, int y)
 {
        DS_GET_PRIV(DSWindowShell);
index 4522c2c..ee4aa1e 100644 (file)
@@ -26,6 +26,7 @@
 
 #include "DSStruct.h"
 #include "DSCore.h"
+#include "IDSWaylandShell.h"
 
 namespace display_server
 {
@@ -46,6 +47,9 @@ public:
 
        void destroy(void);
 
+       void setShellSurface(IDSWaylandShellSurface *zxdgSurface);
+       IDSWaylandShellSurface *getShellSurface(void);
+
        bool setPosition(int x, int y);
        stPosition getPosition(void);
 
index 1673c5f..07746d4 100644 (file)
@@ -34,6 +34,7 @@ struct DTWindowShell
 DSWindowShellPrivate::DSWindowShellPrivate(DSWindowShell *p_ptr, DSWindow *window)
        : __p_ptr(p_ptr),
          __window(window),
+         __shellSurface(nullptr),
          __x(0), __y(0),
          __w(1), __h(1)
 {
@@ -70,6 +71,16 @@ void DSWindowShellPrivate::destroy(void)
 }
 
 
+void DSWindowShellPrivate::setShellSurface(IDSWaylandShellSurface *shellSurface)
+{
+       __shellSurface = shellSurface;
+}
+
+IDSWaylandShellSurface *DSWindowShellPrivate::getShellSurface(void)
+{
+       return __shellSurface;
+}
+
 bool DSWindowShellPrivate::setPosition(int x, int y)
 {
        __x = x;
index 4915c53..9a2e7ba 100644 (file)
@@ -43,6 +43,9 @@ public:
 
        void destroy(void);
 
+       void setShellSurface(IDSWaylandShellSurface *shellSurface);
+       IDSWaylandShellSurface *getShellSurface(void);
+
        bool setPosition(int x, int y);
        stPosition getPosition(void);
 
@@ -90,6 +93,7 @@ private:
 
 private:
        DSWindow *__window;
+       IDSWaylandShellSurface *__shellSurface;
        int __x, __y;
        unsigned int __w, __h;
 };
index 9cce347..10545dc 100644 (file)
@@ -126,7 +126,8 @@ void DSZone::__onShellSurfaceCreated(IDSWaylandShellSurface *waylandShellSurface
                        DSWindowShell *dsWinShell = __findWindowShell(dsSurface);
                        if (dsWinShell)
                        {
-                               DSLOG_DBG("DSZONE", "Find DSWindowShell (%p)... setWlShellSurface!", dsWinShell);
+                               DSLOG_DBG("DSZONE", "Find DSWindowShell (%p)... setShellSurface!", dsWinShell);
+                               dsWinShell->setShellSurface(waylandShellSurface);
                        }
                }
        }