diff options
author | Rafael Antognolli <rafael.antognolli@intel.com> | 2013-11-29 18:03:25 -0200 |
---|---|---|
committer | Rafael Antognolli <rafael.antognolli@intel.com> | 2013-11-29 18:05:42 -0200 |
commit | cc4aedaaeee41afcb83c522e69eac8f9e4f76466 (patch) | |
tree | cad95f02c40292b905a4a0ee7d60812d402ea272 /src/lib/ecore_wayland | |
parent | a14ee372e0285602a010856b090dcf7f7b3373e3 (diff) |
ecore/wayland: Use touch_focus for touch_based events.
Also call the mouse related events with BTN_LEFT instead of 0, otherwise
the correct button won't be assigned to the event (button 1).
Diffstat (limited to 'src/lib/ecore_wayland')
-rw-r--r-- | src/lib/ecore_wayland/ecore_wl_input.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/ecore_wayland/ecore_wl_input.c b/src/lib/ecore_wayland/ecore_wl_input.c index aa0ed7074a..2c59cfe8ad 100644 --- a/src/lib/ecore_wayland/ecore_wl_input.c +++ b/src/lib/ecore_wayland/ecore_wl_input.c | |||
@@ -181,7 +181,7 @@ _ecore_wl_input_grab_release(Ecore_Wl_Input *input, Ecore_Wl_Window *win) | |||
181 | if (!input) return; | 181 | if (!input) return; |
182 | if (input->grab != win) return; | 182 | if (input->grab != win) return; |
183 | 183 | ||
184 | _ecore_wl_input_mouse_up_send(input, input->pointer_focus, | 184 | _ecore_wl_input_mouse_up_send(input, input->grab, |
185 | 0, input->grab_button, input->grab_timestamp); | 185 | 0, input->grab_button, input->grab_timestamp); |
186 | 186 | ||
187 | ecore_wl_input_ungrab(input); | 187 | ecore_wl_input_ungrab(input); |
@@ -1003,16 +1003,16 @@ _ecore_wl_input_cb_touch_down(void *data, struct wl_touch *touch EINA_UNUSED, un | |||
1003 | input->sx = wl_fixed_to_int(x); | 1003 | input->sx = wl_fixed_to_int(x); |
1004 | input->sy = wl_fixed_to_int(y); | 1004 | input->sy = wl_fixed_to_int(y); |
1005 | 1005 | ||
1006 | _ecore_wl_input_mouse_move_send(input, input->pointer_focus, timestamp, id); | 1006 | _ecore_wl_input_mouse_move_send(input, input->touch_focus, timestamp, id); |
1007 | _ecore_wl_input_cb_pointer_enter(data, NULL, serial, surface, x, y); | 1007 | _ecore_wl_input_cb_pointer_enter(data, NULL, serial, surface, x, y); |
1008 | if ((input->touch_focus) && (!input->grab)) | 1008 | if ((input->touch_focus) && (!input->grab)) |
1009 | { | 1009 | { |
1010 | ecore_wl_input_grab(input, input->pointer_focus, BTN_LEFT); | 1010 | ecore_wl_input_grab(input, input->touch_focus, BTN_LEFT); |
1011 | input->grab_timestamp = timestamp; | 1011 | input->grab_timestamp = timestamp; |
1012 | } | 1012 | } |
1013 | 1013 | ||
1014 | _ecore_wl_input_mouse_down_send(input, input->touch_focus, | 1014 | _ecore_wl_input_mouse_down_send(input, input->touch_focus, |
1015 | id, 0, timestamp); | 1015 | id, BTN_LEFT, timestamp); |
1016 | } | 1016 | } |
1017 | 1017 | ||
1018 | static void | 1018 | static void |
@@ -1028,7 +1028,7 @@ _ecore_wl_input_cb_touch_up(void *data, struct wl_touch *touch EINA_UNUSED, unsi | |||
1028 | input->timestamp = timestamp; | 1028 | input->timestamp = timestamp; |
1029 | input->display->serial = serial; | 1029 | input->display->serial = serial; |
1030 | 1030 | ||
1031 | _ecore_wl_input_mouse_up_send(input, input->touch_focus, id, 0, timestamp); | 1031 | _ecore_wl_input_mouse_up_send(input, input->touch_focus, id, BTN_LEFT, timestamp); |
1032 | if ((input->grab) && (input->grab_button == BTN_LEFT)) | 1032 | if ((input->grab) && (input->grab_button == BTN_LEFT)) |
1033 | ecore_wl_input_ungrab(input); | 1033 | ecore_wl_input_ungrab(input); |
1034 | } | 1034 | } |