emacs-devel
[Top][All Lists]
Advanced

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

Re: Emacs Mac port


From: YAMAMOTO Mitsuharu
Subject: Re: Emacs Mac port
Date: Mon, 30 Oct 2017 17:57:07 +0900
User-agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shijō) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI)

>>>>> On Mon, 30 Oct 2017 09:25:46 +0100, martin rudalics <address@hidden> said:

>>>> (2) Putting the mouse over a tool-bar button, so that the
>>>> corresponding tooltip appear, and then quickly dragging the frame
>>>> with the mouse to another place on the screen, the tooltip is still
>>>> shown for some time at the original screen position.

> How can you reproduce that?  Here the tooltip disappears immediately
> when moving the mouse from the tool bar button to the frame border.

The Mac port is a bit special in the sense that the tooltip for a
toolkit tool bar button is not shown by the toolkit but as a Emacs tip
frame.  Also, unlike the case of GTK+ (with x-gtk-use-system-tooltips
= nil) which has callbacks to show/hide tooltips, it is processed by
the callback for mouse movement events as in non-toolkit tool bars on
X11.

>> I think I could find the cause of this problem finally.  It took a
>> long time because it was in the platform-independent part.  I'm still
>> not sure if the patch below is the right way, but could you check if
>> this also works for your case?

> You mean that the help_echo_string built by

>        if (cursor != FRAME_X_OUTPUT (f)->nontext_cursor)
>       {
>         /* Do we really want a help echo here?  */
>         help_echo_string = build_string ("drag-mouse-1: resize frame");
>         goto set_cursor;

> should be immediately erased when we "have a window" and be left as is
> when we just "have a frame"?  Or am I missing something else?

As I said in the previous mail, I'm still not sure this is the right
way (especially about the tooltip for internal border resizing).  I
just tried reverting a part of change between Emacs 25.3, which does
not show the problem the OP described, and Emacs 26.0.90.

I think the problem is that help_echo_string can be set to nil without
hiding the tooltip, if returning early (i.e., when !WINDOWP (window))
from note_mouse_highlight. The code to show/hide tooltip for the tool
bar in the Mac port is similar to the one on X11 below:

  8568      case MotionNotify:
  8569        {
  8570          x_display_set_last_user_time (dpyinfo, event->xmotion.time);
  8571          previous_help_echo_string = help_echo_string;
  8572          help_echo_string = Qnil;

        :

  8648          /* If the contents of the global variable help_echo_string
  8649             has changed, generate a HELP_EVENT.  */
  8650          if (!NILP (help_echo_string)
  8651              || !NILP (previous_help_echo_string))
  8652            do_help = 1;
  8653          goto OTHER;
  8654        }

If help_echo_string = nil at Line 8572 but the tooltip is actually
shown, and the lines between 8573 and 8648 do not set help_echo_string
(as no help string to show), then the do_help is not set and thus the
tooltip is not hidden.

                                     YAMAMOTO Mitsuharu
                                address@hidden



reply via email to

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