Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff -r 8af7a4af8fe0 src/video/mir/SDL_mirevents.c
- --- a/src/video/mir/SDL_mirevents.c Sun May 11 15:59:22 2014 +0200
- +++ b/src/video/mir/SDL_mirevents.c Fri May 16 11:21:39 2014 +0200
- @@ -164,7 +164,16 @@
- AddTouchDevice(motion.device_id);
- - switch (motion.action) {
- + int real_action = motion.action & 0xff;
- + if ((real_action == motion_action_pointer_down ||
- + real_action == motion_action_pointer_up)
- + && (motion.action >> 8 != cord_index))
- + {
- + return;
- + // real_action = mir_motion_action_move; // or hover? should not be necessary since that information is already provided in separate events
- + }
- +
- + switch (real_action) {
- case mir_motion_action_down:
- case mir_motion_action_pointer_down:
- HandleTouchPress(device_id, id, SDL_TRUE, n_x, n_y, pressure);
- @@ -187,7 +196,16 @@
- {
- SDL_SetMouseFocus(sdl_window);
- - switch (motion.action) {
- + int real_action = motion.action & 0xff;
- + if ((real_action == motion_action_pointer_down ||
- + real_action == motion_action_pointer_up)
- + && (motion.action >> 8 != cord_index))
- + {
- + return;
- + // real_action = mir_motion_action_move; // or hover? should not be necessary since that information is already provided in separate events
- + }
- +
- + switch (real_action) {
- case mir_motion_action_down:
- case mir_motion_action_pointer_down:
- HandleMouseButton(sdl_window, SDL_PRESSED, motion.button_state);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement