From ccbb33c91bc98f9ace71aff5e7b1cd1356004753 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Mon, 30 May 2005 08:34:56 +0000 Subject: [PATCH] Applied patch [ 1207202 ] [wxMSW] Fixes GDI leak in cursor git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34400 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/cursor.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/msw/cursor.cpp b/src/msw/cursor.cpp index 45a3edbfb7..41120c1fc3 100644 --- a/src/msw/cursor.cpp +++ b/src/msw/cursor.cpp @@ -202,13 +202,13 @@ wxCursor::wxCursor(const wxImage& image) } else if ((w != image_w) || (h != image_h)) { - hotSpotX = int(hotSpotX * double(w) / double(image_w)); - hotSpotY = int(hotSpotY * double(h) / double(image_h)); + hotSpotX = int(hotSpotX * double(w) / double(image_w)); + hotSpotY = int(hotSpotY * double(h) / double(image_h)); imageSized = image.Scale(w, h); } - HCURSOR hcursor = wxBitmapToHCURSOR( wxBitmap(imageSized), + HCURSOR hcursor = wxBitmapToHCURSOR( wxBitmap(imageSized), hotSpotX, hotSpotY ); if ( !hcursor ) @@ -357,7 +357,8 @@ wxCursor::wxCursor(int idCursor) } else { - m_refData = new wxCursorRefData(hcursor); + m_refData = new wxCursorRefData(hcursor, + !stdCursor.isStd /* delete it later */); } }