Don't use the return value from SendMessage(WM_SETICON). That is the old

2003-12-07  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkwindow-win32.c (gdk_window_set_icon): Don't use the
	return value from SendMessage(WM_SETICON). That is the old
	icon. Fixes GDI resource leak. (#128559, Tim Evans)
This commit is contained in:
Tor Lillqvist 2003-12-07 11:03:08 +00:00 committed by Tor Lillqvist
parent 4e4748bc37
commit 4b328c4753
6 changed files with 22 additions and 2 deletions

View File

@ -1,5 +1,9 @@
2003-12-07 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkwindow-win32.c (gdk_window_set_icon): Don't use the
return value from SendMessage(WM_SETICON). That is the old
icon. Fixes GDI resource leak. (#128559, Tim Evans)
* gdk/win32/gdkevents-win32.c (gdk_pointer_grab): If we already
have a pointer grab active with a grab cursor set, destroy that
cursor to avoid a GDI resource leak. (#128410, Tim Evans)

View File

@ -1,5 +1,9 @@
2003-12-07 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkwindow-win32.c (gdk_window_set_icon): Don't use the
return value from SendMessage(WM_SETICON). That is the old
icon. Fixes GDI resource leak. (#128559, Tim Evans)
* gdk/win32/gdkevents-win32.c (gdk_pointer_grab): If we already
have a pointer grab active with a grab cursor set, destroy that
cursor to avoid a GDI resource leak. (#128410, Tim Evans)

View File

@ -1,5 +1,9 @@
2003-12-07 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkwindow-win32.c (gdk_window_set_icon): Don't use the
return value from SendMessage(WM_SETICON). That is the old
icon. Fixes GDI resource leak. (#128559, Tim Evans)
* gdk/win32/gdkevents-win32.c (gdk_pointer_grab): If we already
have a pointer grab active with a grab cursor set, destroy that
cursor to avoid a GDI resource leak. (#128410, Tim Evans)

View File

@ -1,5 +1,9 @@
2003-12-07 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkwindow-win32.c (gdk_window_set_icon): Don't use the
return value from SendMessage(WM_SETICON). That is the old
icon. Fixes GDI resource leak. (#128559, Tim Evans)
* gdk/win32/gdkevents-win32.c (gdk_pointer_grab): If we already
have a pointer grab active with a grab cursor set, destroy that
cursor to avoid a GDI resource leak. (#128410, Tim Evans)

View File

@ -1,5 +1,9 @@
2003-12-07 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkwindow-win32.c (gdk_window_set_icon): Don't use the
return value from SendMessage(WM_SETICON). That is the old
icon. Fixes GDI resource leak. (#128559, Tim Evans)
* gdk/win32/gdkevents-win32.c (gdk_pointer_grab): If we already
have a pointer grab active with a grab cursor set, destroy that
cursor to avoid a GDI resource leak. (#128410, Tim Evans)

View File

@ -2249,7 +2249,7 @@ gdk_window_set_icon (GdkWindow *window,
}
#endif
hIcon = (HICON)SendMessage (GDK_WINDOW_HWND (window), WM_SETICON, ICON_BIG, (LPARAM)hIcon);
SendMessage (GDK_WINDOW_HWND (window), WM_SETICON, ICON_BIG, (LPARAM)hIcon);
if (impl->hicon)
GDI_CALL (DestroyIcon, (impl->hicon));
impl->hicon = hIcon;
@ -2259,7 +2259,7 @@ gdk_window_set_icon (GdkWindow *window,
/* reseting to default icon */
if (impl->hicon)
{
hIcon = (HICON)SendMessage (GDK_WINDOW_HWND (window), WM_SETICON, ICON_BIG, 0);
SendMessage (GDK_WINDOW_HWND (window), WM_SETICON, ICON_BIG, 0);
GDI_CALL (DestroyIcon, (impl->hicon));
impl->hicon = NULL;
}