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: Sun, 01 Nov 2020 07:56:37 -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?

I completely agree, not just for this code but also for mouse handling in general. I think there should be a shared mouse interface with individual C functions for each type of mouse event: mouse move, mouse click, etc. Translating OS-specific events to this shared functionality would continue to be OS-specific, but the actual handling of these events, such as this logic, would be fully shared. For example, this would unify the different codepaths between TTY menus for GPM, xterm-mouse, and NT Emacs.

I would be happy to help with this next. However I need some help. I can only locally build and test for Linux terminal with xterm-mouse or GPM handling the mouse. Is there someone who can help for other platforms? And should the GUI platforms be included as well? (I suspect yes is the right answer.)

  -- MJF



reply via email to

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