Commit e3810e3a authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

Check for SB_CTL before displaying a caret.

parent 50e8ea38
......@@ -816,7 +816,8 @@ void SCROLL_DrawScrollBar( HWND hwnd, HDC hdc, INT nBar,
(SCROLL_TrackingBar == nBar))
SCROLL_DrawMovingThumb( hdc, &rect, vertical, arrowSize, thumbSize );
if(hwnd==GetFocus()) /* if scroll bar has focus, reposition the caret*/
/* if scroll bar has focus, reposition the caret*/
if(hwnd==GetFocus() && (nBar==SB_CTL))
{
if (!vertical)
{
......@@ -1174,8 +1175,6 @@ LRESULT WINAPI ScrollBarWndProc( HWND hwnd, UINT message, WPARAM wParam,
/* Create a caret when a ScrollBar get focus*/
RECT rect;
int arrowSize, thumbSize, thumbPos, vertical;
if(hwnd==GetFocus())
{
vertical = SCROLL_GetScrollBarRect( hwnd, SB_CTL, &rect,
&arrowSize, &thumbSize, &thumbPos );
if (!vertical)
......@@ -1190,7 +1189,6 @@ LRESULT WINAPI ScrollBarWndProc( HWND hwnd, UINT message, WPARAM wParam,
}
ShowCaret(hwnd);
}
}
break;
case WM_KILLFOCUS:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment