changeset 1507:fbe9028af341

Make sure OS/2 tooltips are visible on the screen.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Tue, 27 Dec 2011 00:15:51 +0000
parents 308bfa8426db
children 9b2600034473
files os2/dw.c
diffstat 1 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/os2/dw.c	Mon Dec 26 23:53:07 2011 +0000
+++ b/os2/dw.c	Tue Dec 27 00:15:51 2011 +0000
@@ -1650,7 +1650,15 @@
                 lHight = txtPointl[TXTBOX_TOPLEFT].y -
                     txtPointl[TXTBOX_BOTTOMLEFT].y + 8;
 
-                ptlWork.y -= lHight;
+                ptlWork.y -= lHight + 2;
+
+                /* Make sure it is visible on the screen */
+                if(ptlWork.x + lWidth > dw_screen_width())
+                {
+                    ptlWork.x = dw_screen_width() - lWidth;
+                    if(ptlWork.x < 0)
+                        ptlWork.x = 0;
+                }
 
                 bubbleproc = (void *)WinSubclassWindow(hwndBubble, _BubbleProc);