summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-11-29 19:36:17 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-11-29 19:36:17 +0000
commit46f7dbfa99111c48e3e5b01ff61394e6d0d29742 (patch)
tree7909ceef59610084502ae732f6c95e3665cc0bd7
parentadeae0289c3a08d6e8fae2d2644053341bd371ab (diff)
attempt to fix the endless recursion rebuilding the toolbar when AutoSize=1
git-svn-id: http://svn.miranda-ng.org/main/trunk@11158 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--plugins/TopToolBar/src/toolbarwnd.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/TopToolBar/src/toolbarwnd.cpp b/plugins/TopToolBar/src/toolbarwnd.cpp
index cf32d796f9..b21b072c0f 100644
--- a/plugins/TopToolBar/src/toolbarwnd.cpp
+++ b/plugins/TopToolBar/src/toolbarwnd.cpp
@@ -148,7 +148,8 @@ LRESULT CALLBACK TopToolBarProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara
if ( g_ctrl->bAutoSize) {
RECT rcClient;
GetClientRect(g_ctrl->hWnd, &rcClient);
- if (rcClient.bottom - rcClient.top != iHeight && iHeight) {
+ rcClient.bottom -= rcClient.top;
+ if (rcClient.bottom != iHeight && iHeight && rcClient.bottom) {
supressRepos = true;
PostMessage(hwnd, TTB_UPDATEFRAMEVISIBILITY, 0, 0);
}