mirror of
https://github.com/reactos/reactos.git
synced 2024-11-27 13:33:32 +08:00
[CONSRV] Don't blink cursor if the console window is not active (#5601)
Co-authored-by: Stanislav Motylkov <x86corez@gmail.com>
This commit is contained in:
parent
710df1361c
commit
7c2e8c67f1
@ -642,6 +642,7 @@ OnNcCreate(HWND hWnd, LPCREATESTRUCTW Create)
|
|||||||
|
|
||||||
GuiData->hWindow = hWnd;
|
GuiData->hWindow = hWnd;
|
||||||
GuiData->hSysMenu = GetSystemMenu(hWnd, FALSE);
|
GuiData->hSysMenu = GetSystemMenu(hWnd, FALSE);
|
||||||
|
GuiData->IsWindowActive = FALSE;
|
||||||
|
|
||||||
/* Initialize the fonts */
|
/* Initialize the fonts */
|
||||||
if (!InitFonts(GuiData,
|
if (!InitFonts(GuiData,
|
||||||
@ -725,6 +726,8 @@ OnActivate(PGUI_CONSOLE_DATA GuiData, WPARAM wParam)
|
|||||||
|
|
||||||
DPRINT("WM_ACTIVATE - ActivationState = %d\n", ActivationState);
|
DPRINT("WM_ACTIVATE - ActivationState = %d\n", ActivationState);
|
||||||
|
|
||||||
|
GuiData->IsWindowActive = (ActivationState != WA_INACTIVE);
|
||||||
|
|
||||||
if ( ActivationState == WA_ACTIVE ||
|
if ( ActivationState == WA_ACTIVE ||
|
||||||
ActivationState == WA_CLICKACTIVE )
|
ActivationState == WA_CLICKACTIVE )
|
||||||
{
|
{
|
||||||
@ -1324,8 +1327,11 @@ OnTimer(PGUI_CONSOLE_DATA GuiData)
|
|||||||
if (GetType(Buff) == TEXTMODE_BUFFER)
|
if (GetType(Buff) == TEXTMODE_BUFFER)
|
||||||
{
|
{
|
||||||
/* Repaint the caret */
|
/* Repaint the caret */
|
||||||
InvalidateCell(GuiData, Buff->CursorPosition.X, Buff->CursorPosition.Y);
|
if (GuiData->IsWindowActive || Buff->CursorBlinkOn)
|
||||||
Buff->CursorBlinkOn = !Buff->CursorBlinkOn;
|
{
|
||||||
|
InvalidateCell(GuiData, Buff->CursorPosition.X, Buff->CursorPosition.Y);
|
||||||
|
Buff->CursorBlinkOn = !Buff->CursorBlinkOn;
|
||||||
|
}
|
||||||
|
|
||||||
if ((GuiData->OldCursor.x != Buff->CursorPosition.X) ||
|
if ((GuiData->OldCursor.x != Buff->CursorPosition.X) ||
|
||||||
(GuiData->OldCursor.y != Buff->CursorPosition.Y))
|
(GuiData->OldCursor.y != Buff->CursorPosition.Y))
|
||||||
|
@ -50,6 +50,7 @@ typedef struct _GUI_CONSOLE_DATA
|
|||||||
HDESK Desktop;
|
HDESK Desktop;
|
||||||
|
|
||||||
BOOLEAN IsWindowVisible;
|
BOOLEAN IsWindowVisible;
|
||||||
|
BOOLEAN IsWindowActive;
|
||||||
|
|
||||||
POINT OldCursor;
|
POINT OldCursor;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user