summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPrince Kumar Dubey <prince.dubey@samsung.com>2015-11-09 12:22:32 -0800
committerCedric BAIL <cedric@osg.samsung.com>2015-11-09 12:37:09 -0800
commitb71e25bc0f1ce828dbfb4b686506166a18229cb1 (patch)
treef4bb910de4f6eadb8fbe165486b8613bb03616cd
parent876889b8a75acbb7eaf520eff7ce420b8757d835 (diff)
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 <cedric@osg.samsung.com>
-rw-r--r--src/lib/elm_conform.c42
-rw-r--r--src/lib/elm_widget_conform.h1
2 files changed, 43 insertions, 0 deletions
diff --git a/src/lib/elm_conform.c b/src/lib/elm_conform.c
index 12d34777d..491a1bf65 100644
--- a/src/lib/elm_conform.c
+++ b/src/lib/elm_conform.c
@@ -833,6 +833,48 @@ _on_prop_change(void *data,
833 pid = (int)getpid(); 833 pid = (int)getpid();
834#endif 834#endif
835 835
836 Evas_Object *conformant = (Evas_Object *)data;
837 ELM_CONFORMANT_DATA_GET(conformant, sd);
838 if ((ev->atom == ECORE_X_ATOM_NET_WM_STATE) && !sd->win_hidden)
839 {
840 unsigned int i, num;
841 Ecore_X_Window_State *state;
842 ecore_x_netwm_window_state_get(ev->win, &state, &num);
843 if (state)
844 {
845 for (i = 0; i < num; i++)
846 {
847 if (state[i] == ECORE_X_WINDOW_STATE_HIDDEN)
848 {
849 sd->win_hidden = EINA_TRUE;
850
851 ecore_timer_del(sd->port_indi_timer);
852 sd->port_indi_timer = NULL;
853
854 ecore_timer_del(sd->land_indi_timer);
855 sd->land_indi_timer = NULL;
856
857 evas_object_del(sd->portrait_indicator);
858 sd->portrait_indicator = NULL;
859
860 evas_object_del(sd->landscape_indicator);
861 sd->landscape_indicator = NULL;
862
863 return ECORE_CALLBACK_DONE;
864 }
865 }
866 }
867 }
868 else if (sd->win_hidden)
869 {
870 sd->win_hidden = EINA_FALSE;
871 sd->indmode = elm_win_indicator_mode_get(sd->win);
872 sd->ind_o_mode = elm_win_indicator_opacity_get(sd->win);
873
874 _indicator_mode_set(conformant, sd->indmode);
875 _indicator_opacity_set(conformant, sd->ind_o_mode);
876 }
877
836 if (ev->atom == ECORE_X_ATOM_E_ILLUME_ZONE) 878 if (ev->atom == ECORE_X_ATOM_E_ILLUME_ZONE)
837 { 879 {
838 DBG("pid=%d, win=0x%x, ECORE_X_ATOM_E_ILLUME_ZONE.\n", pid, ev->win); 880 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 c31231452..d54dc876a 100644
--- a/src/lib/elm_widget_conform.h
+++ b/src/lib/elm_widget_conform.h
@@ -52,6 +52,7 @@ struct _Elm_Conformant_Data
52 Ecore_Timer *port_indi_timer; 52 Ecore_Timer *port_indi_timer;
53 53
54 int rot; 54 int rot;
55 Eina_Bool win_hidden;
55}; 56};
56 57
57/* Enum to identify conformant swallow parts */ 58/* Enum to identify conformant swallow parts */