mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2025-01-17 14:47:19 +01:00
Assume all motion events are mouse events unless tool_type states otherwise.
This commit is contained in:
parent
4fd03b9582
commit
d829af786e
@ -224,12 +224,12 @@ HandleMotionEvent(MirMotionEvent const motion, SDL_Window* sdl_window)
|
|||||||
{
|
{
|
||||||
int cord_index;
|
int cord_index;
|
||||||
for (cord_index = 0; cord_index < motion.pointer_count; cord_index++) {
|
for (cord_index = 0; cord_index < motion.pointer_count; cord_index++) {
|
||||||
if (motion.pointer_coordinates[cord_index].tool_type == mir_motion_tool_type_mouse) {
|
if (motion.pointer_coordinates[cord_index].tool_type == mir_motion_tool_type_finger) {
|
||||||
HandleMouseEvent(motion, cord_index, sdl_window);
|
|
||||||
}
|
|
||||||
else if (motion.pointer_coordinates[cord_index].tool_type == mir_motion_tool_type_finger) {
|
|
||||||
HandleTouchEvent(motion, cord_index, sdl_window);
|
HandleTouchEvent(motion, cord_index, sdl_window);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
HandleMouseEvent(motion, cord_index, sdl_window);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user