From be201ac257687355bf0916d7c525d598ed9b1282 Mon Sep 17 00:00:00 2001 From: Jon TURNEY Date: Sat, 30 Mar 2013 19:47:16 +0000 Subject: [PATCH] hw/xwin: Change winIconIsOverride() to take a HICON parameter Change winIconIsOverride() to take a HICON parameter, so some unneccessary casts, which weren't portable to 64-bit Cygwin, can be removed. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison --- hw/xwin/winmultiwindowicons.c | 2 +- hw/xwin/winprefs.c | 5 +---- hw/xwin/winprefs.h | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/hw/xwin/winmultiwindowicons.c b/hw/xwin/winmultiwindowicons.c index 0322d9816..bcc5688df 100644 --- a/hw/xwin/winmultiwindowicons.c +++ b/hw/xwin/winmultiwindowicons.c @@ -624,7 +624,7 @@ winDestroyIcon(HICON hIcon) /* Delete the icon if its not one of the application defaults or an override */ if (hIcon && hIcon != g_hIconX && - hIcon != g_hSmallIconX && !winIconIsOverride((unsigned long) hIcon)) + hIcon != g_hSmallIconX && !winIconIsOverride(hIcon)) DestroyIcon(hIcon); } #endif diff --git a/hw/xwin/winprefs.c b/hw/xwin/winprefs.c index 6cbd7ad80..05d8c874d 100644 --- a/hw/xwin/winprefs.c +++ b/hw/xwin/winprefs.c @@ -617,13 +617,10 @@ winOverrideIcon(char *res_name, char *res_class, char *wmName) * ICONS{} overrides)? */ int -winIconIsOverride(unsigned hiconIn) +winIconIsOverride(HICON hicon) { - HICON hicon; int i; - hicon = (HICON) hiconIn; - if (!hicon) return 0; diff --git a/hw/xwin/winprefs.h b/hw/xwin/winprefs.h index 5de5719e1..a4a6e7eec 100644 --- a/hw/xwin/winprefs.h +++ b/hw/xwin/winprefs.h @@ -162,7 +162,7 @@ Bool HandleCustomWM_COMMAND(unsigned long hwndIn, int command); int - winIconIsOverride(unsigned hiconIn); + winIconIsOverride(HICON hicon); HICON winOverrideIcon(char *res_name, char *res_class, char *wmName);