[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/w32fns.c
From: |
Jan Djärv |
Subject: |
[Emacs-diffs] Changes to emacs/src/w32fns.c |
Date: |
Mon, 12 Dec 2005 09:32:59 +0000 |
Index: emacs/src/w32fns.c
diff -u emacs/src/w32fns.c:1.259 emacs/src/w32fns.c:1.260
--- emacs/src/w32fns.c:1.259 Fri Dec 9 19:29:58 2005
+++ emacs/src/w32fns.c Mon Dec 12 09:32:59 2005
@@ -7411,16 +7411,15 @@
if (INTEGERP (top))
*root_y = XINT (top);
- else if (*root_y + XINT (dy) - height < 0)
- *root_y -= XINT (dy);
- /* If there's not enough place below the pointer, put tip above it. */
- else if (*root_y + XINT (dy) >= FRAME_W32_DISPLAY_INFO (f)->height)
- *root_y -= XINT (dy);
- else
- {
- *root_y -= height;
+ else if (*root_y + XINT (dy) + height <= FRAME_W32_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);