From 7cea38bcc881d454fd99094df4458af6d80f492f Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Tue, 18 Jul 2000 18:23:29 +0000 Subject: [PATCH] (help_echo_window): New variable. (note_mouse_highlight, note_tool_bar_highlight): Set help_echo_window. (XTread_socket): Pass help_echo_window to gen_help_event. (syms_of_xterm): Initialize and staticpro help_echo_window. --- src/ChangeLog | 18 ++++++++++++++++++ src/xterm.c | 15 +++++++++++---- 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 84bea05108c..2ecdc87e7c8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,21 @@ +2000-07-18 Gerd Moellmann + + * xmenu.c (menu_help_callback): Call show_help_echo with + new arguments. + + * keyboard.c (show_help_echo): Add parameter WINDOW. + (read_char): Call show_help_echo with window extracted from Lisp + help event. + (gen_help_event): Add parameter WINDOW. + + * keyboard.h (show_help_echo, gen_help_event): Change prototypes. + + * xterm.c (help_echo_window): New variable. + (note_mouse_highlight, note_tool_bar_highlight): Set + help_echo_window. + (XTread_socket): Pass help_echo_window to gen_help_event. + (syms_of_xterm): Initialize and staticpro help_echo_window. + 2000-07-18 Dave Love * Makefile.in: Fix dependencies of blockinput.h on atimer.h, diff --git a/src/xterm.c b/src/xterm.c index 58dc0143fa7..48caa78bffc 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -243,6 +243,7 @@ int x_toolkit_scroll_bars_p; (The display is done in read_char.) */ static Lisp_Object help_echo; +static Lisp_Object help_echo_window; static Lisp_Object help_echo_object; static int help_echo_pos; @@ -6356,6 +6357,7 @@ note_mode_line_highlight (w, x, mode_line_p) if (!NILP (help)) { help_echo = help; + XSETWINDOW (help_echo_window, w); help_echo_object = glyph->object; help_echo_pos = glyph->charpos; } @@ -6627,6 +6629,7 @@ note_mouse_highlight (f, x, y) if (!NILP (help)) { help_echo = help; + help_echo_window = window; help_echo_object = w->buffer; help_echo_pos = pos; } @@ -6645,6 +6648,7 @@ note_mouse_highlight (f, x, y) if (!NILP (help)) { help_echo = help; + help_echo_window = window; help_echo_object = glyph->object; help_echo_pos = glyph->charpos; } @@ -6880,7 +6884,7 @@ note_tool_bar_highlight (f, x, y) /* Set help_echo to a help string.to display for this tool-bar item. XTread_socket does the rest. */ - help_echo_object = Qnil; + help_echo_object = help_echo_window = Qnil; help_echo_pos = -1; help_echo = (XVECTOR (f->current_tool_bar_items) ->contents[prop_idx + TOOL_BAR_ITEM_HELP]); @@ -9800,7 +9804,7 @@ XTread_socket (sd, bufp, numchars, expected) int n; XSETFRAME (frame, f); - n = gen_help_event (bufp, Qnil, frame, Qnil, 0); + n = gen_help_event (bufp, Qnil, frame, Qnil, Qnil, 0); bufp += n, count += n, numchars -= n; } @@ -9848,7 +9852,7 @@ XTread_socket (sd, bufp, numchars, expected) case MotionNotify: { previous_help_echo = help_echo; - help_echo = help_echo_object = Qnil; + help_echo = help_echo_object = help_echo_window = Qnil; help_echo_pos = -1; if (dpyinfo->grabbed && last_mouse_frame @@ -9889,7 +9893,8 @@ XTread_socket (sd, bufp, numchars, expected) any_help_event_p = 1; n = gen_help_event (bufp, help_echo, frame, - help_echo_object, help_echo_pos); + help_echo_window, help_echo_object, + help_echo_pos); bufp += n, count += n, numchars -= n; } @@ -13597,6 +13602,8 @@ syms_of_xterm () staticpro (&help_echo); help_echo_object = Qnil; staticpro (&help_echo_object); + help_echo_window = Qnil; + staticpro (&help_echo_window); previous_help_echo = Qnil; staticpro (&previous_help_echo); help_echo_pos = -1; -- 2.39.2