diff options
author | Rozhuk Ivan <rozhuk.im@gmail.com> | 2015-03-24 00:55:09 +0000 |
---|---|---|
committer | Rozhuk Ivan <rozhuk.im@gmail.com> | 2015-03-24 00:55:09 +0000 |
commit | b2e1ec3eb79227ccea43e270d5ed1917cc0dcc53 (patch) | |
tree | daf3cd3ef42ada29a532713b53dff6c44b76e1ca /plugins/TopToolBar/src/toolbar.cpp | |
parent | ceb5a959c77bbfdb5f5054d6d694032aa323f674 (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/TopToolBar/src/toolbar.cpp')
-rw-r--r-- | plugins/TopToolBar/src/toolbar.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/plugins/TopToolBar/src/toolbar.cpp b/plugins/TopToolBar/src/toolbar.cpp index 4a8ff9f7fd..a7d88e3d0e 100644 --- a/plugins/TopToolBar/src/toolbar.cpp +++ b/plugins/TopToolBar/src/toolbar.cpp @@ -261,14 +261,16 @@ int ArrangeButtons() g_ctrl->bOrderChanged = TRUE;
if (b->isVisible()) {
- hdwp = DeferWindowPos(hdwp, b->hwnd, NULL, nextX, y, 0, 0, SWP_NOSIZE | SWP_NOZORDER | SWP_SHOWWINDOW);
+ if (NULL != b->hwnd) /* Wine fix. */
+ hdwp = DeferWindowPos(hdwp, b->hwnd, NULL, nextX, y, 0, 0, SWP_NOSIZE | SWP_NOZORDER | SWP_SHOWWINDOW);
if (b->isSep())
nextX += SEPWIDTH + 2;
else
nextX += g_ctrl->nButtonWidth + g_ctrl->nButtonSpace;
+ } else {
+ if (NULL != Buttons[i]->hwnd) /* Wine fix. */
+ hdwp = DeferWindowPos(hdwp, Buttons[i]->hwnd, NULL, nextX, y, 0, 0, SWP_NOSIZE | SWP_NOZORDER | SWP_HIDEWINDOW);
}
- else
- hdwp = DeferWindowPos(hdwp, Buttons[i]->hwnd, NULL, nextX, y, 0, 0, SWP_NOSIZE | SWP_NOZORDER | SWP_HIDEWINDOW);
}
if (iFirstButtonId == iLastButtonId)
@@ -281,8 +283,10 @@ int ArrangeButtons() break;
} while (iFirstButtonId < Buttons.getCount() && y >= 0 && (g_ctrl->bAutoSize || (y + g_ctrl->nButtonHeight <= rcClient.bottom - rcClient.top)));
- for (i = iLastButtonId; i < Buttons.getCount(); i++)
- hdwp = DeferWindowPos(hdwp, Buttons[i]->hwnd, NULL, nextX, y, 0, 0, SWP_NOSIZE | SWP_NOZORDER | SWP_HIDEWINDOW);
+ for (i = iLastButtonId; i < Buttons.getCount(); i++) {
+ if (NULL != Buttons[i]->hwnd) /* Wine fix. */
+ hdwp = DeferWindowPos(hdwp, Buttons[i]->hwnd, NULL, nextX, y, 0, 0, SWP_NOSIZE | SWP_NOZORDER | SWP_HIDEWINDOW);
+ }
if (hdwp)
EndDeferWindowPos(hdwp);
|