[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 2ea4b84: Fix NS tooltips showing in the wrong place
From: |
Alan Third |
Subject: |
[Emacs-diffs] master 2ea4b84: Fix NS tooltips showing in the wrong place (bug#27053) |
Date: |
Thu, 25 May 2017 16:53:28 -0400 (EDT) |
branch: master
commit 2ea4b84f5ee41e633430eef6b4a907dd8d0ce2ed
Author: Alan Third <address@hidden>
Commit: Alan Third <address@hidden>
Fix NS tooltips showing in the wrong place (bug#27053)
* src/nsfns.m (compute_tip_xy): Get current mouse position instead of
last recorded position.
---
src/nsfns.m | 19 +------------------
1 file changed, 1 insertion(+), 18 deletions(-)
diff --git a/src/nsfns.m b/src/nsfns.m
index 3833ee7..a69e44b 100644
--- a/src/nsfns.m
+++ b/src/nsfns.m
@@ -2729,8 +2729,6 @@ compute_tip_xy (struct frame *f,
int *root_y)
{
Lisp_Object left, top, right, bottom;
- EmacsView *view = FRAME_NS_VIEW (f);
- struct ns_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
NSPoint pt;
NSScreen *screen;
@@ -2742,22 +2740,7 @@ compute_tip_xy (struct frame *f,
if ((!INTEGERP (left) && !INTEGERP (right))
|| (!INTEGERP (top) && !INTEGERP (bottom)))
- {
- pt.x = dpyinfo->last_mouse_motion_x;
- pt.y = dpyinfo->last_mouse_motion_y;
- /* Convert to screen coordinates */
- pt = [view convertPoint: pt toView: nil];
-#if !defined (NS_IMPL_COCOA) || MAC_OS_X_VERSION_MAX_ALLOWED <
MAC_OS_X_VERSION_10_7
- pt = [[view window] convertBaseToScreen: pt];
-#else
- {
- NSRect r = NSMakeRect (pt.x, pt.y, 0, 0);
- r = [[view window] convertRectToScreen: r];
- pt.x = r.origin.x;
- pt.y = r.origin.y;
- }
-#endif
- }
+ pt = [NSEvent mouseLocation];
else
{
/* Absolute coordinates. */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 2ea4b84: Fix NS tooltips showing in the wrong place (bug#27053),
Alan Third <=