all repos — fluxbox @ 9207eb135c2b26d6b86afee42ff389afa8d3003f

custom fork of the fluxbox windowmanager

check string size before draw
fluxgen fluxgen
commit

9207eb135c2b26d6b86afee42ff389afa8d3003f

parent

be32c5c2e86899e435567381b0a82e4341f5491a

1 files changed, 6 insertions(+), 4 deletions(-)

jump to
M src/Tab.ccsrc/Tab.cc

@@ -19,7 +19,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Tab.cc,v 1.38 2002/11/12 16:13:24 rathnor Exp $ +// $Id: Tab.cc,v 1.39 2002/11/12 22:57:03 fluxgen Exp $ #include "Tab.hh"

@@ -358,6 +358,10 @@ // mode else it draws it in normal mode

// TODO: the "draw in pressed mode" //----------------------------------- void Tab::draw(bool pressed) const { + XClearWindow(m_display, m_tabwin); + + if (m_win->getTitle().size() == 0) // we don't have anything to draw + return; GC gc = ((m_win->isFocused()) ? m_win->getScreen()->getWindowStyle()->tab.l_text_focus_gc : m_win->getScreen()->getWindowStyle()->tab.l_text_unfocus_gc);

@@ -404,9 +408,7 @@ dx += (m_size_w - l) / 2;

break; default: break; - } - - XClearWindow(m_display, m_tabwin); + } m_win->getScreen()->getWindowStyle()->tab.font.drawText( m_tabwin,