From 0a60b1c5533d5dec2c6ca15182024aaccc6ca65d Mon Sep 17 00:00:00 2001 From: vivek Date: Wed, 29 Oct 2014 10:34:26 -0400 Subject: [PATCH] wl_desktop_shell: Fixed the issue to check if client is active or hung up Summary: The patch will setup e_client_cb_ping_poller and as long as surface is active it will unset hung Signed-off-by: vivek Reviewers: devilhorns Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D1607 --- src/modules/wl_desktop_shell/e_mod_main.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/modules/wl_desktop_shell/e_mod_main.c b/src/modules/wl_desktop_shell/e_mod_main.c index e72c1481c..04a710c78 100644 --- a/src/modules/wl_desktop_shell/e_mod_main.c +++ b/src/modules/wl_desktop_shell/e_mod_main.c @@ -1089,9 +1089,13 @@ _e_xdg_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); if (ec->comp->wl_comp_data->shell_interface.xdg_shell) - xdg_shell_send_ping(ec->comp->wl_comp_data->shell_interface.xdg_shell, serial); + xdg_shell_send_ping(ec->comp->wl_comp_data->shell_interface.xdg_shell, serial); + } static void @@ -1361,9 +1365,11 @@ _e_xdg_shell_cb_pong(struct wl_client *client EINA_UNUSED, struct wl_resource *r { 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 const struct wl_shell_interface _e_shell_interface =