discomfitor pushed a commit to branch enlightenment-0.19.

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

commit a0ac666b475f94ec6f316c3e50008e372b452b28
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Fri Jul 24 13:19:11 2015 -0400

    improve x11 compatibility with efl versions earlier than 1.15
    
    canvas grabs changed completely in 1.15, and so it's required that
    x11 grab handling also have special runtime cases for this
    
    for such versions the compositor must:
    * always grab the internal client window instead of the parent
    * always ungrab the window when it has focus
---
 src/bin/e_comp_x.c | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)

diff --git a/src/bin/e_comp_x.c b/src/bin/e_comp_x.c
index 174dea7..b8a48d2 100644
--- a/src/bin/e_comp_x.c
+++ b/src/bin/e_comp_x.c
@@ -139,17 +139,20 @@ _e_comp_x_print_win(Ecore_X_Window win)
 static void
 _e_comp_x_focus_grab(E_Client *ec)
 {
+   Ecore_X_Window win;
+
    if ((ecore_version->major > 1) || (ecore_version->minor > 14))
      if (ec->internal_ecore_evas) return;
-   ecore_x_window_button_grab(e_client_util_win_get(ec), 1,
+   win = ec->internal_ecore_evas ? e_client_util_pwin_get(ec) : 
e_client_util_win_get(ec);
+   ecore_x_window_button_grab(win, 1,
                               ECORE_X_EVENT_MASK_MOUSE_DOWN |
                               ECORE_X_EVENT_MASK_MOUSE_UP |
                               ECORE_X_EVENT_MASK_MOUSE_MOVE, 0, 1);
-   ecore_x_window_button_grab(e_client_util_win_get(ec), 2,
+   ecore_x_window_button_grab(win, 2,
                               ECORE_X_EVENT_MASK_MOUSE_DOWN |
                               ECORE_X_EVENT_MASK_MOUSE_UP |
                               ECORE_X_EVENT_MASK_MOUSE_MOVE, 0, 1);
-   ecore_x_window_button_grab(e_client_util_win_get(ec), 3,
+   ecore_x_window_button_grab(win, 3,
                               ECORE_X_EVENT_MASK_MOUSE_DOWN |
                               ECORE_X_EVENT_MASK_MOUSE_UP |
                               ECORE_X_EVENT_MASK_MOUSE_MOVE, 0, 1);
@@ -183,10 +186,13 @@ _e_comp_x_focus_setdown(E_Client *ec)
    Ecore_X_Window win;
 
    if (!ec->comp_data->button_grabbed) return;
-   if ((!e_client_focus_policy_click(ec)) ||
-       (e_config->always_click_to_raise) ||
-       (e_config->always_click_to_focus)) return;
-   win = e_client_util_win_get(ec);
+   if ((ecore_version->major > 1) || (ecore_version->minor > 14) || 
(!ec->internal_ecore_evas))
+     {
+        if ((!e_client_focus_policy_click(ec)) ||
+            (e_config->always_click_to_raise) ||
+            (e_config->always_click_to_focus)) return;
+     }
+   win = ec->internal_ecore_evas ? e_client_util_pwin_get(ec) : 
e_client_util_win_get(ec);
    e_bindings_mouse_ungrab(E_BINDING_CONTEXT_WINDOW, win);
    e_bindings_wheel_ungrab(E_BINDING_CONTEXT_WINDOW, win);
    ecore_x_window_button_ungrab(win, 1, 0, 1);

-- 


Reply via email to