diff options
author | George Hazan <george.hazan@gmail.com> | 2013-03-17 11:15:15 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-03-17 11:15:15 +0000 |
commit | 152da8847e828b132c5753ae5f58e8272556d4ef (patch) | |
tree | 7c96822b3ea2dee6257071d557259177c11da6f0 /plugins/Popup | |
parent | 79c0e81fbfd1f933a1e251db23dc1fd537ddd239 (diff) |
some another leaks fixed
git-svn-id: http://svn.miranda-ng.org/main/trunk@4070 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Popup')
-rw-r--r-- | plugins/Popup/src/bitmap_funcs.cpp | 6 | ||||
-rw-r--r-- | plugins/Popup/src/popup_wnd2.cpp | 7 |
2 files changed, 4 insertions, 9 deletions
diff --git a/plugins/Popup/src/bitmap_funcs.cpp b/plugins/Popup/src/bitmap_funcs.cpp index 8e37e796ad..add146491f 100644 --- a/plugins/Popup/src/bitmap_funcs.cpp +++ b/plugins/Popup/src/bitmap_funcs.cpp @@ -420,9 +420,6 @@ void MyBitmap::DrawColorized(MyBitmap *bmp, int x, int y, int w, int h, COLOR32 PU_DIV255(koef2b * cl * alpha),
alpha);
#pragma warning(pop)
-// bits[(i+y)*width + (j+x)] = (cl > 128) ?
-// rgba(koef1r * cl + br, koef1g * cl + bg, koef1b * cl + bb, geta(bmp->bits[int(i*ky)*bmp->width + int(j*kx)])):
-// rgba(koef2r * cl, koef2g * cl, koef2b * cl, geta(bmp->bits[int(i*ky)*bmp->width + int(j*kx)]));
}
}
}
@@ -461,7 +458,6 @@ void MyBitmap::BlendPart(MyBitmap *bmp, int xin, int yin, int win, int hin, int getb(src)+PU_DIV255((255-alpha)*getb(dst)),
geta(src)+PU_DIV255((255-alpha)*geta(dst))
);
-// bits[(i+y)*width + (j+x)] = bmp->bits[int(yin+i*ky)*bmp->width + int(xin+j*kx)];
}
}
}
@@ -743,7 +739,7 @@ HRGN MyBitmap::buildOpaqueRgn(int level, bool opaque) rectsCount += addRectsCount;
LPRGNDATA pRgnDataNew = (LPRGNDATA)(new BYTE[sizeof(RGNDATAHEADER) + (rectsCount)*sizeof(RECT)]);
memcpy(pRgnDataNew, pRgnData, sizeof(RGNDATAHEADER) + pRgnData->rdh.nCount * sizeof(RECT));
- delete pRgnData;
+ delete[] pRgnData;
pRgnData = pRgnDataNew;
pRects = (LPRECT)(&pRgnData->Buffer);
}
diff --git a/plugins/Popup/src/popup_wnd2.cpp b/plugins/Popup/src/popup_wnd2.cpp index 7ab564817b..02a48befd3 100644 --- a/plugins/Popup/src/popup_wnd2.cpp +++ b/plugins/Popup/src/popup_wnd2.cpp @@ -332,18 +332,17 @@ void PopupWnd2::animate() SetWindowRgn(m_hwnd, m_bmp->buildOpaqueRgn(skin->getShadowRegionOpacity()), FALSE);
- if (MyDwmEnableBlurBehindWindow && PopUpOptions.EnableAeroGlass)
- {
+ if (MyDwmEnableBlurBehindWindow && PopUpOptions.EnableAeroGlass) {
DWM_BLURBEHIND bb = {0};
bb.dwFlags = DWM_BB_ENABLE|DWM_BB_BLURREGION;
bb.fEnable = TRUE;
bb.hRgnBlur = m_bmp->buildOpaqueRgn(254, false);
MyDwmEnableBlurBehindWindow(m_hwnd, &bb);
+ DeleteObject(bb.hRgnBlur);
}
// update tooltips
- for (int i=0; i < m_actionCount; ++i)
- {
+ for (int i=0; i < m_actionCount; ++i) {
char *title = strchr(m_actions[i].actionA.lpzTitle, '/');
if (title) title++;
else title = m_actions[i].actionA.lpzTitle;
|