winex11: Move LoadIcon call to dllmain.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
2f4a338da3
commit
2c1b7c8c17
|
@ -151,6 +151,12 @@ static NTSTATUS WINAPI x11drv_is_system_module( void *arg, ULONG size )
|
|||
}
|
||||
|
||||
|
||||
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[] =
|
||||
{
|
||||
|
@ -162,6 +168,7 @@ 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 );
|
||||
|
|
|
@ -117,6 +117,7 @@ enum client_callback
|
|||
client_ime_set_cursor_pos,
|
||||
client_ime_set_open_status,
|
||||
client_ime_update_association,
|
||||
client_load_icon,
|
||||
client_funcs_count
|
||||
};
|
||||
|
||||
|
|
|
@ -627,7 +627,10 @@ static void fetch_icon_data( HWND hwnd, HICON icon_big, HICON icon_small )
|
|||
if (!icon_big)
|
||||
icon_big = get_icon_info( (HICON)NtUserGetClassLongPtrW( hwnd, GCLP_HICON ), &ii );
|
||||
if (!icon_big)
|
||||
icon_big = get_icon_info( LoadIconW( 0, (LPWSTR)IDI_WINLOGO ), &ii);
|
||||
{
|
||||
UINT winlogo = x11drv_client_call( client_load_icon, IDI_WINLOGO );
|
||||
icon_big = get_icon_info( UlongToHandle( winlogo ), &ii );
|
||||
}
|
||||
}
|
||||
if (!icon_small)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue