discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=2510afe821495df6b3e7864da15be26ab5748642

commit 2510afe821495df6b3e7864da15be26ab5748642
Author: Mike Blumenkrantz <[email protected]>
Date:   Wed Aug 23 14:24:11 2017 -0400

    efl-wl: match nested wl seats based on display ordering
    
    a nested compositor will have a mismatch between canvas seat id and
    compositor seat id, so this attempts to perform matching based on the
    order that they are listed, which should be identical
    
    @fix
---
 src/lib/efl_wl/efl_wl.c | 29 ++++++++++++++++++++---------
 1 file changed, 20 insertions(+), 9 deletions(-)

diff --git a/src/lib/efl_wl/efl_wl.c b/src/lib/efl_wl/efl_wl.c
index d65ce85f15..5c317141af 100644
--- a/src/lib/efl_wl/efl_wl.c
+++ b/src/lib/efl_wl/efl_wl.c
@@ -4149,14 +4149,27 @@ comp_seat_proxy_update(Comp_Seat *s)
 {
    Eina_Iterator *it;
    Ecore_Wl2_Input *input;
-   Eina_Bool drm;
+   Ecore_Wl2_Window *win;
+   int n = 0, i = 0;
 
    if (s->seat) return;
-   drm = 
!ecore_evas_wayland2_window_get(ecore_evas_ecore_evas_get(s->c->evas));
+   win = ecore_evas_wayland2_window_get(ecore_evas_ecore_evas_get(s->c->evas));
+   if (win)
+     {
+        Ecore_Wl2_Display *ewd = ecore_wl2_window_display_get(win);
+        it = ecore_wl2_display_inputs_get(ewd);
+        EINA_ITERATOR_FOREACH(it, input)
+          {
+             if (ecore_wl2_input_seat_id_get(input) == 
evas_device_seat_id_get(s->dev))
+               break;
+             n++;
+          }
+        eina_iterator_free(it);
+     }
    it = ecore_wl2_display_inputs_get(s->c->parent_disp);
    EINA_ITERATOR_FOREACH(it, input)
      {
-        if (drm)
+        if (!win)
           {
              if (eina_streq(ecore_wl2_input_name_get(input), 
evas_device_name_get(s->dev)))
                {
@@ -4164,14 +4177,12 @@ comp_seat_proxy_update(Comp_Seat *s)
                   break;
                }
           }
-        else
+        else if (i == n)
           {
-             if (ecore_wl2_input_seat_id_get(input) == 
evas_device_seat_id_get(s->dev))
-               {
-                  s->seat = input;
-                  break;
-               }
+             s->seat = input;
+             break;
           }
+        i++;
      }
    eina_iterator_free(it);
 }

-- 


Reply via email to