From 5389d4afab21c096d657f2755ef99cacc56b2fae Mon Sep 17 00:00:00 2001 From: Luciano Montanaro Date: Tue, 5 Jun 2007 08:45:49 +0000 Subject: [PATCH] This fixes the bug 142424 as originally reported, for the B2 decoration. Keramic has the same issue, but the code is completely different. The title unhiding code is still broken with Composite enabled, though. svn path=/trunk/KDE/kdebase/workspace/; revision=671652 --- clients/b2/b2client.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/clients/b2/b2client.cpp b/clients/b2/b2client.cpp index 7ded15934a..d0dfbf9d4e 100644 --- a/clients/b2/b2client.cpp +++ b/clients/b2/b2client.cpp @@ -603,8 +603,8 @@ void B2Client::resizeEvent(QResizeEvent * /*e*/) titlebar->layout()->activate(); positionButtons(); - /* may be the resize cut off some space occupied by titlebar, which - was moved, so instead of reducing it, we first try to move it */ + // may be the resize cut off some space occupied by titlebar, which + // was moved, so instead of reducing it, we first try to move it titleMoveAbs(bar_x_ofs); doShape(); @@ -613,8 +613,14 @@ void B2Client::resizeEvent(QResizeEvent * /*e*/) void B2Client::captionChange() { + // XXX This function and resizeEvent are quite similar. + // Factor out common code. + calcHiddenButtons(); + titlebar->layout()->activate(); positionButtons(); + titleMoveAbs(bar_x_ofs); + doShape(); titlebar->recalcBuffer(); titlebar->repaint();