bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#26905: 25.2: MacOS: tooltips show in wrong display


From: Charles A. Roelli
Subject: bug#26905: 25.2: MacOS: tooltips show in wrong display
Date: Sat, 13 May 2017 11:02:04 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

If I remove the marked lines in compute_tip_xy:

    if (INTEGERP (left) || INTEGERP (right))
      *root_x = pt.x;
=>  else if (pt.x + XINT (dx) <= 0)
=>    *root_x = 0; /* Can happen for negative dx */
    else if (pt.x + XINT (dx) + width
             <= x_display_pixel_width (FRAME_DISPLAY_INFO (f)))
      /* It fits to the right of the pointer.  */
      *root_x = pt.x + XINT (dx);
    else if (width + XINT (dx) <= pt.x)
      /* It fits to the left of the pointer.  */
      *root_x = pt.x - width - XINT (dx);
    else
/* Put it left justified on the screen -- it ought to fit that way. */
      *root_x = 0;

Then the problem is gone.

I notice now, though, that the tooltip can end up partially offscreen, both with and without the above change (e.g. when you create a tooltip with the mouse pointer at the right edge of the primary monitor). IIRC on GNU/Linux the tooltip is adjusted to fit on screen. Maybe this adjustment works on newer versions of OS X?






reply via email to

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