emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/src/xfns.c


From: Jan Djärv
Subject: [Emacs-diffs] Changes to emacs/src/xfns.c
Date: Mon, 12 Dec 2005 09:32:41 +0000

Index: emacs/src/xfns.c
diff -u emacs/src/xfns.c:1.650 emacs/src/xfns.c:1.651
--- emacs/src/xfns.c:1.650      Sat Dec 10 00:38:16 2005
+++ emacs/src/xfns.c    Mon Dec 12 09:32:40 2005
@@ -4940,16 +4940,15 @@
 
   if (INTEGERP (top))
     *root_y = XINT (top);
-  else if (*root_y + XINT (dy) - height < 0)
-    *root_y -= XINT (dy);
-  else if (*root_y + XINT (dy) >= FRAME_X_DISPLAY_INFO (f)->height)
-    /* Put tip above the pointer.  */
-    *root_y -= XINT (dy);
-  else
-    {
-      *root_y -= height;
+  else if (*root_y + XINT (dy) + height <= FRAME_X_DISPLAY_INFO (f)->height)
+    /* It fits below the pointer */
       *root_y += XINT (dy);
-    }
+  else if (height + XINT (dy) <= *root_y)
+    /* It fits above the pointer.  */
+    *root_y -= height + XINT (dy);
+  else
+    /* Put it on the top.  */
+    *root_y = 0;
 
   if (INTEGERP (left))
     *root_x = XINT (left);




reply via email to

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