diff --git a/windows/winpos.c b/windows/winpos.c index e2f56e484a6..7ad713982d5 100644 --- a/windows/winpos.c +++ b/windows/winpos.c @@ -2829,8 +2829,14 @@ Pos: /* ----------------------------------------------------------------------- if( winpos.flags & SWP_HIDEWINDOW ) { wndPtr->dwStyle &= ~WS_VISIBLE; + } - if (hwnd == CARET_GetHwnd()) DestroyCaret(); + if (hwnd == CARET_GetHwnd()) + { + if( winpos.flags & SWP_HIDEWINDOW ) + HideCaret(hwnd); + else if (winpos.flags & SWP_SHOWWINDOW) + ShowCaret(hwnd); } /* ------------------------------------------------------------------------ FINAL */