From: Jacek Caban jacek@codeweavers.com
Signed-off-by: Jacek Caban jacek@codeweavers.com --- dlls/winex11.drv/dllmain.c | 7 +++++++ dlls/winex11.drv/unixlib.h | 1 + dlls/winex11.drv/window.c | 5 ++++- 3 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/dlls/winex11.drv/dllmain.c b/dlls/winex11.drv/dllmain.c index 705503dc37c..2a361c477f4 100644 --- a/dlls/winex11.drv/dllmain.c +++ b/dlls/winex11.drv/dllmain.c @@ -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 ); diff --git a/dlls/winex11.drv/unixlib.h b/dlls/winex11.drv/unixlib.h index 233a2578b41..f3f6b9b8f06 100644 --- a/dlls/winex11.drv/unixlib.h +++ b/dlls/winex11.drv/unixlib.h @@ -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 };
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 161f749a81d..a62a3e84e81 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -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) {