user32: Return fake global information in GetCursorInfo instead of thread-local values.

This commit is contained in:
Alexandre Julliard 2010-03-19 11:31:26 +01:00
parent 0be0211682
commit c83ea46e1a
2 changed files with 4 additions and 4 deletions

View File

@ -208,8 +208,8 @@ BOOL WINAPI DECLSPEC_HOTPATCH GetCursorPos( POINT *pt )
BOOL WINAPI GetCursorInfo( PCURSORINFO pci ) BOOL WINAPI GetCursorInfo( PCURSORINFO pci )
{ {
if (!pci) return 0; if (!pci) return 0;
if (get_user_thread_info()->cursor_count >= 0) pci->flags = CURSOR_SHOWING; pci->hCursor = LoadCursorW( 0, (LPCWSTR)IDC_ARROW );
else pci->flags = 0; pci->flags = CURSOR_SHOWING;
GetCursorPos(&pci->ptScreenPos); GetCursorPos(&pci->ptScreenPos);
return 1; return 1;
} }

View File

@ -1529,7 +1529,7 @@ static void test_ShowCursor(void)
info.cbSize = sizeof(info); info.cbSize = sizeof(info);
ok( pGetCursorInfo( &info ), "GetCursorInfo failed\n" ); ok( pGetCursorInfo( &info ), "GetCursorInfo failed\n" );
/* global show count is not affected since we don't have a window */ /* global show count is not affected since we don't have a window */
todo_wine ok( info.flags & CURSOR_SHOWING, "cursor not shown in info\n" ); ok( info.flags & CURSOR_SHOWING, "cursor not shown in info\n" );
} }
parent_id = 0; parent_id = 0;
@ -1582,7 +1582,7 @@ static void test_ShowCursor(void)
{ {
info.cbSize = sizeof(info); info.cbSize = sizeof(info);
ok( pGetCursorInfo( &info ), "GetCursorInfo failed\n" ); ok( pGetCursorInfo( &info ), "GetCursorInfo failed\n" );
todo_wine ok( info.flags & CURSOR_SHOWING, "cursor not shown in info\n" ); ok( info.flags & CURSOR_SHOWING, "cursor not shown in info\n" );
} }
count = ShowCursor( TRUE ); count = ShowCursor( TRUE );