Commit 2c1b7c8c authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

winex11: Move LoadIcon call to dllmain.

parent 2f4a338d
...@@ -151,6 +151,12 @@ static NTSTATUS WINAPI x11drv_is_system_module( void *arg, ULONG size ) ...@@ -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 ); typedef NTSTATUS (*callback_func)( UINT arg );
static const callback_func callback_funcs[] = static const callback_func callback_funcs[] =
{ {
...@@ -162,6 +168,7 @@ static const callback_func callback_funcs[] = ...@@ -162,6 +168,7 @@ static const callback_func callback_funcs[] =
x11drv_ime_set_cursor_pos, x11drv_ime_set_cursor_pos,
x11drv_ime_set_open_status, x11drv_ime_set_open_status,
x11drv_ime_update_association, x11drv_ime_update_association,
x11drv_load_icon,
}; };
C_ASSERT( ARRAYSIZE(callback_funcs) == client_funcs_count ); C_ASSERT( ARRAYSIZE(callback_funcs) == client_funcs_count );
......
...@@ -117,6 +117,7 @@ enum client_callback ...@@ -117,6 +117,7 @@ enum client_callback
client_ime_set_cursor_pos, client_ime_set_cursor_pos,
client_ime_set_open_status, client_ime_set_open_status,
client_ime_update_association, client_ime_update_association,
client_load_icon,
client_funcs_count client_funcs_count
}; };
......
...@@ -627,7 +627,10 @@ static void fetch_icon_data( HWND hwnd, HICON icon_big, HICON icon_small ) ...@@ -627,7 +627,10 @@ static void fetch_icon_data( HWND hwnd, HICON icon_big, HICON icon_small )
if (!icon_big) if (!icon_big)
icon_big = get_icon_info( (HICON)NtUserGetClassLongPtrW( hwnd, GCLP_HICON ), &ii ); icon_big = get_icon_info( (HICON)NtUserGetClassLongPtrW( hwnd, GCLP_HICON ), &ii );
if (!icon_big) 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) if (!icon_small)
{ {
......
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