free the main region (leak--)

SVN revision: 52429
This commit is contained in:
Vincent Torri 2010-09-18 23:17:27 +00:00
parent d89ebf341b
commit 89038e3b0c
3 changed files with 7 additions and 3 deletions

View File

@ -69,6 +69,7 @@ struct _Outbuf
BITMAPINFO_GDI *bitmap_info;
HWND window;
HDC dc;
HRGN regions;
int depth;
unsigned char borderless : 1;
unsigned char fullscreen : 1;

View File

@ -87,6 +87,8 @@ evas_software_gdi_shutdown(Outbuf *buf)
free(buf->priv.gdi.bitmap_info);
ReleaseDC(buf->priv.gdi.window, buf->priv.gdi.dc);
if (buf->priv.gdi.regions)
DeleteObject(buf->priv.gdi.regions);
}
void

View File

@ -408,8 +408,9 @@ evas_software_gdi_outbuf_push_updated_region(Outbuf *buf,
/* Region code */
if (!buf->priv.gdi.region)
{
if (regions)
DeleteObject(regions);
if (buf->priv.gdi.regions)
DeleteObject(buf->priv.gdi.regions);
buf->priv.gdi.regions = NULL;
SetWindowRgn(buf->priv.gdi.window, NULL, 1);
return;
}
@ -434,7 +435,6 @@ evas_software_gdi_outbuf_push_updated_region(Outbuf *buf,
ww = rect.right - rect.left;
wh = rect.bottom - rect.top;
printf ("(%d,%d) (%d,%d)\n", w, h, ww, wh);
if (!GetWindowRect(buf->priv.gdi.window, &rect))
return;
@ -554,6 +554,7 @@ evas_software_gdi_outbuf_push_updated_region(Outbuf *buf,
if (regions)
SetWindowRgn(buf->priv.gdi.window, regions, 1);
buf->priv.gdi.regions = regions;
buf->priv.region_built = 1;
}