discomfitor pushed a commit to branch enlightenment-0.19.

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

commit d7f384f092d943b33e90506e108ed6edf5bde2bf
Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
Date:   Sun Jun 28 17:24:29 2015 +0900

    e passive window grabs - fix side-effect leave/enter events on clients
    
    when you have click to focus we have a passive grab set up. somewhere
    that window changed to the parent window instead of the client. this
    leads to a side effect of a leave and enter event on clients for every
    click. generally clients are ok with this, but some seem to have buggy
    event handling. these enter/leave events are a side effect of the
    passive grab even though we allow/replay the event.
    
    this fixes that by placing passive grabs on the client window itself
    instead of the parent.
    
    @fix
---
 src/bin/e_comp_x.c |  6 +++---
 src/bin/e_focus.c  | 12 ++++++------
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/bin/e_comp_x.c b/src/bin/e_comp_x.c
index 8cfac78..7df4282 100644
--- a/src/bin/e_comp_x.c
+++ b/src/bin/e_comp_x.c
@@ -124,15 +124,15 @@ _e_comp_x_focus_setup(E_Client *ec)
        (e_config->always_click_to_raise) ||
        (e_config->always_click_to_focus))) return;
         
-   ecore_x_window_button_grab(e_client_util_pwin_get(ec), 1,
+   ecore_x_window_button_grab(e_client_util_win_get(ec), 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_pwin_get(ec), 2,
+   ecore_x_window_button_grab(e_client_util_win_get(ec), 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_pwin_get(ec), 3,
+   ecore_x_window_button_grab(e_client_util_win_get(ec), 3,
                               ECORE_X_EVENT_MASK_MOUSE_DOWN |
                               ECORE_X_EVENT_MASK_MOUSE_UP |
                               ECORE_X_EVENT_MASK_MOUSE_MOVE, 0, 1);
diff --git a/src/bin/e_focus.c b/src/bin/e_focus.c
index 72bbf8f..c610523 100644
--- a/src/bin/e_focus.c
+++ b/src/bin/e_focus.c
@@ -70,9 +70,9 @@ e_focus_event_focus_in(E_Client *ec)
         e_bindings_mouse_ungrab(E_BINDING_CONTEXT_WINDOW, 
e_client_util_pwin_get(ec));
         e_bindings_wheel_ungrab(E_BINDING_CONTEXT_WINDOW, 
e_client_util_pwin_get(ec));
 #ifndef HAVE_WAYLAND_ONLY
-        ecore_x_window_button_ungrab(e_client_util_pwin_get(ec), 1, 0, 1);
-        ecore_x_window_button_ungrab(e_client_util_pwin_get(ec), 2, 0, 1);
-        ecore_x_window_button_ungrab(e_client_util_pwin_get(ec), 3, 0, 1);
+        ecore_x_window_button_ungrab(e_client_util_win_get(ec), 1, 0, 1);
+        ecore_x_window_button_ungrab(e_client_util_win_get(ec), 2, 0, 1);
+        ecore_x_window_button_ungrab(e_client_util_win_get(ec), 3, 0, 1);
 #endif
         e_bindings_mouse_grab(E_BINDING_CONTEXT_WINDOW, 
e_client_util_pwin_get(ec));
         e_bindings_wheel_grab(E_BINDING_CONTEXT_WINDOW, 
e_client_util_pwin_get(ec));
@@ -89,15 +89,15 @@ e_focus_event_focus_out(E_Client *ec)
      {
         if (ec->button_grabbed) return;
 #ifndef HAVE_WAYLAND_ONLY
-        ecore_x_window_button_grab(e_client_util_pwin_get(ec), 1,
+        ecore_x_window_button_grab(e_client_util_win_get(ec), 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_pwin_get(ec), 2,
+        ecore_x_window_button_grab(e_client_util_win_get(ec), 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_pwin_get(ec), 3,
+        ecore_x_window_button_grab(e_client_util_win_get(ec), 3,
                                    ECORE_X_EVENT_MASK_MOUSE_DOWN |
                                    ECORE_X_EVENT_MASK_MOUSE_UP |
                                    ECORE_X_EVENT_MASK_MOUSE_MOVE, 0, 1);

-- 


Reply via email to