summaryrefslogtreecommitdiff
path: root/plugins/Scriver/src
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 /plugins/Scriver/src
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 'plugins/Scriver/src')
-rw-r--r--plugins/Scriver/src/msgdialog.cpp3
-rw-r--r--plugins/Scriver/src/utils.cpp9
2 files changed, 9 insertions, 3 deletions
diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp
index e40d7cf57d..a1e9dd0ec7 100644
--- a/plugins/Scriver/src/msgdialog.cpp
+++ b/plugins/Scriver/src/msgdialog.cpp
@@ -540,7 +540,8 @@ static void MessageDialogResize(HWND hwndDlg, SrmmWindowData *dat, int w, int h)
logH = h - hSplitterPos - toolbarHeight - infobarInnerHeight;
HDWP hdwp = BeginDeferWindowPos(15);
- hdwp = DeferWindowPos(hdwp, dat->infobarData->hWnd, 0, 1, 0, w - 2, infobarInnerHeight - 2, SWP_NOZORDER);
+ if (NULL != dat->infobarData->hWnd) /* Wine fix. */
+ hdwp = DeferWindowPos(hdwp, dat->infobarData->hWnd, 0, 1, 0, w - 2, infobarInnerHeight - 2, SWP_NOZORDER);
hdwp = DeferWindowPos(hdwp, GetDlgItem(hwndDlg, IDC_LOG), 0, 1, logY, w - 2, logH, SWP_NOZORDER);
hdwp = DeferWindowPos(hdwp, GetDlgItem(hwndDlg, IDC_MESSAGE), 0, 1, h - hSplitterPos + SPLITTER_HEIGHT, messageEditWidth, hSplitterPos - SPLITTER_HEIGHT - 1, SWP_NOZORDER);
hdwp = DeferWindowPos(hdwp, GetDlgItem(hwndDlg, IDC_AVATAR), 0, w - avatarWidth - 1, h - (avatarHeight + avatarWidth) / 2 - 1, avatarWidth, avatarWidth, SWP_NOZORDER);
diff --git a/plugins/Scriver/src/utils.cpp b/plugins/Scriver/src/utils.cpp
index 0ecbad553b..ec5c25b5e3 100644
--- a/plugins/Scriver/src/utils.cpp
+++ b/plugins/Scriver/src/utils.cpp
@@ -497,20 +497,25 @@ void SetToolTipRect(HWND hwndParent, HWND hwndTT, RECT* rect)
HDWP ResizeToolbar(HWND hwnd, HDWP hdwp, int width, int vPos, int height, int cControls, const ToolbarButton * buttons, int controlVisibility)
{
+ HWND hCtrl;
int i;
int lPos = 0;
int rPos = width;
for (i = 0; i < cControls; i++) {
if (!buttons[i].alignment && (controlVisibility & (1 << i))) {
lPos += buttons[i].spacing;
- hdwp = DeferWindowPos(hdwp, GetDlgItem(hwnd, buttons[i].controlId), 0, lPos, vPos, buttons[i].width, height, SWP_NOZORDER);
+ hCtrl = GetDlgItem(hwnd, buttons[i].controlId);
+ if (NULL != hCtrl) /* Wine fix. */
+ hdwp = DeferWindowPos(hdwp, hCtrl, 0, lPos, vPos, buttons[i].width, height, SWP_NOZORDER);
lPos += buttons[i].width;
}
}
for (i = cControls - 1; i >= 0; i--) {
if (buttons[i].alignment && (controlVisibility & (1 << i))) {
rPos -= buttons[i].spacing + buttons[i].width;
- hdwp = DeferWindowPos(hdwp, GetDlgItem(hwnd, buttons[i].controlId), 0, rPos, vPos, buttons[i].width, height, SWP_NOZORDER);
+ hCtrl = GetDlgItem(hwnd, buttons[i].controlId);
+ if (NULL != hCtrl) /* Wine fix. */
+ hdwp = DeferWindowPos(hdwp, hCtrl, 0, rPos, vPos, buttons[i].width, height, SWP_NOZORDER);
}
}
return hdwp;