summaryrefslogtreecommitdiff
path: root/plugins/TopToolBar/src/toolbarwnd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/TopToolBar/src/toolbarwnd.cpp')
-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);
}