devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=0a60b1c5533d5dec2c6ca15182024aaccc6ca65d

commit 0a60b1c5533d5dec2c6ca15182024aaccc6ca65d
Author: vivek <[email protected]>
Date:   Wed Oct 29 10:34:26 2014 -0400

    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 <[email protected]>
    
    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 e72c148..04a710c 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 = 

-- 


Reply via email to