Add enable/disable auto visibility method 68/223468/1
authorhyunho <hhstark.kang@samsung.com>
Thu, 30 Jan 2020 04:31:10 +0000 (13:31 +0900)
committerhyunho <hhstark.kang@samsung.com>
Thu, 30 Jan 2020 04:31:10 +0000 (13:31 +0900)
Change-Id: I37e18f7e241f7bcc5fe03b678323da5bc1fa6a67
Signed-off-by: hyunho <hhstark.kang@samsung.com>
screen_connector_remote_surface_evas/remote_surface_evas.cc
screen_connector_remote_surface_evas/remote_surface_evas.h
screen_connector_remote_surface_evas/remote_surface_evas_implementation.h

index 2c7b2843de9d1f5789ad0db8ce557556e178fd7a..3636e757eb01e303c8226b933f53f8b5a094810c 100644 (file)
@@ -395,6 +395,9 @@ void RemoteSurfaceEvas::Impl::OnMove(const EvasObject& obj, void *eventInfo) {
     return;
   }
 
+  if (!auto_visibility_)
+    return;
+
   Ecore_Wl2_Window *window = NULL;
   Ecore_Evas *ee;
   ee = ecore_evas_ecore_evas_get(
@@ -556,6 +559,10 @@ void RemoteSurfaceEvas::Unbind() {
   RemoteSurface::Unbind();
 }
 
+void RemoteSurfaceEvas::SetAutoVisibility(bool enable) {
+  impl_->auto_visibility_ = enable;
+}
+
 void RemoteSurfaceEvas::SetChangedEventFilter(
     RemoteSurface::ChangedEventFilter filter) {
   RemoteSurface::SetChangedEventFilter(filter);
@@ -583,7 +590,7 @@ void RemoteSurfaceEvas::SendMouseUp() {
 }
 
 void RemoteSurfaceEvas::NotifyWindowVisibilityEvent(int type, void* event) {
-  if (IsFrozen())
+  if (IsFrozen() || !impl_->auto_visibility_)
     return;
 
   if (!IsVisibleArea())
index d55ee2bd7a3ce8722f0558885d12a64f9a8a543e..69c67a998e24c7f5dd76edf6cec447c971c93b41 100644 (file)
@@ -54,6 +54,8 @@ class EXPORT_API RemoteSurfaceEvas : public RemoteSurface, public IEvasEvent {
  public:
   void Unbind() override;
 
+  void SetAutoVisibility(bool enable);
+
   void SetChangedEventFilter(RemoteSurface::ChangedEventFilter filter) override;
 
   void OnBufferAdded(const std::string& appId, const std::string& instId,
index 8c4990b790d26a1136cb8959f9e88b1cf84c75fe..f0cd7eb8061d0952a4810996e8ef41ed8c408874 100644 (file)
@@ -62,6 +62,7 @@ class RemoteSurfaceEvas::Impl : public Image::IEventListener {
   bool flick_ = false;
   int prev_y_ = 0;
   RemoteSurfaceEvas* parent_;
+  bool auto_visibility_ = true;
   bool mock_;
 };