From 1fa445c88033e564a25d907a7f478e76bff9e89e Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Wed, 4 Dec 2002 00:26:45 +0000 Subject: handle configure requests --- src/frame.cc | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'src/frame.cc') diff --git a/src/frame.cc b/src/frame.cc index d991e454..725a4306 100644 --- a/src/frame.cc +++ b/src/frame.cc @@ -196,8 +196,13 @@ void OBFrame::adjust() // that the ONE LABEL!! // adds an extra sep so that there's a space on either side of the // titlebar.. note: x = sep, below. - _label.setWidth(width - sep * 2 - - (_button_iconify.width() + sep) * (layout.size() - 1)); + int lwidth = width - sep * 2 - + (_button_iconify.width() + sep) * (layout.size() - 1); + // quick sanity check for really small windows. if this is needed, its + // obviously not going to be displayed right... + // XXX: maybe we should make this look better somehow? constraints? + if (lwidth <= 0) lwidth = 1; + _label.setWidth(lwidth); int x = sep; for (int i = 0, len = layout.size(); i < len; ++i) { @@ -449,4 +454,10 @@ void OBFrame::applyGravity() } +void OBFrame::reverseGravity() +{ + move(_client->area().x() - _size.left, _client->area().y() - _size.top); +} + + } -- cgit v1.2.3