diff options
author | (no author) <(no author)@4f64403b-2f21-0410-a795-97e2b3489a10> | 2010-04-25 15:57:51 +0000 |
---|---|---|
committer | (no author) <(no author)@4f64403b-2f21-0410-a795-97e2b3489a10> | 2010-04-25 15:57:51 +0000 |
commit | 5ac26cff397836222eb8d51d866890f96321c601 (patch) | |
tree | 7ab4ff3ed3c36675df3d2da5a912311df499a8fa /yapp/message_pump.cpp | |
parent | 8e4bd51aa53343a76b1ddc9c7e47f3d56cb24437 (diff) |
Optimizations, removed redundant code, better compatibility with popup+
git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@512 4f64403b-2f21-0410-a795-97e2b3489a10
Diffstat (limited to 'yapp/message_pump.cpp')
-rw-r--r-- | yapp/message_pump.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/yapp/message_pump.cpp b/yapp/message_pump.cpp index a03dae3..c2483d3 100644 --- a/yapp/message_pump.cpp +++ b/yapp/message_pump.cpp @@ -97,9 +97,11 @@ DWORD CALLBACK MessagePumpThread(LPVOID param) { if(hwndMsg.wParam) // set notifyer handle
SendMessage(hwnd, PUM_SETNOTIFYH, hwndMsg.wParam, 0);
} else {
- if(pd && pd->pwzTitle) free(pd->pwzTitle);
- if(pd && pd->pwzText) free(pd->pwzText);
- if(pd) free(pd);
+ if (pd) {
+ mir_free(pd->pwzTitle);
+ mir_free(pd->pwzText);
+ mir_free(pd);
+ }
}
}
break;
@@ -134,7 +136,7 @@ DWORD CALLBACK MessagePumpThread(LPVOID param) { DispatchMessage(&hwndMsg);
// do this here in case the window has gone
if(hwndMsg.message == PUM_CHANGE || hwndMsg.message == PUM_SETTEXT)
- free((void *)hwndMsg.lParam);
+ mir_free((void *)hwndMsg.lParam);
}
break;
}
@@ -166,7 +168,6 @@ void FindWindow(PopupData *pd, HANDLE hEvent, HWND *hwnd); void InitMessagePump() {
WNDCLASS popup_win_class = {0};
- popup_win_class.style = 0;
popup_win_class.lpfnWndProc = PopupWindowProc;
popup_win_class.hInstance = hInst;
popup_win_class.lpszClassName = POP_WIN_CLASS;
|