Worked around the isResizable() problem: check if the window is resizable

only when initializing the decoration for a given window.
CCMAIL: kwin@kde.org

svn path=/trunk/kdebase/kwin/; revision=357517
This commit is contained in:
Luciano Montanaro 2004-10-25 10:17:59 +00:00
parent 6dc8a25ebe
commit 4ae63db942
2 changed files with 4 additions and 2 deletions

View file

@ -403,6 +403,7 @@ void B2Client::init()
positionButtons(); positionButtons();
titlebar->recalcBuffer(); titlebar->recalcBuffer();
titlebar->installEventFilter(this); titlebar->installEventFilter(this);
resizable = isResizable();
} }
void B2Client::addButtons(const QString& s, const QString tips[], void B2Client::addButtons(const QString& s, const QString tips[],
@ -483,7 +484,7 @@ void B2Client::addButtons(const QString& s, const QString tips[],
} }
break; break;
case 'R': // Resize button case 'R': // Resize button
if (isResizable() && !button[BtnResize]) { if (resizable && !button[BtnResize]) {
button[BtnResize] = new B2Button(this, tb, tips[BtnResize]); button[BtnResize] = new B2Button(this, tb, tips[BtnResize]);
button[BtnResize]->setPixmaps(P_RESIZE); button[BtnResize]->setPixmaps(P_RESIZE);
connect(button[BtnResize], SIGNAL(pressed()), connect(button[BtnResize], SIGNAL(pressed()),
@ -503,7 +504,7 @@ bool B2Client::mustDrawHandle() const
if (drawSmallBorders && (maximizeMode() & MaximizeVertical)) { if (drawSmallBorders && (maximizeMode() & MaximizeVertical)) {
return false; return false;
} else { } else {
return do_draw_handle && isResizable(); return do_draw_handle & resizable;
} }
} }

View file

@ -144,6 +144,7 @@ private:
int bar_x_ofs; int bar_x_ofs;
int in_unobs; int in_unobs;
QTime time; QTime time;
bool resizable;
}; };
class B2ClientFactory : public QObject, public KDecorationFactory class B2ClientFactory : public QObject, public KDecorationFactory