devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=5f57c472b2f8913b62f5597b7e07f10efbeee6b7

commit 5f57c472b2f8913b62f5597b7e07f10efbeee6b7
Author: vivek <[email protected]>
Date:   Wed Oct 29 09:51:28 2014 -0400

    wl_desktop_shell: Implemented function to show xdg shell surface menu
    
    Summary:
    Implemented _e_xdg_shell_surface_cb_window_menu_show internal function
    to show window menu.
    
    Signed-off-by: vivek <[email protected]>
    
    Reviewers: devilhorns
    
    Subscribers: cedric
    
    Differential Revision: https://phab.enlightenment.org/D1606
---
 src/modules/wl_desktop_shell/e_mod_main.c | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/src/modules/wl_desktop_shell/e_mod_main.c 
b/src/modules/wl_desktop_shell/e_mod_main.c
index b343fc7..e72c148 100644
--- a/src/modules/wl_desktop_shell/e_mod_main.c
+++ b/src/modules/wl_desktop_shell/e_mod_main.c
@@ -750,9 +750,22 @@ _e_xdg_shell_surface_cb_app_id_set(struct wl_client 
*client EINA_UNUSED, struct
 }
 
 static void 
-_e_xdg_shell_surface_cb_window_menu_show(struct wl_client *client EINA_UNUSED, 
struct wl_resource *resource EINA_UNUSED, struct wl_resource *seat_resource 
EINA_UNUSED, uint32_t serial EINA_UNUSED, int32_t x EINA_UNUSED, int32_t y 
EINA_UNUSED)
+_e_xdg_shell_surface_cb_window_menu_show(struct wl_client *client EINA_UNUSED, 
struct wl_resource *resource, struct wl_resource *seat_resource EINA_UNUSED, 
uint32_t serial EINA_UNUSED, int32_t x, int32_t y)
 {
-   /* TODO */
+   E_Client *ec;
+   double timestamp;
+
+   /* get the client for this resource */
+   if (!(ec = wl_resource_get_user_data(resource)))
+     {
+        wl_resource_post_error(resource,
+                               WL_DISPLAY_ERROR_INVALID_OBJECT,
+                               "No Client For Shell Surface");
+        return;
+     }
+
+     timestamp = ecore_loop_time_get();
+     e_int_client_menu_show(ec, x, y, 0, timestamp);
 }
 
 static void 

-- 


Reply via email to