Update of /cvsroot/netrek/client/netrekxp/src
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv484/src

Modified Files:
        getname.c mswindow.c 
Log Message:
Changing email address.
Finalizing changes list and cleaning up todo list for release.
Fix for messages that are printed outside viewable area - ScrollDC garbles 
scrolling
in such cases, so instead we shall use a full window redraw if the window is 
beyond
the client borders.

Index: getname.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/getname.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- getname.c   12 May 2006 01:58:37 -0000      1.6
+++ getname.c   13 Jan 2007 02:53:27 -0000      1.7
@@ -79,11 +79,11 @@
         "      No one takes responsibility for lost INL games etc.",
         "      Use at your own risk! If you don't like it, don't use it.",
         "",
-        "Comments, suggestions, bugreports to: [EMAIL PROTECTED]",
+        "Comments, suggestions, bugreports to: [EMAIL PROTECTED]",
         "",
         "Include version and architecture info in bug reports",
         "",
-        "Patches to: [EMAIL PROTECTED]",
+        "Patches to: [EMAIL PROTECTED]",
         "",
     };
     int i, length;

Index: mswindow.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/mswindow.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- mswindow.c  12 Jan 2007 18:06:55 -0000      1.40
+++ mswindow.c  13 Jan 2007 02:53:27 -0000      1.41
@@ -4539,6 +4539,9 @@
     struct stringList *p;
     int HiddenLines;
     int y;
+    int clipped = 0;
+    RECT r;
+    WINDOWPLACEMENT loc;
     FNHEADER_VOID;
 
     if (!win->AddedStrings)
@@ -4546,6 +4549,8 @@
 
     y = win->NumItems - win->TextHeight;
     y = max (0, y);
+ 
+    loc.length = sizeof (WINDOWPLACEMENT); /* Have to set this */
 
     // Just update scrollbar if we are looking back
     if ((y - win->AddedStrings) > GetScrollPos (win->hwnd, SB_VERT))
@@ -4554,12 +4559,22 @@
         win->AddedStrings = 0;
         return;
     }
-    //Do full redraw if faster, only works for mapped windows
-    if (win->AddedStrings > (win->TextHeight / 2) && W_IsMapped(window))
+    // For mapped windows, do full redraw if more than half of window content
+    // is changed, or if part of window is outside viewable area, because
+    // ScrollDC fails to properly scroll text in such cases
+    if (W_IsMapped(window))
     {
-        InvalidateRect (win->hwnd, NULL, FALSE);
-        UpdateWindow (win->hwnd);       //Generates paint msg, which calls 
RedrawScrolling
-        return;
+       GetWindowPlacement (win->hwnd, &loc);
+       GetWindowRect (((Window *) baseWin)->hwnd, &r);
+       if (loc.rcNormalPosition.left < r.left || loc.rcNormalPosition.right > 
r.right
+       || loc.rcNormalPosition.top < r.top || loc.rcNormalPosition.bottom > 
r.bottom)
+           clipped = 1;
+       if (win->AddedStrings > (win->TextHeight / 2) || clipped)
+       {
+            InvalidateRect (win->hwnd, NULL, FALSE);
+            UpdateWindow (win->hwnd);       //Generates paint msg, which calls 
RedrawScrolling
+            return;
+        }
     }
 
     //Setup the HDC


_______________________________________________
netrek-cvs mailing list
[email protected]
http://mailman.us.netrek.org/mailman/listinfo/netrek-cvs

Reply via email to