cedric pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=b71e25bc0f1ce828dbfb4b686506166a18229cb1

commit b71e25bc0f1ce828dbfb4b686506166a18229cb1
Author: Prince Kumar Dubey <prince.du...@samsung.com>
Date:   Mon Nov 9 12:22:32 2015 -0800

    conform: if window is in background, indicator must not update the plug 
information.
    
    Summary:
    When the window is in background, for associated conformant, indicator must 
not update the plug information.
    To fix this issue, On window goes to background, the associated plug 
handled by confromant is deleted.
    
    Test Plan:
    On any device (like handset) which should have indicator support, this 
scenario can be reproduce. I tested on a handset
    with gdb attach to running process having window and confromant with 
indicator support.
    
    Reviewers: raster, Hermet, cedric
    
    Reviewed By: cedric
    
    Subscribers: rajeshps, govi
    
    Differential Revision: https://phab.enlightenment.org/D3177
    
    Signed-off-by: Cedric BAIL <ced...@osg.samsung.com>
---
 src/lib/elm_conform.c        | 42 ++++++++++++++++++++++++++++++++++++++++++
 src/lib/elm_widget_conform.h |  1 +
 2 files changed, 43 insertions(+)

diff --git a/src/lib/elm_conform.c b/src/lib/elm_conform.c
index 12d3477..491a1bf 100644
--- a/src/lib/elm_conform.c
+++ b/src/lib/elm_conform.c
@@ -833,6 +833,48 @@ _on_prop_change(void *data,
    pid = (int)getpid();
 #endif
 
+   Evas_Object *conformant = (Evas_Object *)data;
+   ELM_CONFORMANT_DATA_GET(conformant, sd);
+   if ((ev->atom == ECORE_X_ATOM_NET_WM_STATE) && !sd->win_hidden)
+     {
+        unsigned int i, num;
+        Ecore_X_Window_State *state;
+        ecore_x_netwm_window_state_get(ev->win, &state, &num);
+        if (state)
+          {
+              for (i = 0; i < num; i++)
+                {
+                   if (state[i] == ECORE_X_WINDOW_STATE_HIDDEN)
+                     {
+                        sd->win_hidden = EINA_TRUE;
+
+                        ecore_timer_del(sd->port_indi_timer);
+                        sd->port_indi_timer = NULL;
+
+                        ecore_timer_del(sd->land_indi_timer);
+                        sd->land_indi_timer = NULL;
+
+                        evas_object_del(sd->portrait_indicator);
+                        sd->portrait_indicator = NULL;
+
+                        evas_object_del(sd->landscape_indicator);
+                        sd->landscape_indicator = NULL;
+
+                        return ECORE_CALLBACK_DONE;
+                     }
+                }
+          }
+     }
+   else if (sd->win_hidden)
+     {
+        sd->win_hidden = EINA_FALSE;
+        sd->indmode = elm_win_indicator_mode_get(sd->win);
+        sd->ind_o_mode = elm_win_indicator_opacity_get(sd->win);
+
+        _indicator_mode_set(conformant, sd->indmode);
+        _indicator_opacity_set(conformant, sd->ind_o_mode);
+     }
+
    if (ev->atom == ECORE_X_ATOM_E_ILLUME_ZONE)
      {
         DBG("pid=%d, win=0x%x, ECORE_X_ATOM_E_ILLUME_ZONE.\n", pid, ev->win);
diff --git a/src/lib/elm_widget_conform.h b/src/lib/elm_widget_conform.h
index c312314..d54dc87 100644
--- a/src/lib/elm_widget_conform.h
+++ b/src/lib/elm_widget_conform.h
@@ -52,6 +52,7 @@ struct _Elm_Conformant_Data
    Ecore_Timer                   *port_indi_timer;
 
    int                            rot;
+   Eina_Bool                      win_hidden;
 };
 
 /* Enum to identify conformant swallow parts */

-- 


Reply via email to