summaryrefslogtreecommitdiff
path: root/src/core/stdfile
diff options
context:
space:
mode:
authorRozhuk Ivan <rozhuk.im@gmail.com>2015-03-24 00:55:09 +0000
committerRozhuk Ivan <rozhuk.im@gmail.com>2015-03-24 00:55:09 +0000
commitb2e1ec3eb79227ccea43e270d5ed1917cc0dcc53 (patch)
treedaf3cd3ef42ada29a532713b53dff6c44b76e1ca /src/core/stdfile
parentceb5a959c77bbfdb5f5054d6d694032aa323f674 (diff)
* multiple WINE bug fixes over DeferWindowPos(), bug rep: https://bugs.winehq.org/show_bug.cgi?id=38275
git-svn-id: http://svn.miranda-ng.org/main/trunk@12488 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/core/stdfile')
-rw-r--r--src/core/stdfile/src/ftmanager.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/core/stdfile/src/ftmanager.cpp b/src/core/stdfile/src/ftmanager.cpp
index a361dd7a30..139ffbffbd 100644
--- a/src/core/stdfile/src/ftmanager.cpp
+++ b/src/core/stdfile/src/ftmanager.cpp
@@ -78,7 +78,8 @@ static void LayoutTransfers(HWND hwnd, struct TFtPageData *dat)
top -= dat->scrollPos;
for (int i = 0; i < dat->wnds->realCount; ++i) {
int height = dat->wnds->items[i]->rc.bottom - dat->wnds->items[i]->rc.top;
- hdwp = DeferWindowPos(hdwp, dat->wnds->items[i]->hwnd, NULL, 0, top, rc.right, height, SWP_NOZORDER);
+ if (NULL != dat->wnds->items[i]->hwnd) /* Wine fix. */
+ hdwp = DeferWindowPos(hdwp, dat->wnds->items[i]->hwnd, NULL, 0, top, rc.right, height, SWP_NOZORDER);
top += height;
}
top += dat->scrollPos;
@@ -313,7 +314,8 @@ static INT_PTR CALLBACK FtMgrDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
rc.bottom -= rcButton.bottom + 5;
- hdwp = DeferWindowPos(hdwp, hwndTab, NULL, rc.left, rc.top, rc.right-rc.left, rc.bottom-rc.top, SWP_NOZORDER);
+ if (NULL != hwndTab) /* Wine fix. */
+ hdwp = DeferWindowPos(hdwp, hwndTab, NULL, rc.left, rc.top, rc.right-rc.left, rc.bottom-rc.top, SWP_NOZORDER);
EndDeferWindowPos(hdwp);
@@ -324,8 +326,10 @@ static INT_PTR CALLBACK FtMgrDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
hdwp = BeginDeferWindowPos(2);
- hdwp = DeferWindowPos(hdwp, dat->hwndIncoming, HWND_TOP, rc.left, rc.top, rc.right-rc.left, rc.bottom-rc.top, 0);
- hdwp = DeferWindowPos(hdwp, dat->hwndOutgoing, HWND_TOP, rc.left, rc.top, rc.right-rc.left, rc.bottom-rc.top, 0);
+ if (NULL != dat->hwndIncoming) /* Wine fix. */
+ hdwp = DeferWindowPos(hdwp, dat->hwndIncoming, HWND_TOP, rc.left, rc.top, rc.right-rc.left, rc.bottom-rc.top, 0);
+ if (NULL != dat->hwndOutgoing) /* Wine fix. */
+ hdwp = DeferWindowPos(hdwp, dat->hwndOutgoing, HWND_TOP, rc.left, rc.top, rc.right-rc.left, rc.bottom-rc.top, 0);
EndDeferWindowPos(hdwp);