[3.0] Fixed Window::ShowIndicator(INVISIBLE) 06/84906/1
authorDavid Steele <david.steele@samsung.com>
Thu, 4 Aug 2016 14:22:57 +0000 (15:22 +0100)
committerAgnelo Vaz <agnelo.vaz@samsung.com>
Mon, 22 Aug 2016 12:37:50 +0000 (13:37 +0100)
The indicator is still being drawn even when the window API
is used to make it invisible.

Changed the position of the content actor to offscreen if
new content arrives after changing visibility.

Change-Id: I724ac7a8c1f3985b55b1a21f59fcab387f2a7150
Signed-off-by: David Steele <david.steele@samsung.com>
adaptors/ecore/common/ecore-indicator-impl.cpp
adaptors/ecore/common/ecore-indicator-impl.h

index fb60098..b33cd12 100644 (file)
@@ -666,6 +666,10 @@ void Indicator::SetVisible( Dali::Window::IndicatorVisibleMode visibleMode, bool
         ShowIndicator( HIDE_NOW );
       }
     }
+    else
+    {
+      mIsShowing = false;
+    }
   }
 }
 
@@ -951,19 +955,7 @@ void Indicator::LoadSharedImage( Ecore_Ipc_Event_Server_Data *epcEvent )
       }
 
       CreateNewImage( n );
-
-      if( CheckVisibleState() )
-      {
-        // set default indicator type (enable the quick panel)
-        OnIndicatorTypeChanged( INDICATOR_TYPE_1 );
-      }
-      else
-      {
-        // set default indicator type (disable the quick panel)
-        OnIndicatorTypeChanged( INDICATOR_TYPE_2 );
-      }
-
-      SetVisible(mVisible);
+      UpdateVisibility();
     }
   }
 }
@@ -986,20 +978,29 @@ void Indicator::LoadPixmapImage( Ecore_Ipc_Event_Server_Data *epcEvent )
     DALI_LOG_INFO( gIndicatorLogFilter, Debug::General, "mPixmap [%x]", mPixmap);
 
     CreateNewPixmapImage();
+    UpdateVisibility();
+  }
+}
 
-    if( CheckVisibleState() )
-    {
-      // set default indicator type (enable the quick panel)
-      OnIndicatorTypeChanged( INDICATOR_TYPE_1 );
-    }
-    else
-    {
-      // set default indicator type (disable the quick panel)
-      OnIndicatorTypeChanged( INDICATOR_TYPE_2 );
-    }
+void Indicator::UpdateVisibility()
+{
+  if( CheckVisibleState() )
+  {
+    // set default indicator type (enable the quick panel)
+    OnIndicatorTypeChanged( INDICATOR_TYPE_1 );
+  }
+  else
+  {
+    // set default indicator type (disable the quick panel)
+    OnIndicatorTypeChanged( INDICATOR_TYPE_2 );
+  }
 
-    SetVisible(mVisible);
+  if( !mIsShowing )
+  {
+    mIndicatorContentActor.SetPosition( 0.0f, -mImageHeight, 0.0f );
   }
+
+  SetVisible(mVisible, true);
 }
 
 void Indicator::UpdateImageData( int bufferNumber )
@@ -1363,7 +1364,6 @@ void Indicator::DataReceived( void* event )
             }
             break;
           }
-
         }
       }
       break;
index 4493113..53e93d1 100644 (file)
@@ -290,6 +290,11 @@ private:
   void LoadPixmapImage( Ecore_Ipc_Event_Server_Data *epcEvent );
 
   /**
+   * Update the visibility and position of the actors
+   */
+  void UpdateVisibility();
+
+  /**
    * Inform dali that the indicator data has been updated.
    * @param[in] bufferNumber The shared file number
    */