devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=86d5cfb9397ff5cfd75dfbc92e2bb67619d9af5a

commit 86d5cfb9397ff5cfd75dfbc92e2bb67619d9af5a
Author: Chris Michael <cp.mich...@samsung.com>
Date:   Thu Oct 22 11:55:41 2015 -0400

    port e_grabinput to use Ecore_Wl2
    
    Signed-off-by: Chris Michael <cp.mich...@samsung.com>
---
 src/bin/e_grabinput.c | 55 ++++++++++++++++++++++++++++++++++++++-------------
 1 file changed, 41 insertions(+), 14 deletions(-)

diff --git a/src/bin/e_grabinput.c b/src/bin/e_grabinput.c
index effe19b..fdc8647 100644
--- a/src/bin/e_grabinput.c
+++ b/src/bin/e_grabinput.c
@@ -37,7 +37,13 @@ e_grabinput_get(Ecore_Window mouse_win, int confine_mouse, 
Ecore_Window key_win)
           ecore_x_pointer_ungrab();
 #else
         if (e_comp->comp_type == E_PIXMAP_TYPE_WL)
-          ecore_wl_input_ungrab(ecore_wl_input_get());
+          {
+             Ecore_Wl2_Window *wl_win;
+
+             if ((wl_win = ecore_wl2_display_window_find(ewd, grab_mouse_win)))
+               ecore_wl2_input_ungrab(ecore_wl2_window_input_get(wl_win),
+                                      wl_win, 0);
+          }
 #endif
         grab_mouse_win = 0;
      }
@@ -47,8 +53,15 @@ e_grabinput_get(Ecore_Window mouse_win, int confine_mouse, 
Ecore_Window key_win)
         if (e_comp->comp_type == E_PIXMAP_TYPE_X)
           ecore_x_keyboard_ungrab();
 #else
+        /* TODO */
         if (e_comp->comp_type == E_PIXMAP_TYPE_WL)
-          ecore_wl_input_ungrab(ecore_wl_input_get());
+          {
+             Ecore_Wl2_Window *wl_win;
+
+             if ((wl_win = ecore_wl2_display_window_find(ewd, grab_key_win)))
+               ecore_wl2_input_ungrab(ecore_wl2_window_input_get(wl_win),
+                                      wl_win, 0);
+          }
 #endif
 
         grab_key_win = 0;
@@ -69,10 +82,11 @@ e_grabinput_get(Ecore_Window mouse_win, int confine_mouse, 
Ecore_Window key_win)
 #else
         if (e_comp->comp_type == E_PIXMAP_TYPE_WL)
           {
-             Ecore_Wl_Window *wl_win;
+             Ecore_Wl2_Window *wl_win;
 
-             if ((wl_win = ecore_wl_window_find(mouse_win)))
-               ecore_wl_input_grab(ecore_wl_input_get(), wl_win, 0);
+             if ((wl_win = ecore_wl2_display_window_find(ewd, mouse_win)))
+               ecore_wl2_input_grab(ecore_wl2_window_input_get(wl_win),
+                                    wl_win, 0);
           }
 #endif
         grab_mouse_win = mouse_win;
@@ -98,10 +112,11 @@ e_grabinput_get(Ecore_Window mouse_win, int confine_mouse, 
Ecore_Window key_win)
 #else
         if (e_comp->comp_type == E_PIXMAP_TYPE_WL)
           {
-             Ecore_Wl_Window *wl_win;
+             Ecore_Wl2_Window *wl_win;
 
-             if ((wl_win = ecore_wl_window_find(key_win)))
-               ecore_wl_input_grab(ecore_wl_input_get(), wl_win, 0);
+             if ((wl_win = ecore_wl2_display_window_find(key_win)))
+               ecore_wl2_input_grab(ecore_wl2_window_input_get(wl_win),
+                                    wl_win, 0);
           }
 #endif
         grab_key_win = key_win;
@@ -122,7 +137,13 @@ e_grabinput_release(Ecore_Window mouse_win, Ecore_Window 
key_win)
           ecore_x_pointer_ungrab();
 #else
         if (e_comp->comp_type == E_PIXMAP_TYPE_WL)
-          ecore_wl_input_ungrab(ecore_wl_input_get());
+          {
+             Ecore_Wl2_Window *wl_win;
+
+             if ((wl_win = ecore_wl2_display_window_find(ewd, mouse_win)))
+               ecore_wl2_input_ungrab(ecore_wl2_window_input_get(wl_win),
+                                      wl_win, 0);
+          }
 #endif
 
         grab_mouse_win = 0;
@@ -134,7 +155,13 @@ e_grabinput_release(Ecore_Window mouse_win, Ecore_Window 
key_win)
           ecore_x_keyboard_ungrab();
 #else
         if (e_comp->comp_type == E_PIXMAP_TYPE_WL)
-          ecore_wl_input_ungrab(ecore_wl_input_get());
+          {
+             Ecore_Wl2_Window *wl_win;
+
+             if ((wl_win = ecore_wl2_display_window_find(key_win)))
+               ecore_wl2_input_grab(ecore_wl2_window_input_get(wl_win),
+                                    wl_win, 0);
+          }
 #endif
 
         grab_key_win = 0;
@@ -192,7 +219,7 @@ static void
 _e_grabinput_focus_do(Ecore_Window win, E_Focus_Method method)
 {
 #ifdef HAVE_WAYLAND
-   Ecore_Wl_Window *wl_win;
+   Ecore_Wl2_Window *wl_win;
 #endif
 
    /* fprintf(stderr, "focus to %x method %i\n", win, method); */
@@ -212,7 +239,7 @@ _e_grabinput_focus_do(Ecore_Window win, E_Focus_Method 
method)
 #ifdef HAVE_WAYLAND
         if (e_comp->comp_type == E_PIXMAP_TYPE_WL)
           {
-             if ((wl_win = ecore_wl_window_find(win)))
+             if ((wl_win = ecore_wl2_display_window_find(ewd, win)))
                {
                   /* FIXME: Need to add an ecore_wl_window_focus function */
                }
@@ -227,7 +254,7 @@ _e_grabinput_focus_do(Ecore_Window win, E_Focus_Method 
method)
 #else
         if (e_comp->comp_type == E_PIXMAP_TYPE_WL)
           {
-             if ((wl_win = ecore_wl_window_find(win)))
+             if ((wl_win = ecore_wl2_display_window_find(ewd, win)))
                {
                   /* FIXME: Need to add an ecore_wl_window_focus function */
                }
@@ -242,7 +269,7 @@ _e_grabinput_focus_do(Ecore_Window win, E_Focus_Method 
method)
 #else
         if (e_comp->comp_type == E_PIXMAP_TYPE_WL)
           {
-             if ((wl_win = ecore_wl_window_find(win)))
+             if ((wl_win = ecore_wl2_display_window_find(ewd, win)))
                {
                   /* FIXME: Need to add an ecore_wl_window_focus function */
                }

-- 


Reply via email to