Jacek Caban : winex11: Use LoadImageW in fetch_icon_data.

Alexandre Julliard julliard at winehq.org
Thu Jun 9 16:28:33 CDT 2022


Module: wine
Branch: master
Commit: 9c6895e37d00ea78d6be0dc5116fc8ad4dcab865
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=9c6895e37d00ea78d6be0dc5116fc8ad4dcab865

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Thu May 12 00:16:57 2022 +0200

winex11: Use LoadImageW in fetch_icon_data.

Signed-off-by: Jacek Caban <jacek at codeweavers.com>

---

 dlls/winex11.drv/dllmain.c | 7 -------
 dlls/winex11.drv/unixlib.h | 1 -
 dlls/winex11.drv/window.c  | 5 +++--
 3 files changed, 3 insertions(+), 10 deletions(-)

diff --git a/dlls/winex11.drv/dllmain.c b/dlls/winex11.drv/dllmain.c
index e2cbd51351d..b7c5692b32d 100644
--- a/dlls/winex11.drv/dllmain.c
+++ b/dlls/winex11.drv/dllmain.c
@@ -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 );
diff --git a/dlls/winex11.drv/unixlib.h b/dlls/winex11.drv/unixlib.h
index 451c308f0cd..d490600226f 100644
--- a/dlls/winex11.drv/unixlib.h
+++ b/dlls/winex11.drv/unixlib.h
@@ -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
 };
 
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c
index 5d9a93688c3..3ebbee0856e 100644
--- a/dlls/winex11.drv/window.c
+++ b/dlls/winex11.drv/window.c
@@ -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)




More information about the wine-cvs mailing list