summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2015-06-28 17:24:29 +0900
committerMike Blumenkrantz <zmike@osg.samsung.com>2015-06-30 18:46:07 -0400
commitd7f384f092d943b33e90506e108ed6edf5bde2bf (patch)
tree8b3905f4aeb11c11be66166c1a6e1ada6fb1d413
parent5182693d8db6039c5d3dbd09e67714b55f96a688 (diff)
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
-rw-r--r--src/bin/e_comp_x.c6
-rw-r--r--src/bin/e_focus.c12
2 files changed, 9 insertions, 9 deletions
diff --git a/src/bin/e_comp_x.c b/src/bin/e_comp_x.c
index 8cfac785c..7df42825a 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)
124 (e_config->always_click_to_raise) || 124 (e_config->always_click_to_raise) ||
125 (e_config->always_click_to_focus))) return; 125 (e_config->always_click_to_focus))) return;
126 126
127 ecore_x_window_button_grab(e_client_util_pwin_get(ec), 1, 127 ecore_x_window_button_grab(e_client_util_win_get(ec), 1,
128 ECORE_X_EVENT_MASK_MOUSE_DOWN | 128 ECORE_X_EVENT_MASK_MOUSE_DOWN |
129 ECORE_X_EVENT_MASK_MOUSE_UP | 129 ECORE_X_EVENT_MASK_MOUSE_UP |
130 ECORE_X_EVENT_MASK_MOUSE_MOVE, 0, 1); 130 ECORE_X_EVENT_MASK_MOUSE_MOVE, 0, 1);
131 ecore_x_window_button_grab(e_client_util_pwin_get(ec), 2, 131 ecore_x_window_button_grab(e_client_util_win_get(ec), 2,
132 ECORE_X_EVENT_MASK_MOUSE_DOWN | 132 ECORE_X_EVENT_MASK_MOUSE_DOWN |
133 ECORE_X_EVENT_MASK_MOUSE_UP | 133 ECORE_X_EVENT_MASK_MOUSE_UP |
134 ECORE_X_EVENT_MASK_MOUSE_MOVE, 0, 1); 134 ECORE_X_EVENT_MASK_MOUSE_MOVE, 0, 1);
135 ecore_x_window_button_grab(e_client_util_pwin_get(ec), 3, 135 ecore_x_window_button_grab(e_client_util_win_get(ec), 3,
136 ECORE_X_EVENT_MASK_MOUSE_DOWN | 136 ECORE_X_EVENT_MASK_MOUSE_DOWN |
137 ECORE_X_EVENT_MASK_MOUSE_UP | 137 ECORE_X_EVENT_MASK_MOUSE_UP |
138 ECORE_X_EVENT_MASK_MOUSE_MOVE, 0, 1); 138 ECORE_X_EVENT_MASK_MOUSE_MOVE, 0, 1);
diff --git a/src/bin/e_focus.c b/src/bin/e_focus.c
index 72bbf8f8a..c610523c8 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)
70 e_bindings_mouse_ungrab(E_BINDING_CONTEXT_WINDOW, e_client_util_pwin_get(ec)); 70 e_bindings_mouse_ungrab(E_BINDING_CONTEXT_WINDOW, e_client_util_pwin_get(ec));
71 e_bindings_wheel_ungrab(E_BINDING_CONTEXT_WINDOW, e_client_util_pwin_get(ec)); 71 e_bindings_wheel_ungrab(E_BINDING_CONTEXT_WINDOW, e_client_util_pwin_get(ec));
72#ifndef HAVE_WAYLAND_ONLY 72#ifndef HAVE_WAYLAND_ONLY
73 ecore_x_window_button_ungrab(e_client_util_pwin_get(ec), 1, 0, 1); 73 ecore_x_window_button_ungrab(e_client_util_win_get(ec), 1, 0, 1);
74 ecore_x_window_button_ungrab(e_client_util_pwin_get(ec), 2, 0, 1); 74 ecore_x_window_button_ungrab(e_client_util_win_get(ec), 2, 0, 1);
75 ecore_x_window_button_ungrab(e_client_util_pwin_get(ec), 3, 0, 1); 75 ecore_x_window_button_ungrab(e_client_util_win_get(ec), 3, 0, 1);
76#endif 76#endif
77 e_bindings_mouse_grab(E_BINDING_CONTEXT_WINDOW, e_client_util_pwin_get(ec)); 77 e_bindings_mouse_grab(E_BINDING_CONTEXT_WINDOW, e_client_util_pwin_get(ec));
78 e_bindings_wheel_grab(E_BINDING_CONTEXT_WINDOW, e_client_util_pwin_get(ec)); 78 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)
89 { 89 {
90 if (ec->button_grabbed) return; 90 if (ec->button_grabbed) return;
91#ifndef HAVE_WAYLAND_ONLY 91#ifndef HAVE_WAYLAND_ONLY
92 ecore_x_window_button_grab(e_client_util_pwin_get(ec), 1, 92 ecore_x_window_button_grab(e_client_util_win_get(ec), 1,
93 ECORE_X_EVENT_MASK_MOUSE_DOWN | 93 ECORE_X_EVENT_MASK_MOUSE_DOWN |
94 ECORE_X_EVENT_MASK_MOUSE_UP | 94 ECORE_X_EVENT_MASK_MOUSE_UP |
95 ECORE_X_EVENT_MASK_MOUSE_MOVE, 0, 1); 95 ECORE_X_EVENT_MASK_MOUSE_MOVE, 0, 1);
96 ecore_x_window_button_grab(e_client_util_pwin_get(ec), 2, 96 ecore_x_window_button_grab(e_client_util_win_get(ec), 2,
97 ECORE_X_EVENT_MASK_MOUSE_DOWN | 97 ECORE_X_EVENT_MASK_MOUSE_DOWN |
98 ECORE_X_EVENT_MASK_MOUSE_UP | 98 ECORE_X_EVENT_MASK_MOUSE_UP |
99 ECORE_X_EVENT_MASK_MOUSE_MOVE, 0, 1); 99 ECORE_X_EVENT_MASK_MOUSE_MOVE, 0, 1);
100 ecore_x_window_button_grab(e_client_util_pwin_get(ec), 3, 100 ecore_x_window_button_grab(e_client_util_win_get(ec), 3,
101 ECORE_X_EVENT_MASK_MOUSE_DOWN | 101 ECORE_X_EVENT_MASK_MOUSE_DOWN |
102 ECORE_X_EVENT_MASK_MOUSE_UP | 102 ECORE_X_EVENT_MASK_MOUSE_UP |
103 ECORE_X_EVENT_MASK_MOUSE_MOVE, 0, 1); 103 ECORE_X_EVENT_MASK_MOUSE_MOVE, 0, 1);