From 0f1a9b2356e3eb8ddfea1f26f3d8812e568f7d03 Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Thu, 13 Jul 2000 14:09:50 +0000 Subject: [PATCH] (x_handle_tool_bar_click): Store the frame in the frame_or_window slot of TOOL_BAR_EVENT input events instead of consing. For prefix events, store the frame in the `arg' slot of the event, otherwise store the key there. (XTread_socket): Instead of consing, use the frame_or_window slot of HELP_EVENTs for the frame, and the `arg' slot for the help string. --- src/ChangeLog | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++ src/xterm.c | 12 +++++++---- 2 files changed, 67 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 99c6bce5c87..aa18ee166ff 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,62 @@ +2000-07-13 Gerd Moellmann + + * xterm.c (x_handle_tool_bar_click): Store the frame in the + frame_or_window slot of TOOL_BAR_EVENT input events instead of + consing. For prefix events, store the frame in the `arg' slot of + the event, otherwise store the key there. + (XTread_socket): Instead of consing, use the frame_or_window slot + of HELP_EVENTs for the frame, and the `arg' slot for the help + string. + + * xmenu.c (menu_highlight_callback): Store help string in the + `arg' member of the input event; don't cons. + (menubar_selection_callback): Use the `arg' slot of input events + to queue additional information, instead of consing. + + * msdos.c (dos_rawgetc): Adapt to change of HELP_EVENTs. + + * w32term.c (w32_handle_tool_bar_click): Adapt to changes in + TOOL_BAR_EVENTs. + (w32_read_socket): Adapt to changes in HELP_EVENTs. + + * w32menu.c (menubar_selection_callback): Use the `arg' slot of + input events to queue additional information, instead of consing. + + * keyboard.c (kbd_buffer_gcpro): Renamed from + kbd_buffer_frame_or_window. Now used for all Lisp objects + referenced from the input queue. + (kbd_buffer_store_event): Always use structure assignment for + copying input events. Record all Lisp objects referenced from + events in kbd_buffer_gcpro. + (kbd_buffer_get_event): Construct Lisp `help-echo' events + differently from input events. Test for prefix menu_bar_events + and TOOL_BAR_EVENTs differently. Reset all slots used by an input + event in kbd_buffer_gcpro to nil. + (make_lispy_event) : Treat an input event whose + frame_or_window is equal to its arg member as prefix events. + (stuff_buffered_input): Reset all slots in kbd_buffer_gcpro + used by an input event to nil. + (init_keyboard): Use two times the size of the input queue + for kbd_buffer_gcpro. + (syms_of_keyboard): Likewise. + + * emacs.c (handle_USR2_signal, handle_USR1_signal): Use + USER_SIGNAL_EVENT. + + * termhooks.h (struct input_event): Add member `arg'. + (MENU_BAR_EVENT): Renamed from menu_bar_event. + (USER_SIGNAL_EVENT): Renamed from user_signal. + + * xfaces.c (ASET): Remove definition. + + * lisp.h (AREF, ASET, ASIZE): New macros. + + * fontset.c (AREF, ASIZE): Remove definitions. + + * fns.c (AREF): Remove definition. + + * composite.c (AREF): Remove definition. + 2000-07-12 Gerd Moellmann * dispnew.c (redraw_overlapped_rows): Add missing local. diff --git a/src/xterm.c b/src/xterm.c index 2a804dbc830..f2068c48043 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -6780,11 +6780,13 @@ x_handle_tool_bar_click (f, button_event) XSETFRAME (frame, f); event.kind = TOOL_BAR_EVENT; - event.frame_or_window = Fcons (frame, Fcons (Qtool_bar, Qnil)); + event.frame_or_window = frame; + event.arg = frame; kbd_buffer_store_event (&event); event.kind = TOOL_BAR_EVENT; - event.frame_or_window = Fcons (frame, key); + event.frame_or_window = frame; + event.arg = key; event.modifiers = x_x_to_emacs_modifiers (FRAME_X_DISPLAY_INFO (f), button_event->state); kbd_buffer_store_event (&event); @@ -9785,7 +9787,8 @@ XTread_socket (sd, bufp, numchars, expected) { XSETFRAME (frame, f); bufp->kind = HELP_EVENT; - bufp->frame_or_window = Fcons (frame, Qnil); + bufp->frame_or_window = frame; + bufp->arg = Qnil; ++bufp, ++count, --numchars; } @@ -9872,7 +9875,8 @@ XTread_socket (sd, bufp, numchars, expected) any_help_event_p = 1; bufp->kind = HELP_EVENT; - bufp->frame_or_window = Fcons (frame, help_echo); + bufp->frame_or_window = frame; + bufp->arg = help_echo; ++bufp, ++count, --numchars; } -- 2.39.2