emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mouse-face and help echo support for xterm mouse


From: Jared Finder
Subject: Re: mouse-face and help echo support for xterm mouse
Date: Thu, 05 Nov 2020 00:15:10 -0800
User-agent: Roundcube Webmail/1.3.15



On 2020-11-01 5:39 am, Stefan Monnier wrote:
Hi Jared,

I really like this new feature but have just one comment/question?

+  previous_help_echo_string = help_echo_string;
+  help_echo_string = Qnil;
+
+ note_mouse_highlight(XFRAME(frame), XFIXNUM (mouse_x), XFIXNUM (mouse_y));
+
+  if (!NILP (help_echo_string)
+      || !NILP (previous_help_echo_string))
+    {
+      gen_help_event (help_echo_string, frame, help_echo_window,
+                      help_echo_object, help_echo_pos);
+    }

I see this exact same code in other C files.
Could we move it to a file where we can share it instead of having
N copies?

With the code simplification in, this logic is now sharable between xterm-mouse and GPM. Attached is an updated patch.

This patch does have one actual logic change: Previously handle_one_term_event might call gen_help_event if a GPM_MOVE_EVENT or GPM_DRAG_EVENT happened but the mouse position did not change. With this patch, this is no longer the case. From testing locally with running GPM mouse, this seems to not cause any user-visible change.

  -- MJF

Attachment: 0001-Face-changing-text-properties-and-help-echo-now-work.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]