wl_desktop_shell: Fixed the issue to check if wl surface is active or hung up

Summary:
The patch will setup e_client_cb_ping_poller and as long as wl_surface is
active it will unset hung

Signed-off-by: vivek <vivek.ellur@samsung.com>

Reviewers: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1608
This commit is contained in:
vivek 2014-10-29 10:38:06 -04:00 committed by Chris Michael
parent 9ad13e4fcc
commit bcd3c6de49
1 changed files with 7 additions and 2 deletions

View File

@ -136,9 +136,11 @@ _e_shell_surface_cb_pong(struct wl_client *client EINA_UNUSED, struct wl_resourc
{
E_Client *ec;
/* NB: Needs to set client->ping_ok, or client->hung */
if ((ec = wl_resource_get_user_data(resource)))
ec->ping_ok = EINA_TRUE;
{
ec->ping_ok = EINA_TRUE;
ec->hung = EINA_FALSE;
}
}
static void
@ -506,6 +508,9 @@ _e_shell_surface_ping(struct wl_resource *resource)
return;
}
ec->hung = EINA_TRUE;
e_client_ping(ec);
serial = wl_display_next_serial(ec->comp->wl_comp_data->wl.disp);
wl_shell_surface_send_ping(ec->comp_data->shell.surface, serial);
}