diff options
author | Rozhuk Ivan <rozhuk.im@gmail.com> | 2015-03-24 02:53:25 +0000 |
---|---|---|
committer | Rozhuk Ivan <rozhuk.im@gmail.com> | 2015-03-24 02:53:25 +0000 |
commit | 65aaaa950c793e9408a42d352db919d487ef2a2f (patch) | |
tree | cbbdbff8a721e5fd6efa78754ca75a05b625ac3c /plugins/YAPP/src | |
parent | b2e1ec3eb79227ccea43e270d5ed1917cc0dcc53 (diff) |
* multiple WINE bug fixes over IsDialogMessage(), bug rep: https://bugs.winehq.org/show_bug.cgi?id=38276
git-svn-id: http://svn.miranda-ng.org/main/trunk@12489 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/YAPP/src')
-rw-r--r-- | plugins/YAPP/src/message_pump.cpp | 96 |
1 files changed, 48 insertions, 48 deletions
diff --git a/plugins/YAPP/src/message_pump.cpp b/plugins/YAPP/src/message_pump.cpp index 3da223b89e..24b034001c 100644 --- a/plugins/YAPP/src/message_pump.cpp +++ b/plugins/YAPP/src/message_pump.cpp @@ -16,60 +16,60 @@ unsigned __stdcall MessagePumpThread(void* param) MSG hwndMsg = { 0 };
while (GetMessage(&hwndMsg, 0, 0, 0) > 0 && !bShutdown) {
- if (!IsDialogMessage(hwndMsg.hwnd, &hwndMsg)) {
- switch(hwndMsg.message) {
- case MUM_CREATEPOPUP:
- {
- bool enabled = true;
- int status = CallService(MS_CLIST_GETSTATUSMODE, 0, 0);
- if (status >= ID_STATUS_OFFLINE && status <= ID_STATUS_OUTTOLUNCH && options.disable_status[status - ID_STATUS_OFFLINE])
- enabled = false;
- if ((options.disable_full_screen && IsFullScreen()) || IsWorkstationLocked())
- enabled = false;
-
- PopupData *pd = (PopupData*)hwndMsg.lParam;
- if (enabled && num_popups < MAX_POPUPS) {
- //HWND hwnd = CreateWindowEx(WS_EX_TOOLWINDOW | WS_EX_TOPMOST, POP_WIN_CLASS, _T("Popup"), WS_POPUP, 0, 0, 0, 0, GetDesktopWindow(), 0, hInst, (LPVOID)hwndMsg.lParam);
- HWND hwnd = CreateWindowEx(WS_EX_TOOLWINDOW | WS_EX_TOPMOST, POP_WIN_CLASS, _T("Popup"), WS_POPUP, 0, 0, 0, 0, 0, 0, hInst, (LPVOID)hwndMsg.lParam);
- num_popups++;
- if (hwndMsg.wParam) // set notifyer handle
- SendMessage(hwnd, PUM_SETNOTIFYH, hwndMsg.wParam, 0);
- }
- else if (pd) {
- mir_free(pd->pwzTitle);
- mir_free(pd->pwzText);
- mir_free(pd);
- }
+ if (hwndMsg.hwnd != NULL && IsDialogMessage(hwndMsg.hwnd, &hwndMsg)) /* Wine fix. */
+ continue;
+ switch(hwndMsg.message) {
+ case MUM_CREATEPOPUP:
+ {
+ bool enabled = true;
+ int status = CallService(MS_CLIST_GETSTATUSMODE, 0, 0);
+ if (status >= ID_STATUS_OFFLINE && status <= ID_STATUS_OUTTOLUNCH && options.disable_status[status - ID_STATUS_OFFLINE])
+ enabled = false;
+ if ((options.disable_full_screen && IsFullScreen()) || IsWorkstationLocked())
+ enabled = false;
+
+ PopupData *pd = (PopupData*)hwndMsg.lParam;
+ if (enabled && num_popups < MAX_POPUPS) {
+ //HWND hwnd = CreateWindowEx(WS_EX_TOOLWINDOW | WS_EX_TOPMOST, POP_WIN_CLASS, _T("Popup"), WS_POPUP, 0, 0, 0, 0, GetDesktopWindow(), 0, hInst, (LPVOID)hwndMsg.lParam);
+ HWND hwnd = CreateWindowEx(WS_EX_TOOLWINDOW | WS_EX_TOPMOST, POP_WIN_CLASS, _T("Popup"), WS_POPUP, 0, 0, 0, 0, 0, 0, hInst, (LPVOID)hwndMsg.lParam);
+ num_popups++;
+ if (hwndMsg.wParam) // set notifyer handle
+ SendMessage(hwnd, PUM_SETNOTIFYH, hwndMsg.wParam, 0);
}
- break;
-
- case MUM_DELETEPOPUP:
- {
- HWND hwnd = (HWND)hwndMsg.lParam;
- if (IsWindow(hwnd)) {
- DestroyWindow(hwnd);
- num_popups--;
- }
+ else if (pd) {
+ mir_free(pd->pwzTitle);
+ mir_free(pd->pwzText);
+ mir_free(pd);
}
- break;
+ }
+ break;
+
+ case MUM_DELETEPOPUP:
+ {
+ HWND hwnd = (HWND)hwndMsg.lParam;
+ if (IsWindow(hwnd)) {
+ DestroyWindow(hwnd);
+ num_popups--;
+ }
+ }
+ break;
- case MUM_NMUPDATE:
- BroadcastMessage(PUM_UPDATENOTIFY, hwndMsg.wParam, 0);
- break;
+ case MUM_NMUPDATE:
+ BroadcastMessage(PUM_UPDATENOTIFY, hwndMsg.wParam, 0);
+ break;
- case MUM_NMREMOVE:
- BroadcastMessage(PUM_KILLNOTIFY, hwndMsg.wParam, 0);
- break;
+ case MUM_NMREMOVE:
+ BroadcastMessage(PUM_KILLNOTIFY, hwndMsg.wParam, 0);
+ break;
- case MUM_NMAVATAR:
- RepositionWindows();
- break;
+ case MUM_NMAVATAR:
+ RepositionWindows();
+ break;
- default:
- TranslateMessage(&hwndMsg);
- DispatchMessage(&hwndMsg);
- break;
- }
+ default:
+ TranslateMessage(&hwndMsg);
+ DispatchMessage(&hwndMsg);
+ break;
}
}
|