From: hyunho Date: Fri, 21 Feb 2020 01:33:07 +0000 (+0900) Subject: Move window context X-Git-Tag: accepted/tizen/unified/20200302.125801~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a3ab3d486b785195dd8098276210e211fa70d2f2;p=platform%2Fcore%2Fappfw%2Fscreen-connector.git Move window context Change-Id: Ie75f1a8c4a160bbfb554f82e8c3b7f9f0469af3a Signed-off-by: hyunho --- diff --git a/screen_connector_remote_surface_evas/remote_surface_evas.cc b/screen_connector_remote_surface_evas/remote_surface_evas.cc index c305d37..008ec9a 100644 --- a/screen_connector_remote_surface_evas/remote_surface_evas.cc +++ b/screen_connector_remote_surface_evas/remote_surface_evas.cc @@ -24,6 +24,7 @@ #include "screen_connector_remote_surface_evas/remote_surface_evas_implementation.h" #include "screen_connector_remote_surface_evas/image_mock_internal.h" #include "screen_connector_remote_surface_evas/util.h" +#include "screen_connector_remote_surface/window_context.h" #ifdef LOG_TAG #undef LOG_TAG @@ -39,8 +40,7 @@ RemoteSurfaceEvas::RemoteSurfaceEvas(const std::string& id, std::shared_ptr viewerWin, bool mock) : RemoteSurface(id, type, util::GetWlSurface(*viewerWin.get()), mock), - impl_(new Impl(this, viewerWin, mock)), - win_ctx_(new WindowContext()) { + impl_(new Impl(this, viewerWin, mock)) { } RemoteSurfaceEvas::RemoteSurfaceEvas(int rid, const std::string& id, @@ -48,8 +48,7 @@ RemoteSurfaceEvas::RemoteSurfaceEvas(int rid, const std::string& id, std::shared_ptr viewerWin, bool mock) : RemoteSurface(rid, id, type, util::GetWlSurface(*viewerWin.get()), mock), - impl_(new Impl(this, viewerWin, mock)), - win_ctx_(new WindowContext()) { + impl_(new Impl(this, viewerWin, mock)) { } RemoteSurfaceEvas::~RemoteSurfaceEvas() { @@ -61,7 +60,7 @@ RemoteSurfaceEvas& RemoteSurfaceEvas::operator=( RemoteSurfaceEvas::Impl::Impl(RemoteSurfaceEvas* parent, std::shared_ptr viewerWin, bool mock) - : viewer_win_(viewerWin), parent_(parent), mock_(mock) { + : viewer_win_(viewerWin), parent_(parent), mock_(mock), win_ctx_(new WindowContext()) { } void RemoteSurfaceEvas::Impl::OnMouseIn(const EvasObject& obj, @@ -408,7 +407,7 @@ void RemoteSurfaceEvas::Impl::OnMove(const EvasObject& obj, void *eventInfo) { window = ecore_evas_wayland2_window_get(ee); unsigned int win_id = ecore_wl2_window_id_get(window); - if (parent_->IsVisibleArea() && !parent_->win_ctx_->IsFullyObscured(win_id)) { + if (parent_->IsVisibleArea() && !parent_->impl_->win_ctx_->IsFullyObscured(win_id)) { parent_->SendVisibility(true); visibility_ = RemoteSurfaceEvas::UNOBSCURED; } else { @@ -657,12 +656,12 @@ RemoteSurfaceEvas::Visibility RemoteSurfaceEvas::GetVisibility() const { RemoteSurfaceEvas::Visibility RemoteSurfaceEvas::GetVisibility( unsigned int win) { - if (!win_ctx_->FindWindow(win)) { + if (!impl_->win_ctx_->FindWindow(win)) { LOGE("Failed to find window(%u)", win); return RemoteSurfaceEvas::UNKNOWN; } - if (win_ctx_->IsFullyObscured(win)) + if (impl_->win_ctx_->IsFullyObscured(win)) return RemoteSurfaceEvas::FULLY_OBSCURED; return RemoteSurfaceEvas::UNOBSCURED; diff --git a/screen_connector_remote_surface_evas/remote_surface_evas.h b/screen_connector_remote_surface_evas/remote_surface_evas.h index 6e2a902..df4a3cf 100644 --- a/screen_connector_remote_surface_evas/remote_surface_evas.h +++ b/screen_connector_remote_surface_evas/remote_surface_evas.h @@ -24,7 +24,7 @@ #include "screen_connector_remote_surface_evas/evas_object.h" #include "screen_connector_remote_surface_evas/evas_event_interface.h" #include "screen_connector_remote_surface/remote_surface.h" -#include "screen_connector_remote_surface/window_context.h" + namespace screen_connector { @@ -80,7 +80,6 @@ class EXPORT_API RemoteSurfaceEvas : public RemoteSurface, public IEvasEvent { private: class Impl; std::unique_ptr impl_; - std::unique_ptr win_ctx_; }; } // namespace screen_connector diff --git a/screen_connector_remote_surface_evas/remote_surface_evas_implementation.h b/screen_connector_remote_surface_evas/remote_surface_evas_implementation.h index 50314bd..7280aee 100644 --- a/screen_connector_remote_surface_evas/remote_surface_evas_implementation.h +++ b/screen_connector_remote_surface_evas/remote_surface_evas_implementation.h @@ -25,6 +25,7 @@ #include "screen_connector_remote_surface/remote_surface.h" #include "screen_connector_remote_surface_evas/remote_surface_evas.h" #include "screen_connector_remote_surface_evas/image_internal.h" +#include "screen_connector_remote_surface/window_context.h" namespace screen_connector { @@ -65,6 +66,7 @@ class RemoteSurfaceEvas::Impl : public Image::IEventListener { bool auto_visibility_ = true; int no_render_timer_ = 0; bool mock_; + std::unique_ptr win_ctx_; }; } // namespace screen_connector