mirror of
https://github.com/reactos/reactos.git
synced 2025-06-22 10:01:49 +00:00
don't change selection if not capturing the console window
svn path=/trunk/; revision=10310
This commit is contained in:
parent
310098e324
commit
a8c60b138d
1 changed files with 9 additions and 4 deletions
|
@ -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
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS system libraries
|
* PROJECT: ReactOS system libraries
|
||||||
|
@ -34,6 +34,7 @@ typedef struct GUI_CONSOLE_DATA_TAG
|
||||||
HBITMAP MemoryBitmap;
|
HBITMAP MemoryBitmap;
|
||||||
RECT Selection;
|
RECT Selection;
|
||||||
POINT SelectionStart;
|
POINT SelectionStart;
|
||||||
|
BOOL MouseDown;
|
||||||
} GUI_CONSOLE_DATA, *PGUI_CONSOLE_DATA;
|
} GUI_CONSOLE_DATA, *PGUI_CONSOLE_DATA;
|
||||||
|
|
||||||
#ifndef WM_APP
|
#ifndef WM_APP
|
||||||
|
@ -639,6 +640,8 @@ GuiConsoleLeftMouseDown(HWND hWnd, LPARAM lParam)
|
||||||
|
|
||||||
SetCapture(hWnd);
|
SetCapture(hWnd);
|
||||||
|
|
||||||
|
GuiData->MouseDown = TRUE;
|
||||||
|
|
||||||
GuiConsoleUpdateSelection(hWnd, &rc, GuiData);
|
GuiConsoleUpdateSelection(hWnd, &rc, GuiData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -652,7 +655,7 @@ GuiConsoleLeftMouseUp(HWND hWnd, LPARAM lParam)
|
||||||
|
|
||||||
GuiConsoleGetDataPointers(hWnd, &Console, &GuiData);
|
GuiConsoleGetDataPointers(hWnd, &Console, &GuiData);
|
||||||
if (Console == NULL || GuiData == NULL) return;
|
if (Console == NULL || GuiData == NULL) return;
|
||||||
if (GuiData->Selection.left == -1) return;
|
if (GuiData->Selection.left == -1 || !GuiData->MouseDown) return;
|
||||||
|
|
||||||
pt = MAKEPOINTS(lParam);
|
pt = MAKEPOINTS(lParam);
|
||||||
|
|
||||||
|
@ -676,6 +679,8 @@ GuiConsoleLeftMouseUp(HWND hWnd, LPARAM lParam)
|
||||||
rc.top = max(rc.bottom - 1, 0);
|
rc.top = max(rc.bottom - 1, 0);
|
||||||
rc.bottom = tmp + 1;
|
rc.bottom = tmp + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GuiData->MouseDown = FALSE;
|
||||||
|
|
||||||
GuiConsoleUpdateSelection(hWnd, &rc, GuiData);
|
GuiConsoleUpdateSelection(hWnd, &rc, GuiData);
|
||||||
|
|
||||||
|
@ -693,8 +698,8 @@ GuiConsoleMouseMove(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||||
if (!(wParam & MK_LBUTTON)) return;
|
if (!(wParam & MK_LBUTTON)) return;
|
||||||
|
|
||||||
GuiConsoleGetDataPointers(hWnd, &Console, &GuiData);
|
GuiConsoleGetDataPointers(hWnd, &Console, &GuiData);
|
||||||
if (Console == NULL || GuiData == NULL) return;
|
if (Console == NULL || GuiData == NULL || !GuiData->MouseDown) return;
|
||||||
|
|
||||||
pt = MAKEPOINTS(lParam);
|
pt = MAKEPOINTS(lParam);
|
||||||
|
|
||||||
rc.left = GuiData->SelectionStart.x;
|
rc.left = GuiData->SelectionStart.x;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue