aboutsummaryrefslogtreecommitdiffstats
path: root/src/androidterm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/androidterm.c')
-rw-r--r--src/androidterm.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/androidterm.c b/src/androidterm.c
index 3024890d789..1141f50f266 100644
--- a/src/androidterm.c
+++ b/src/androidterm.c
@@ -966,6 +966,7 @@ handle_one_android_event (struct android_display_info *dpyinfo,
966 touchpoint->x = event->touch.x; 966 touchpoint->x = event->touch.x;
967 touchpoint->y = event->touch.x; 967 touchpoint->y = event->touch.x;
968 touchpoint->next = FRAME_OUTPUT_DATA (any)->touch_points; 968 touchpoint->next = FRAME_OUTPUT_DATA (any)->touch_points;
969 touchpoint->tool_bar_p = false;
969 FRAME_OUTPUT_DATA (any)->touch_points = touchpoint; 970 FRAME_OUTPUT_DATA (any)->touch_points = touchpoint;
970 971
971 /* Figure out whether or not the tool was pressed on the tool 972 /* Figure out whether or not the tool was pressed on the tool
@@ -1072,13 +1073,10 @@ handle_one_android_event (struct android_display_info *dpyinfo,
1072 { 1073 {
1073 *last = touchpoint->next; 1074 *last = touchpoint->next;
1074 1075
1075 /* The tool was unlinked. Free it and generate the
1076 appropriate Emacs event (assuming that it was not
1077 grabbed by the tool bar). */
1078 xfree (touchpoint);
1079
1080 if (touchpoint->tool_bar_p) 1076 if (touchpoint->tool_bar_p)
1081 { 1077 {
1078 xfree (touchpoint);
1079
1082 /* Do what is necessary to release the tool bar and 1080 /* Do what is necessary to release the tool bar and
1083 possibly trigger a click. */ 1081 possibly trigger a click. */
1084 1082
@@ -1094,6 +1092,11 @@ handle_one_android_event (struct android_display_info *dpyinfo,
1094 goto OTHER; 1092 goto OTHER;
1095 } 1093 }
1096 1094
1095 /* The tool was unlinked. Free it and generate the
1096 appropriate Emacs event (assuming that it was not
1097 grabbed by the tool bar). */
1098 xfree (touchpoint);
1099
1097 inev.ie.kind = TOUCHSCREEN_END_EVENT; 1100 inev.ie.kind = TOUCHSCREEN_END_EVENT;
1098 inev.ie.timestamp = event->touch.time; 1101 inev.ie.timestamp = event->touch.time;
1099 1102