From 6cafb55bb99c5f8c192bd01d61947a3cc82c0690 Mon Sep 17 00:00:00 2001 From: fluxgen Date: Sat, 22 Feb 2003 18:31:00 +0000 Subject: fixed minor resize bug --- src/FbWinFrame.cc | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/src/FbWinFrame.cc b/src/FbWinFrame.cc index 67b5fe4..bef8f9f 100644 --- a/src/FbWinFrame.cc +++ b/src/FbWinFrame.cc @@ -19,7 +19,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: FbWinFrame.cc,v 1.10 2003/02/20 23:21:23 fluxgen Exp $ +// $Id: FbWinFrame.cc,v 1.11 2003/02/22 18:31:00 fluxgen Exp $ #include "FbWinFrame.hh" #include "ImageControl.hh" @@ -171,13 +171,14 @@ void FbWinFrame::resize(unsigned int width, unsigned int height) { void FbWinFrame::resizeForClient(unsigned int width, unsigned int height) { // total height for frame without client - unsigned int total_height = m_handle.height() + m_handle.borderWidth() + - m_titlebar.height() + m_titlebar.borderWidth(); + int handle_height = m_handle.height() + m_handle.borderWidth(); + int titlebar_height = m_titlebar.height() + m_titlebar.borderWidth(); + unsigned int total_height = handle_height + titlebar_height; // resize frame height with total height + specified height if (!m_use_titlebar) - total_height -= m_titlebar.height() + m_titlebar.borderWidth(); + total_height -= titlebar_height; if (!m_use_handle) - total_height -= m_handle.height() + m_handle.borderWidth(); + total_height -= handle_height; resize(width, total_height + height); } @@ -279,7 +280,8 @@ void FbWinFrame::hideTitlebar() { m_titlebar.hide(); m_use_titlebar = false; m_clientarea.raise(); - m_window.resize(m_window.width(), m_window.height() - m_titlebar.height()); + m_window.resize(m_window.width(), m_window.height() - m_titlebar.height() - + m_titlebar.borderWidth()*2); #ifdef DEBUG cerr<<__FILE__<<": Hide Titlebar"<