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>
This commit is contained in:
Prince Kumar Dubey 2015-11-09 12:22:32 -08:00 committed by Cedric BAIL
parent c713fe4bc3
commit 02906c7865
2 changed files with 43 additions and 0 deletions

View File

@ -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);

View File

@ -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 */