summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2015-07-24 13:19:11 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2015-07-24 13:19:11 -0400
commita0ac666b475f94ec6f316c3e50008e372b452b28 (patch)
tree0a776360702a4e163975f80feccc93fdfc0b986e
parent510660e1577e53a8cb194aa986bfee43ee03f642 (diff)
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
-rw-r--r--src/bin/e_comp_x.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/bin/e_comp_x.c b/src/bin/e_comp_x.c
index 174dea7c1..b8a48d275 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)
139static void 139static void
140_e_comp_x_focus_grab(E_Client *ec) 140_e_comp_x_focus_grab(E_Client *ec)
141{ 141{
142 Ecore_X_Window win;
143
142 if ((ecore_version->major > 1) || (ecore_version->minor > 14)) 144 if ((ecore_version->major > 1) || (ecore_version->minor > 14))
143 if (ec->internal_ecore_evas) return; 145 if (ec->internal_ecore_evas) return;
144 ecore_x_window_button_grab(e_client_util_win_get(ec), 1, 146 win = ec->internal_ecore_evas ? e_client_util_pwin_get(ec) : e_client_util_win_get(ec);
147 ecore_x_window_button_grab(win, 1,
145 ECORE_X_EVENT_MASK_MOUSE_DOWN | 148 ECORE_X_EVENT_MASK_MOUSE_DOWN |
146 ECORE_X_EVENT_MASK_MOUSE_UP | 149 ECORE_X_EVENT_MASK_MOUSE_UP |
147 ECORE_X_EVENT_MASK_MOUSE_MOVE, 0, 1); 150 ECORE_X_EVENT_MASK_MOUSE_MOVE, 0, 1);
148 ecore_x_window_button_grab(e_client_util_win_get(ec), 2, 151 ecore_x_window_button_grab(win, 2,
149 ECORE_X_EVENT_MASK_MOUSE_DOWN | 152 ECORE_X_EVENT_MASK_MOUSE_DOWN |
150 ECORE_X_EVENT_MASK_MOUSE_UP | 153 ECORE_X_EVENT_MASK_MOUSE_UP |
151 ECORE_X_EVENT_MASK_MOUSE_MOVE, 0, 1); 154 ECORE_X_EVENT_MASK_MOUSE_MOVE, 0, 1);
152 ecore_x_window_button_grab(e_client_util_win_get(ec), 3, 155 ecore_x_window_button_grab(win, 3,
153 ECORE_X_EVENT_MASK_MOUSE_DOWN | 156 ECORE_X_EVENT_MASK_MOUSE_DOWN |
154 ECORE_X_EVENT_MASK_MOUSE_UP | 157 ECORE_X_EVENT_MASK_MOUSE_UP |
155 ECORE_X_EVENT_MASK_MOUSE_MOVE, 0, 1); 158 ECORE_X_EVENT_MASK_MOUSE_MOVE, 0, 1);
@@ -183,10 +186,13 @@ _e_comp_x_focus_setdown(E_Client *ec)
183 Ecore_X_Window win; 186 Ecore_X_Window win;
184 187
185 if (!ec->comp_data->button_grabbed) return; 188 if (!ec->comp_data->button_grabbed) return;
186 if ((!e_client_focus_policy_click(ec)) || 189 if ((ecore_version->major > 1) || (ecore_version->minor > 14) || (!ec->internal_ecore_evas))
187 (e_config->always_click_to_raise) || 190 {
188 (e_config->always_click_to_focus)) return; 191 if ((!e_client_focus_policy_click(ec)) ||
189 win = e_client_util_win_get(ec); 192 (e_config->always_click_to_raise) ||
193 (e_config->always_click_to_focus)) return;
194 }
195 win = ec->internal_ecore_evas ? e_client_util_pwin_get(ec) : e_client_util_win_get(ec);
190 e_bindings_mouse_ungrab(E_BINDING_CONTEXT_WINDOW, win); 196 e_bindings_mouse_ungrab(E_BINDING_CONTEXT_WINDOW, win);
191 e_bindings_wheel_ungrab(E_BINDING_CONTEXT_WINDOW, win); 197 e_bindings_wheel_ungrab(E_BINDING_CONTEXT_WINDOW, win);
192 ecore_x_window_button_ungrab(win, 1, 0, 1); 198 ecore_x_window_button_ungrab(win, 1, 0, 1);