discomfitor pushed a commit to branch master.

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

commit b32ae04306fa31a28f4d09b57d9f21e5403188cb
Author: Mike Blumenkrantz <[email protected]>
Date:   Fri Jul 28 15:44:43 2017 -0400

    efl-wl: use correct window when requesting x11 clipboard selection
---
 src/lib/efl_wl/x11.x | 21 +++++++++++++++++++--
 1 file changed, 19 insertions(+), 2 deletions(-)

diff --git a/src/lib/efl_wl/x11.x b/src/lib/efl_wl/x11.x
index cc567990ba..bebd017519 100644
--- a/src/lib/efl_wl/x11.x
+++ b/src/lib/efl_wl/x11.x
@@ -145,8 +145,25 @@ x11_fixes_selection_notify(void *d EINA_UNUSED, int t 
EINA_UNUSED, Ecore_X_Event
             }
         if (ev->owner)
           {
-             xconvertselection(ecore_x_display_get(), 
ECORE_X_ATOM_SELECTION_CLIPBOARD,
-               ECORE_X_ATOM_SELECTION_TARGETS, comp_dnd_atom, ev->win, 0);
+             EINA_LIST_FOREACH(comps, l, c)
+               {
+                  win = 
ecore_evas_window_get(ecore_evas_ecore_evas_get(c->evas));
+                  if (l != comps)
+                    {
+                       Eina_List *ll;
+                       Comp *c2;
+                       Ecore_X_Window win2 = 0;
+                       EINA_LIST_FOREACH(comps, ll, c2)
+                         {
+                            win2 = 
ecore_evas_window_get(ecore_evas_ecore_evas_get(c->evas));
+                            if (win == win2) break;
+                            if (l == ll) break;
+                         }
+                       if ((win == win2) && (l != ll)) continue;
+                    }
+                  xconvertselection(ecore_x_display_get(), 
ECORE_X_ATOM_SELECTION_CLIPBOARD,
+                    ECORE_X_ATOM_SELECTION_TARGETS, comp_dnd_atom, win, 0);
+               }
           }
      }
    return ECORE_CALLBACK_RENEW;

-- 


Reply via email to