aboutsummaryrefslogtreecommitdiffstats
path: root/src/androidterm.c
diff options
context:
space:
mode:
authorPaul Eggert2025-03-03 09:32:08 -0800
committerPaul Eggert2025-03-03 09:44:42 -0800
commit29a9fd4f4ba17822eca0f00c2037da3868bd874e (patch)
tree94f69a89281045884f84a10c3767ed0bb8f570d4 /src/androidterm.c
parent96d26b493618f59bbdd4de86be65e784735541c8 (diff)
downloademacs-29a9fd4f4ba17822eca0f00c2037da3868bd874e.tar.gz
emacs-29a9fd4f4ba17822eca0f00c2037da3868bd874e.zip
Avoid some union buffered_input_event uses
Simplify by using separate local vars for struct input_event and struct selection_input_event, rather than a single local var that is the union of the two. This makes the code easier to follow by the human reader, and should help avoid GCC bug 117423 <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117423> and therefore work around Emacs bug 76559 <https://bugs.gnu.org/76559>. * src/androidterm.c (handle_one_android_event): * src/gtkutil.c (xg_widget_key_press_event_cb): * src/pgtkterm.c (evq_flush): * src/xterm.c (handle_one_xevent): Use struct input_event and kbd_buffer_store_event_hold, or struct selection_input_event and kbd_buffer_store_selection_event_hold, rather than union buffered_input_event and union buffered_input_event. * src/keyboard.c (beware_long_paste, maybe_quit_while_no_input): New functions, broken out from kbd_buffer_store_buffered_event. (kbd_buffer_store_event_hold): Define here, with a simplified version of the body of the old kbd_buffer_store_buffered_event, rather than defining in keyboard.h. Specialize to struct input_event. (kbd_buffer_store_selection_event_hold): New function; it is a simplified version of the old kbd_buffer_store_buffered_event, specialized to struct selection_input_event. (is_ignored_event_kind): Accept enum event_kind instead of union buffered_input_event. All callers changed. * src/keyboard.h (kbd_buffer_store_event_hold): Remove definition, as keyboard.c now defines it. * src/pgtkterm.c (evq_grow_if_needed): New function. (evq_enqueue, evq_selection_enqueue): Two functions now, not one. Args are now struct input_event const * or struct selection_input_event const *, not union buffered_input_event *. All callers changed. This lets us simplify the callers so that they need not use the union.
Diffstat (limited to 'src/androidterm.c')
-rw-r--r--src/androidterm.c171
1 files changed, 84 insertions, 87 deletions
diff --git a/src/androidterm.c b/src/androidterm.c
index 3cb9eab3606..79ee374f2ca 100644
--- a/src/androidterm.c
+++ b/src/androidterm.c
@@ -827,7 +827,7 @@ handle_one_android_event (struct android_display_info *dpyinfo,
827 union android_event configureEvent; 827 union android_event configureEvent;
828 struct frame *f, *any, *mouse_frame; 828 struct frame *f, *any, *mouse_frame;
829 Mouse_HLInfo *hlinfo; 829 Mouse_HLInfo *hlinfo;
830 union buffered_input_event inev; 830 struct input_event inev;
831 int modifiers, count, do_help; 831 int modifiers, count, do_help;
832 struct android_touch_point *touchpoint, **last; 832 struct android_touch_point *touchpoint, **last;
833 Lisp_Object window; 833 Lisp_Object window;
@@ -851,7 +851,7 @@ handle_one_android_event (struct android_display_info *dpyinfo,
851 if (any && any->wait_event_type == event->type) 851 if (any && any->wait_event_type == event->type)
852 any->wait_event_type = 0; /* Indicates we got it. */ 852 any->wait_event_type = 0; /* Indicates we got it. */
853 853
854 EVENT_INIT (inev.ie); 854 EVENT_INIT (inev);
855 855
856 switch (event->type) 856 switch (event->type)
857 { 857 {
@@ -922,8 +922,8 @@ handle_one_android_event (struct android_display_info *dpyinfo,
922 if (!FRAME_TOOLTIP_P (f) 922 if (!FRAME_TOOLTIP_P (f)
923 && (old_left != f->left_pos || old_top != f->top_pos)) 923 && (old_left != f->left_pos || old_top != f->top_pos))
924 { 924 {
925 inev.ie.kind = MOVE_FRAME_EVENT; 925 inev.kind = MOVE_FRAME_EVENT;
926 XSETFRAME (inev.ie.frame_or_window, f); 926 XSETFRAME (inev.frame_or_window, f);
927 } 927 }
928 928
929 if (f && FRAME_OUTPUT_DATA (f)->need_cursor_updates) 929 if (f && FRAME_OUTPUT_DATA (f)->need_cursor_updates)
@@ -982,10 +982,10 @@ handle_one_android_event (struct android_display_info *dpyinfo,
982 memset (&compose_status, 0, sizeof (compose_status)); 982 memset (&compose_status, 0, sizeof (compose_status));
983 983
984 /* Common for all keysym input events. */ 984 /* Common for all keysym input events. */
985 XSETFRAME (inev.ie.frame_or_window, any); 985 XSETFRAME (inev.frame_or_window, any);
986 inev.ie.modifiers 986 inev.modifiers
987 = android_android_to_emacs_modifiers (dpyinfo, modifiers); 987 = android_android_to_emacs_modifiers (dpyinfo, modifiers);
988 inev.ie.timestamp = event->xkey.time; 988 inev.timestamp = event->xkey.time;
989 989
990 keysym = event->xkey.keycode; 990 keysym = event->xkey.keycode;
991 991
@@ -1019,8 +1019,8 @@ handle_one_android_event (struct android_display_info *dpyinfo,
1019 1019
1020 if (event->xkey.keycode == (uint32_t) -1) 1020 if (event->xkey.keycode == (uint32_t) -1)
1021 { 1021 {
1022 inev.ie.kind = PREEDIT_TEXT_EVENT; 1022 inev.kind = PREEDIT_TEXT_EVENT;
1023 inev.ie.arg = Qnil; 1023 inev.arg = Qnil;
1024 1024
1025 /* If text was looked up, decode it and make it the 1025 /* If text was looked up, decode it and make it the
1026 preedit text. */ 1026 preedit text. */
@@ -1028,7 +1028,7 @@ handle_one_android_event (struct android_display_info *dpyinfo,
1028 if (status_return == ANDROID_LOOKUP_CHARS && nchars) 1028 if (status_return == ANDROID_LOOKUP_CHARS && nchars)
1029 { 1029 {
1030 copy_bufptr[nchars] = 0; 1030 copy_bufptr[nchars] = 0;
1031 inev.ie.arg = from_unicode_buffer (copy_bufptr); 1031 inev.arg = from_unicode_buffer (copy_bufptr);
1032 } 1032 }
1033 1033
1034 goto done_keysym; 1034 goto done_keysym;
@@ -1047,11 +1047,11 @@ handle_one_android_event (struct android_display_info *dpyinfo,
1047 /* Deal with characters. */ 1047 /* Deal with characters. */
1048 1048
1049 if (copy_bufptr[0] < 128) 1049 if (copy_bufptr[0] < 128)
1050 inev.ie.kind = ASCII_KEYSTROKE_EVENT; 1050 inev.kind = ASCII_KEYSTROKE_EVENT;
1051 else 1051 else
1052 inev.ie.kind = MULTIBYTE_CHAR_KEYSTROKE_EVENT; 1052 inev.kind = MULTIBYTE_CHAR_KEYSTROKE_EVENT;
1053 1053
1054 inev.ie.code = copy_bufptr[0]; 1054 inev.code = copy_bufptr[0];
1055 } 1055 }
1056 else if (nchars < 2 && keysym) 1056 else if (nchars < 2 && keysym)
1057 { 1057 {
@@ -1061,8 +1061,8 @@ handle_one_android_event (struct android_display_info *dpyinfo,
1061 1061
1062 /* Next, deal with special ``characters'' by giving the 1062 /* Next, deal with special ``characters'' by giving the
1063 keycode to keyboard.c. */ 1063 keycode to keyboard.c. */
1064 inev.ie.kind = NON_ASCII_KEYSTROKE_EVENT; 1064 inev.kind = NON_ASCII_KEYSTROKE_EVENT;
1065 inev.ie.code = keysym; 1065 inev.code = keysym;
1066 } 1066 }
1067 else 1067 else
1068 { 1068 {
@@ -1070,25 +1070,25 @@ handle_one_android_event (struct android_display_info *dpyinfo,
1070 1070
1071 for (i = 0; i < nchars; ++i) 1071 for (i = 0; i < nchars; ++i)
1072 { 1072 {
1073 inev.ie.kind = (SINGLE_BYTE_CHAR_P (copy_bufptr[i]) 1073 inev.kind = (SINGLE_BYTE_CHAR_P (copy_bufptr[i])
1074 ? ASCII_KEYSTROKE_EVENT 1074 ? ASCII_KEYSTROKE_EVENT
1075 : MULTIBYTE_CHAR_KEYSTROKE_EVENT); 1075 : MULTIBYTE_CHAR_KEYSTROKE_EVENT);
1076 inev.ie.code = copy_bufptr[i]; 1076 inev.code = copy_bufptr[i];
1077 1077
1078 /* If the character is actually '\n', then change this 1078 /* If the character is actually '\n', then change this
1079 to RET. */ 1079 to RET. */
1080 1080
1081 if (copy_bufptr[i] == '\n') 1081 if (copy_bufptr[i] == '\n')
1082 { 1082 {
1083 inev.ie.kind = NON_ASCII_KEYSTROKE_EVENT; 1083 inev.kind = NON_ASCII_KEYSTROKE_EVENT;
1084 inev.ie.code = 66; 1084 inev.code = 66;
1085 } 1085 }
1086 1086
1087 kbd_buffer_store_buffered_event (&inev, hold_quit); 1087 kbd_buffer_store_event_hold (&inev, hold_quit);
1088 } 1088 }
1089 1089
1090 count += nchars; 1090 count += nchars;
1091 inev.ie.kind = NO_EVENT; /* Already stored above. */ 1091 inev.kind = NO_EVENT; /* Already stored above. */
1092 } 1092 }
1093 1093
1094 goto done_keysym; 1094 goto done_keysym;
@@ -1108,7 +1108,7 @@ handle_one_android_event (struct android_display_info *dpyinfo,
1108 1108
1109 case ANDROID_FOCUS_IN: 1109 case ANDROID_FOCUS_IN:
1110 case ANDROID_FOCUS_OUT: 1110 case ANDROID_FOCUS_OUT:
1111 android_detect_focus_change (dpyinfo, any, event, &inev.ie); 1111 android_detect_focus_change (dpyinfo, any, event, &inev);
1112 goto OTHER; 1112 goto OTHER;
1113 1113
1114 case ANDROID_WINDOW_ACTION: 1114 case ANDROID_WINDOW_ACTION:
@@ -1136,8 +1136,8 @@ handle_one_android_event (struct android_display_info *dpyinfo,
1136 if (!f) 1136 if (!f)
1137 goto OTHER; 1137 goto OTHER;
1138 1138
1139 inev.ie.kind = DELETE_WINDOW_EVENT; 1139 inev.kind = DELETE_WINDOW_EVENT;
1140 XSETFRAME (inev.ie.frame_or_window, f); 1140 XSETFRAME (inev.frame_or_window, f);
1141 } 1141 }
1142 } 1142 }
1143 1143
@@ -1196,8 +1196,8 @@ handle_one_android_event (struct android_display_info *dpyinfo,
1196 && !EQ (window, last_mouse_window) 1196 && !EQ (window, last_mouse_window)
1197 && !EQ (window, selected_window)) 1197 && !EQ (window, selected_window))
1198 { 1198 {
1199 inev.ie.kind = SELECT_WINDOW_EVENT; 1199 inev.kind = SELECT_WINDOW_EVENT;
1200 inev.ie.frame_or_window = window; 1200 inev.frame_or_window = window;
1201 } 1201 }
1202 1202
1203 /* Remember the last window where we saw the mouse. */ 1203 /* Remember the last window where we saw the mouse. */
@@ -1378,10 +1378,10 @@ handle_one_android_event (struct android_display_info *dpyinfo,
1378 if (!(tab_bar_p && NILP (tab_bar_arg)) && !tool_bar_p) 1378 if (!(tab_bar_p && NILP (tab_bar_arg)) && !tool_bar_p)
1379 if (! popup_activated ()) 1379 if (! popup_activated ())
1380 { 1380 {
1381 android_construct_mouse_click (&inev.ie, &event->xbutton, f); 1381 android_construct_mouse_click (&inev, &event->xbutton, f);
1382 1382
1383 if (!NILP (tab_bar_arg)) 1383 if (!NILP (tab_bar_arg))
1384 inev.ie.arg = tab_bar_arg; 1384 inev.arg = tab_bar_arg;
1385 } 1385 }
1386 } 1386 }
1387 1387
@@ -1424,8 +1424,8 @@ handle_one_android_event (struct android_display_info *dpyinfo,
1424 /* Simply update the tool position and send an update. */ 1424 /* Simply update the tool position and send an update. */
1425 touchpoint->x = event->touch.x; 1425 touchpoint->x = event->touch.x;
1426 touchpoint->y = event->touch.y; 1426 touchpoint->y = event->touch.y;
1427 android_update_tools (any, &inev.ie); 1427 android_update_tools (any, &inev);
1428 inev.ie.timestamp = event->touch.time; 1428 inev.timestamp = event->touch.time;
1429 1429
1430 goto OTHER; 1430 goto OTHER;
1431 } 1431 }
@@ -1498,12 +1498,12 @@ handle_one_android_event (struct android_display_info *dpyinfo,
1498 } 1498 }
1499 1499
1500 /* Now generate the Emacs event. */ 1500 /* Now generate the Emacs event. */
1501 inev.ie.kind = TOUCHSCREEN_BEGIN_EVENT; 1501 inev.kind = TOUCHSCREEN_BEGIN_EVENT;
1502 inev.ie.timestamp = event->touch.time; 1502 inev.timestamp = event->touch.time;
1503 XSETFRAME (inev.ie.frame_or_window, any); 1503 XSETFRAME (inev.frame_or_window, any);
1504 XSETINT (inev.ie.x, event->touch.x); 1504 XSETINT (inev.x, event->touch.x);
1505 XSETINT (inev.ie.y, event->touch.y); 1505 XSETINT (inev.y, event->touch.y);
1506 XSETINT (inev.ie.arg, event->touch.pointer_id); 1506 XSETINT (inev.arg, event->touch.pointer_id);
1507 1507
1508 goto OTHER; 1508 goto OTHER;
1509 1509
@@ -1526,8 +1526,8 @@ handle_one_android_event (struct android_display_info *dpyinfo,
1526 1526
1527 touchpoint->x = event->touch.x; 1527 touchpoint->x = event->touch.x;
1528 touchpoint->y = event->touch.y; 1528 touchpoint->y = event->touch.y;
1529 android_update_tools (any, &inev.ie); 1529 android_update_tools (any, &inev);
1530 inev.ie.timestamp = event->touch.time; 1530 inev.timestamp = event->touch.time;
1531 1531
1532 goto OTHER; 1532 goto OTHER;
1533 1533
@@ -1569,18 +1569,18 @@ handle_one_android_event (struct android_display_info *dpyinfo,
1569 grabbed by the tool bar). */ 1569 grabbed by the tool bar). */
1570 xfree (touchpoint); 1570 xfree (touchpoint);
1571 1571
1572 inev.ie.kind = TOUCHSCREEN_END_EVENT; 1572 inev.kind = TOUCHSCREEN_END_EVENT;
1573 inev.ie.timestamp = event->touch.time; 1573 inev.timestamp = event->touch.time;
1574 1574
1575 /* Report whether the sequence has been canceled. */ 1575 /* Report whether the sequence has been canceled. */
1576 1576
1577 if (event->touch.flags & ANDROID_TOUCH_SEQUENCE_CANCELED) 1577 if (event->touch.flags & ANDROID_TOUCH_SEQUENCE_CANCELED)
1578 inev.ie.modifiers = 1; 1578 inev.modifiers = 1;
1579 1579
1580 XSETFRAME (inev.ie.frame_or_window, any); 1580 XSETFRAME (inev.frame_or_window, any);
1581 XSETINT (inev.ie.x, event->touch.x); 1581 XSETINT (inev.x, event->touch.x);
1582 XSETINT (inev.ie.y, event->touch.y); 1582 XSETINT (inev.y, event->touch.y);
1583 XSETINT (inev.ie.arg, event->touch.pointer_id); 1583 XSETINT (inev.arg, event->touch.pointer_id);
1584 1584
1585 /* Break out of the loop. */ 1585 /* Break out of the loop. */
1586 goto OTHER; 1586 goto OTHER;
@@ -1629,24 +1629,24 @@ handle_one_android_event (struct android_display_info *dpyinfo,
1629 } 1629 }
1630 1630
1631 /* Determine what kind of event to send. */ 1631 /* Determine what kind of event to send. */
1632 inev.ie.kind = ((fabs (wheel_event_y) 1632 inev.kind = ((fabs (wheel_event_y)
1633 >= fabs (wheel_event_x)) 1633 >= fabs (wheel_event_x))
1634 ? WHEEL_EVENT : HORIZ_WHEEL_EVENT); 1634 ? WHEEL_EVENT : HORIZ_WHEEL_EVENT);
1635 inev.ie.timestamp = event->wheel.time; 1635 inev.timestamp = event->wheel.time;
1636 1636
1637 /* Set the event coordinates. */ 1637 /* Set the event coordinates. */
1638 XSETINT (inev.ie.x, event->wheel.x); 1638 XSETINT (inev.x, event->wheel.x);
1639 XSETINT (inev.ie.y, event->wheel.y); 1639 XSETINT (inev.y, event->wheel.y);
1640 1640
1641 /* Set the frame. */ 1641 /* Set the frame. */
1642 XSETFRAME (inev.ie.frame_or_window, any); 1642 XSETFRAME (inev.frame_or_window, any);
1643 1643
1644 /* Figure out the scroll direction. */ 1644 /* Figure out the scroll direction. */
1645 inev.ie.modifiers = (signbit ((fabs (wheel_event_x) 1645 inev.modifiers = (signbit ((fabs (wheel_event_x)
1646 >= fabs (wheel_event_y)) 1646 >= fabs (wheel_event_y))
1647 ? wheel_event_x 1647 ? wheel_event_x
1648 : wheel_event_y) 1648 : wheel_event_y)
1649 ? down_modifier : up_modifier); 1649 ? down_modifier : up_modifier);
1650 1650
1651 /* Figure out how much to scale the deltas by. */ 1651 /* Figure out how much to scale the deltas by. */
1652 window = window_from_coordinates (any, event->wheel.x, 1652 window = window_from_coordinates (any, event->wheel.x,
@@ -1664,16 +1664,14 @@ handle_one_android_event (struct android_display_info *dpyinfo,
1664 scroll_unit = pow (scroll_height, 2.0 / 3.0); 1664 scroll_unit = pow (scroll_height, 2.0 / 3.0);
1665 1665
1666 /* Add the keyboard modifiers. */ 1666 /* Add the keyboard modifiers. */
1667 inev.ie.modifiers 1667 inev.modifiers
1668 |= android_android_to_emacs_modifiers (dpyinfo, 1668 |= android_android_to_emacs_modifiers (dpyinfo,
1669 event->wheel.state); 1669 event->wheel.state);
1670 1670
1671 /* Finally include the scroll deltas. */ 1671 /* Finally include the scroll deltas. */
1672 inev.ie.arg = list3 (Qnil, 1672 inev.arg = list3 (Qnil,
1673 make_float (wheel_event_x 1673 make_float (wheel_event_x * scroll_unit),
1674 * scroll_unit), 1674 make_float (wheel_event_y * scroll_unit));
1675 make_float (wheel_event_y
1676 * scroll_unit));
1677 1675
1678 wheel_event_x = 0.0; 1676 wheel_event_x = 0.0;
1679 wheel_event_y = 0.0; 1677 wheel_event_y = 0.0;
@@ -1693,8 +1691,8 @@ handle_one_android_event (struct android_display_info *dpyinfo,
1693 SET_FRAME_VISIBLE (any, false); 1691 SET_FRAME_VISIBLE (any, false);
1694 SET_FRAME_ICONIFIED (any, true); 1692 SET_FRAME_ICONIFIED (any, true);
1695 1693
1696 inev.ie.kind = ICONIFY_EVENT; 1694 inev.kind = ICONIFY_EVENT;
1697 XSETFRAME (inev.ie.frame_or_window, any); 1695 XSETFRAME (inev.frame_or_window, any);
1698 goto OTHER; 1696 goto OTHER;
1699 1697
1700 case ANDROID_DEICONIFIED: 1698 case ANDROID_DEICONIFIED:
@@ -1708,8 +1706,8 @@ handle_one_android_event (struct android_display_info *dpyinfo,
1708 SET_FRAME_VISIBLE (any, true); 1706 SET_FRAME_VISIBLE (any, true);
1709 SET_FRAME_ICONIFIED (any, false); 1707 SET_FRAME_ICONIFIED (any, false);
1710 1708
1711 inev.ie.kind = DEICONIFY_EVENT; 1709 inev.kind = DEICONIFY_EVENT;
1712 XSETFRAME (inev.ie.frame_or_window, any); 1710 XSETFRAME (inev.frame_or_window, any);
1713 goto OTHER; 1711 goto OTHER;
1714 1712
1715 /* Context menu handling. */ 1713 /* Context menu handling. */
@@ -1757,12 +1755,12 @@ handle_one_android_event (struct android_display_info *dpyinfo,
1757 goto OTHER; 1755 goto OTHER;
1758 1756
1759 /* Generate a drag and drop event to convey its position. */ 1757 /* Generate a drag and drop event to convey its position. */
1760 inev.ie.kind = DRAG_N_DROP_EVENT; 1758 inev.kind = DRAG_N_DROP_EVENT;
1761 XSETFRAME (inev.ie.frame_or_window, any); 1759 XSETFRAME (inev.frame_or_window, any);
1762 inev.ie.timestamp = ANDROID_CURRENT_TIME; 1760 inev.timestamp = ANDROID_CURRENT_TIME;
1763 XSETINT (inev.ie.x, event->dnd.x); 1761 XSETINT (inev.x, event->dnd.x);
1764 XSETINT (inev.ie.y, event->dnd.y); 1762 XSETINT (inev.y, event->dnd.y);
1765 inev.ie.arg = Fcons (inev.ie.x, inev.ie.y); 1763 inev.arg = Fcons (inev.x, inev.y);
1766 goto OTHER; 1764 goto OTHER;
1767 1765
1768 case ANDROID_DND_URI_EVENT: 1766 case ANDROID_DND_URI_EVENT:
@@ -1778,15 +1776,15 @@ handle_one_android_event (struct android_display_info *dpyinfo,
1778 content or file URI or a string to be inserted. Generate an 1776 content or file URI or a string to be inserted. Generate an
1779 event with this information. */ 1777 event with this information. */
1780 1778
1781 inev.ie.kind = DRAG_N_DROP_EVENT; 1779 inev.kind = DRAG_N_DROP_EVENT;
1782 XSETFRAME (inev.ie.frame_or_window, any); 1780 XSETFRAME (inev.frame_or_window, any);
1783 inev.ie.timestamp = ANDROID_CURRENT_TIME; 1781 inev.timestamp = ANDROID_CURRENT_TIME;
1784 XSETINT (inev.ie.x, event->dnd.x); 1782 XSETINT (inev.x, event->dnd.x);
1785 XSETINT (inev.ie.y, event->dnd.y); 1783 XSETINT (inev.y, event->dnd.y);
1786 inev.ie.arg = Fcons ((event->type == ANDROID_DND_TEXT_EVENT 1784 inev.arg = Fcons ((event->type == ANDROID_DND_TEXT_EVENT
1787 ? Qtext : Quri), 1785 ? Qtext : Quri),
1788 android_decode_utf16 (event->dnd.uri_or_string, 1786 android_decode_utf16 (event->dnd.uri_or_string,
1789 event->dnd.length)); 1787 event->dnd.length));
1790 free (event->dnd.uri_or_string); 1788 free (event->dnd.uri_or_string);
1791 goto OTHER; 1789 goto OTHER;
1792 1790
@@ -1794,15 +1792,14 @@ handle_one_android_event (struct android_display_info *dpyinfo,
1794 case ANDROID_NOTIFICATION_ACTION: 1792 case ANDROID_NOTIFICATION_ACTION:
1795 1793
1796 if (event->notification.type == ANDROID_NOTIFICATION_DELETED) 1794 if (event->notification.type == ANDROID_NOTIFICATION_DELETED)
1797 android_notification_deleted (&event->notification, &inev.ie); 1795 android_notification_deleted (&event->notification, &inev);
1798 else 1796 else
1799 { 1797 {
1800 Lisp_Object action; 1798 Lisp_Object action;
1801 1799
1802 action = android_decode_utf16 (event->notification.action, 1800 action = android_decode_utf16 (event->notification.action,
1803 event->notification.length); 1801 event->notification.length);
1804 android_notification_action (&event->notification, &inev.ie, 1802 android_notification_action (&event->notification, &inev, action);
1805 action);
1806 } 1803 }
1807 1804
1808 /* Free dynamically allocated data. */ 1805 /* Free dynamically allocated data. */
@@ -1815,9 +1812,9 @@ handle_one_android_event (struct android_display_info *dpyinfo,
1815 } 1812 }
1816 1813
1817 OTHER: 1814 OTHER:
1818 if (inev.ie.kind != NO_EVENT) 1815 if (inev.kind != NO_EVENT)
1819 { 1816 {
1820 kbd_buffer_store_buffered_event (&inev, hold_quit); 1817 kbd_buffer_store_event_hold (&inev, hold_quit);
1821 count++; 1818 count++;
1822 } 1819 }
1823 1820