From 46f7dbfa99111c48e3e5b01ff61394e6d0d29742 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 29 Nov 2014 19:36:17 +0000 Subject: 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 --- plugins/TopToolBar/src/toolbarwnd.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'plugins') 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); } -- cgit v1.2.3