From: Doyoun Kang Date: Sun, 23 Aug 2020 23:46:56 +0000 (+0900) Subject: DSWaylandZxdgToplevel: implement set_parent X-Git-Tag: accepted/tizen/unified/20200827.105812~45 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F03%2F242103%2F1;p=platform%2Fcore%2Fuifw%2Flibds.git DSWaylandZxdgToplevel: implement set_parent Change-Id: If4e310ceea19cae12bad463d09913d87b85a7086 --- diff --git a/src/DSWaylandServer/DSWaylandZxdgShellV6.cpp b/src/DSWaylandServer/DSWaylandZxdgShellV6.cpp index 1e38eae..f72a1e7 100644 --- a/src/DSWaylandServer/DSWaylandZxdgShellV6.cpp +++ b/src/DSWaylandServer/DSWaylandZxdgShellV6.cpp @@ -544,9 +544,24 @@ void DSWaylandZxdgToplevelV6Private::zxdg_toplevel_v6_destroy_resource(zxdg_topl void DSWaylandZxdgToplevelV6Private::zxdg_toplevel_v6_destroy(zxdg_toplevel_v6::Resource *resource) { } + void DSWaylandZxdgToplevelV6Private::zxdg_toplevel_v6_set_parent(zxdg_toplevel_v6::Resource *resource, struct ::wl_resource *parent) { + DSLOG_DBG("XDG_TopLevel", "Set Parent (parent:%p)", parent); + + DSWaylandSurface *surface = __zxdgSurface->getSurface(); + if (!surface) return; + + DSWaylandSurface *parentSurface = DSWaylandSurface::fromWlResource(parent); + + DSWindowManager *wm = DSWindowManager::getInstance(); + if (wm) + { + wm->setWindowParent(surface, parentSurface); + DSWindowManager::releaseInstance(); + } } + void DSWaylandZxdgToplevelV6Private::zxdg_toplevel_v6_set_title(zxdg_toplevel_v6::Resource *resource, const std::string &title) { __zxdgSurface->setWindowTitle(title);