Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs16:/tmp/cvs-serv12731/src Modified Files: mswindow.c Log Message: Fixed richtext windows to allow scrollback to read message history, and at the same time ensure windows never get "stuck" in unscrolled position accidentally. Updated hints on new resize procedure. Cleared todo list of richtext issues, all known issues have been solved. Index: mswindow.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/mswindow.c,v retrieving revision 1.71 retrieving revision 1.72 diff -u -d -r1.71 -r1.72 --- mswindow.c 14 Apr 2007 03:48:47 -0000 1.71 +++ mswindow.c 14 Apr 2007 05:14:23 -0000 1.72 @@ -6067,6 +6067,7 @@ HWND hwnd; CHARRANGE cr; int numLines, visibleLines; + int x, y; //Find the end of the linked-list of strings... if (p) // ...if the list has been created @@ -6152,7 +6153,10 @@ diff = numLines - point.y / W_Textheight - visibleLines; if (diff >= 1) { - point.y += W_Textheight * diff; + // Scroll if mouse isn't in window, or if mouse is in + // window but scrollback is already at bottom + if (!findMouseInWin (& x, &y, (W_Window) win) || diff == 1) + point.y += W_Textheight * diff; SendMessage (win->hwnd, EM_SETSCROLLPOS, 0, (LPARAM) &point); } //SendMessage (win->hwnd, EM_HIDESELECTION, FALSE, 0);