winex11: Use LoadImageW in fetch_icon_data.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
This commit is contained in:
Jacek Caban 2022-05-12 00:16:57 +02:00 committed by Alexandre Julliard
parent 6e2ea185c2
commit 9c6895e37d
3 changed files with 3 additions and 10 deletions

View file

@ -27,12 +27,6 @@ static unixlib_handle_t x11drv_handle;
NTSTATUS (CDECL *x11drv_unix_call)( enum x11drv_funcs code, void *params );
static NTSTATUS x11drv_load_icon( UINT id )
{
return HandleToUlong( LoadIconW( NULL, UlongToPtr( id )));
}
typedef NTSTATUS (*callback_func)( UINT arg );
static const callback_func callback_funcs[] =
{
@ -43,7 +37,6 @@ static const callback_func callback_funcs[] =
x11drv_ime_set_cursor_pos,
x11drv_ime_set_open_status,
x11drv_ime_update_association,
x11drv_load_icon,
};
C_ASSERT( ARRAYSIZE(callback_funcs) == client_funcs_count );

View file

@ -105,7 +105,6 @@ enum client_callback
client_ime_set_cursor_pos,
client_ime_set_open_status,
client_ime_update_association,
client_load_icon,
client_funcs_count
};

View file

@ -631,8 +631,9 @@ static void fetch_icon_data( HWND hwnd, HICON icon_big, HICON icon_small )
icon_big = get_icon_info( (HICON)NtUserGetClassLongPtrW( hwnd, GCLP_HICON ), &ii );
if (!icon_big)
{
UINT winlogo = x11drv_client_call( client_load_icon, IDI_WINLOGO );
icon_big = get_icon_info( UlongToHandle( winlogo ), &ii );
icon_big = LoadImageW( 0, (const WCHAR *)IDI_WINLOGO, IMAGE_ICON, 0, 0,
LR_SHARED | LR_DEFAULTSIZE );
icon_big = get_icon_info( icon_big, &ii );
}
}
if (!icon_small)