fixed window size bug, it could been negative in hideHandle and hideTitlebar
This commit is contained in:
parent
f7f454524d
commit
d1b45b69c6
1 changed files with 20 additions and 8 deletions
|
@ -1,5 +1,5 @@
|
||||||
// FbWinFrame.cc for Fluxbox Window Manager
|
// FbWinFrame.cc for Fluxbox Window Manager
|
||||||
// Copyright (c) 2003 Henrik Kinnunen (fluxgen at users.sourceforge.net)
|
// Copyright (c) 2003-2004 Henrik Kinnunen (fluxgen at users.sourceforge.net)
|
||||||
//
|
//
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a
|
// Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
// copy of this software and associated documentation files (the "Software"),
|
// copy of this software and associated documentation files (the "Software"),
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
// DEALINGS IN THE SOFTWARE.
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
// $Id: FbWinFrame.cc,v 1.71 2004/01/21 14:12:31 fluxgen Exp $
|
// $Id: FbWinFrame.cc,v 1.72 2004/01/21 19:47:30 fluxgen Exp $
|
||||||
|
|
||||||
#include "FbWinFrame.hh"
|
#include "FbWinFrame.hh"
|
||||||
|
|
||||||
|
@ -404,10 +404,15 @@ bool FbWinFrame::hideTitlebar() {
|
||||||
|
|
||||||
m_titlebar.hide();
|
m_titlebar.hide();
|
||||||
m_use_titlebar = false;
|
m_use_titlebar = false;
|
||||||
|
if (static_cast<signed int>(m_window.height() - m_titlebar.height() -
|
||||||
|
m_titlebar.borderWidth()) <= 0) {
|
||||||
|
m_window.resize(m_window.width(), 1);
|
||||||
|
} else {
|
||||||
|
// only take away one borderwidth (as the other border is still the "top" border)
|
||||||
|
m_window.resize(m_window.width(), m_window.height() - m_titlebar.height() -
|
||||||
|
m_titlebar.borderWidth());
|
||||||
|
}
|
||||||
|
|
||||||
// only take away one borderwidth (as the other border is still the "top" border)
|
|
||||||
m_window.resize(m_window.width(), m_window.height() - m_titlebar.height() -
|
|
||||||
m_titlebar.borderWidth());
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -432,8 +437,16 @@ bool FbWinFrame::hideHandle() {
|
||||||
m_grip_left.hide();
|
m_grip_left.hide();
|
||||||
m_grip_right.hide();
|
m_grip_right.hide();
|
||||||
m_use_handle = false;
|
m_use_handle = false;
|
||||||
m_window.resize(m_window.width(), m_window.height() - m_handle.height() -
|
|
||||||
m_handle.borderWidth());
|
if (static_cast<signed int>(m_window.height() - m_handle.height() -
|
||||||
|
m_handle.borderWidth())) {
|
||||||
|
m_window.resize(m_window.width(), 1);
|
||||||
|
} else {
|
||||||
|
// only take away one borderwidth (as the other border is still the "top" border)
|
||||||
|
m_window.resize(m_window.width(), m_window.height() - m_handle.height() -
|
||||||
|
m_handle.borderWidth());
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -695,7 +708,6 @@ void FbWinFrame::reconfigure() {
|
||||||
m_shape->update();
|
m_shape->update();
|
||||||
|
|
||||||
// titlebar stuff rendered already by reconftitlebar
|
// titlebar stuff rendered already by reconftitlebar
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void FbWinFrame::setUseShape(bool value) {
|
void FbWinFrame::setUseShape(bool value) {
|
||||||
|
|
Loading…
Reference in a new issue