DSZone: add ShellSurfaceCreated callback 80/241780/1
authorDoyoun Kang <doyoun.kang@samsung.com>
Tue, 11 Aug 2020 06:45:20 +0000 (15:45 +0900)
committerSung-Jin Park <sj76.park@samsung.com>
Thu, 20 Aug 2020 10:10:38 +0000 (19:10 +0900)
Change-Id: Iac4fb4ef87121c059364c467623ff98e46e9ad56

src/DSZone/DSZone.cpp
src/DSZone/DSZone.h

index 83f033c..6d6f262 100644 (file)
@@ -17,6 +17,8 @@ DSZone::DSZone()
        __waylandCompositor->registerCallbackSurfaceCreated(this, std::bind(&DSZone::__onSurfaceCreated, this, std::placeholders::_1));
 
        __waylandShell = __waylandCompositor->getShell();
+       if (__waylandShell)
+               __waylandShell->registerCallbackShellSurfaceCreated(this, std::bind(&DSZone::__onShellSurfaceCreated, this, std::placeholders::_1));
 }
 
 DSZone::~DSZone()
@@ -80,6 +82,17 @@ void DSZone::__onSurfaceCreated(std::shared_ptr<DSWaylandSurface> waylandSurface
        std::shared_ptr<DSWindowShell> shell = __createWindowShell(window);
 }
 
+void DSZone::__onShellSurfaceCreated(IDSWaylandShellSurface *waylandShellSurface)
+{
+       DSLOG_DBG("DSZone", "waylandShellSurface:(pure:%p)", waylandShellSurface);
+
+       if (waylandShellSurface)
+       {
+               struct ::wl_resource *wlSurface = waylandShellSurface->getWlSurface();
+               DSLOG_DBG("DSZone", "get wl_surface:%p", wlSurface);
+       }
+}
+
 // for Test
 void DSZone::callCallbackWindowShellCreated()
 {
index f2adf51..44591da 100644 (file)
@@ -13,6 +13,7 @@ class DSWaylandCompositor;
 class DSWaylandSurface;
 class DSWaylandZxdgSurfaceV6;
 class IDSWaylandShell;
+class IDSWaylandShellSurface;
 
 class DSZone : public DSObject
 {
@@ -37,6 +38,7 @@ public:
 
 private:
        void __onSurfaceCreated(std::shared_ptr<DSWaylandSurface> waylandSurface);
+       void __onShellSurfaceCreated(IDSWaylandShellSurface *waylandShellSurface);
        std::shared_ptr<DSWindow> __createWindow(std::shared_ptr<DSWaylandSurface> waylandSurface);
        std::shared_ptr<DSWindowShell> __createWindowShell(std::shared_ptr<DSWindow> window);
        std::shared_ptr<DSWindow> __findWindow(DSWaylandSurface *dswlSurface);