From 6610e1c2101e42f351cf592987bc892a0c72c896 Mon Sep 17 00:00:00 2001 From: fluxgen Date: Sun, 24 Aug 2003 15:39:52 +0000 Subject: remove round corners for already shaped windows, i.e xmms --- src/FbWinFrame.cc | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/FbWinFrame.cc b/src/FbWinFrame.cc index 9c8989f..ac1db09 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.40 2003/08/24 11:11:07 fluxgen Exp $ +// $Id: FbWinFrame.cc,v 1.41 2003/08/24 15:39:52 fluxgen Exp $ #include "FbWinFrame.hh" @@ -644,7 +644,7 @@ void FbWinFrame::reconfigure() { if (!m_shaded) renderHandles(); - if (m_shape.get() && theme().shapePlace() == Shape::NONE) + if (m_shape.get() && theme().shapePlace() == Shape::NONE || m_disable_shape) m_shape.reset(0); else if (m_shape.get() == 0 && theme().shapePlace() != Shape::NONE) m_shape.reset(new Shape(window(), theme().shapePlace())); @@ -657,6 +657,15 @@ void FbWinFrame::reconfigure() { // titlebar stuff rendered already by reconftitlebar } +void FbWinFrame::setUseShape(bool value) { + m_disable_shape = !value; + + if (m_shape.get() && m_disable_shape) + m_shape.reset(0); + else if (m_shape.get() == 0 && !m_disable_shape) + m_shape.reset(new Shape(window(), theme().shapePlace())); +} + unsigned int FbWinFrame::buttonHeight() const { return m_titlebar.height() - m_bevel*2; } @@ -886,6 +895,8 @@ void FbWinFrame::renderButtons() { void FbWinFrame::init() { + m_disable_shape = false; + m_current_label = 0; // no focused button at first // clear pixmaps @@ -1065,3 +1076,5 @@ void FbWinFrame::renderButtonUnfocus(FbTk::TextButton &button) { button.clear(); } + + -- cgit v0.11.2