Commit in reactos/subsys/csrss/win32csr on MAIN
guiconsole.c+9-41.17 -> 1.18
don't change selection if not capturing the console window

reactos/subsys/csrss/win32csr
guiconsole.c 1.17 -> 1.18
diff -u -r1.17 -r1.18
--- guiconsole.c	29 Jul 2004 13:43:38 -0000	1.17
+++ guiconsole.c	29 Jul 2004 13:54:45 -0000	1.18
@@ -1,4 +1,4 @@
-/* $Id: guiconsole.c,v 1.17 2004/07/29 13:43:38 weiden Exp $
+/* $Id: guiconsole.c,v 1.18 2004/07/29 13:54:45 weiden Exp $
  *
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS system libraries
@@ -34,6 +34,7 @@
   HBITMAP MemoryBitmap;
   RECT Selection;
   POINT SelectionStart;
+  BOOL MouseDown;
 } GUI_CONSOLE_DATA, *PGUI_CONSOLE_DATA;
 
 #ifndef WM_APP
@@ -639,6 +640,8 @@
   
   SetCapture(hWnd);
   
+  GuiData->MouseDown = TRUE;
+  
   GuiConsoleUpdateSelection(hWnd, &rc, GuiData);
 }
 
@@ -652,7 +655,7 @@
   
   GuiConsoleGetDataPointers(hWnd, &Console, &GuiData);
   if (Console == NULL || GuiData == NULL) return;
-  if (GuiData->Selection.left == -1) return;
+  if (GuiData->Selection.left == -1 || !GuiData->MouseDown) return;
   
   pt = MAKEPOINTS(lParam);
   
@@ -676,6 +679,8 @@
     rc.top = max(rc.bottom - 1, 0);
     rc.bottom = tmp + 1;
   }
+  
+  GuiData->MouseDown = FALSE;
 
   GuiConsoleUpdateSelection(hWnd, &rc, GuiData);
   
@@ -693,8 +698,8 @@
   if (!(wParam & MK_LBUTTON)) return;
   
   GuiConsoleGetDataPointers(hWnd, &Console, &GuiData);
-  if (Console == NULL || GuiData == NULL) return;
-  
+  if (Console == NULL || GuiData == NULL || !GuiData->MouseDown) return;
+
   pt = MAKEPOINTS(lParam);
 
   rc.left = GuiData->SelectionStart.x;
CVSspam 0.2.8