From 4ae63db942fca634912140c84ce9600054c9f297 Mon Sep 17 00:00:00 2001 From: Luciano Montanaro Date: Mon, 25 Oct 2004 10:17:59 +0000 Subject: [PATCH] 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 --- clients/b2/b2client.cpp | 5 +++-- clients/b2/b2client.h | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/clients/b2/b2client.cpp b/clients/b2/b2client.cpp index b7b8c5c68c..928e39d5d5 100644 --- a/clients/b2/b2client.cpp +++ b/clients/b2/b2client.cpp @@ -403,6 +403,7 @@ void B2Client::init() positionButtons(); titlebar->recalcBuffer(); titlebar->installEventFilter(this); + resizable = isResizable(); } void B2Client::addButtons(const QString& s, const QString tips[], @@ -483,7 +484,7 @@ void B2Client::addButtons(const QString& s, const QString tips[], } break; case 'R': // Resize button - if (isResizable() && !button[BtnResize]) { + if (resizable && !button[BtnResize]) { button[BtnResize] = new B2Button(this, tb, tips[BtnResize]); button[BtnResize]->setPixmaps(P_RESIZE); connect(button[BtnResize], SIGNAL(pressed()), @@ -503,7 +504,7 @@ bool B2Client::mustDrawHandle() const if (drawSmallBorders && (maximizeMode() & MaximizeVertical)) { return false; } else { - return do_draw_handle && isResizable(); + return do_draw_handle & resizable; } } diff --git a/clients/b2/b2client.h b/clients/b2/b2client.h index 2f2f0f4f81..6e0571cb08 100644 --- a/clients/b2/b2client.h +++ b/clients/b2/b2client.h @@ -144,6 +144,7 @@ private: int bar_x_ofs; int in_unobs; QTime time; + bool resizable; }; class B2ClientFactory : public QObject, public KDecorationFactory