- Fixed bugs #40125, #45621 and #46215 in the redmond style as well.

svn path=/trunk/kdebase/kwin/; revision=235470
This commit is contained in:
Fredrik Höglund 2003-07-04 18:32:29 +00:00
parent 1e3aa4ef97
commit cafa67e113
2 changed files with 12 additions and 1 deletions

View file

@ -408,6 +408,7 @@ GalliumClient::GalliumClient( Workspace *ws, WId w, QWidget *parent,
// Connect required stuff together // Connect required stuff together
connect( button[BtnMenu], SIGNAL(pressed()), this, SLOT( menuButtonPressed() )); connect( button[BtnMenu], SIGNAL(pressed()), this, SLOT( menuButtonPressed() ));
connect( button[BtnMenu], SIGNAL(released()), this, SLOT( menuButtonReleased() ));
connect( button[BtnClose], SIGNAL( clicked() ), this, SLOT( closeWindow() )); connect( button[BtnClose], SIGNAL( clicked() ), this, SLOT( closeWindow() ));
connect( button[BtnIconify], SIGNAL( clicked() ), this, SLOT( iconify() )); connect( button[BtnIconify], SIGNAL( clicked() ), this, SLOT( iconify() ));
connect( button[BtnMax], SIGNAL( clicked() ), this, SLOT( slotMaximize() )); connect( button[BtnMax], SIGNAL( clicked() ), this, SLOT( slotMaximize() ));
@ -449,6 +450,7 @@ GalliumClient::GalliumClient( Workspace *ws, WId w, QWidget *parent,
button[BtnClose]->hide(); button[BtnClose]->hide();
hiddenItems = false; hiddenItems = false;
closing = false;
// Make sure that the menu button uses the correct mini-icon // Make sure that the menu button uses the correct mini-icon
iconChange(); iconChange();
@ -772,6 +774,13 @@ void GalliumClient::menuButtonPressed()
button[BtnMenu]->setDown(false); button[BtnMenu]->setDown(false);
} }
else else
closing = true;
}
void GalliumClient::menuButtonReleased()
{
if ( closing )
closeWindow(); closeWindow();
} }

View file

@ -33,7 +33,7 @@ using namespace KWinInternal;
class GalliumButton : public KWinButton class GalliumButton : public KWinButton
{ {
public: public:
GalliumButton(Client *parent=0, const char *name=0, GalliumButton(Client *parent=0, const char *name=0,
const unsigned char *bitmap=NULL, const unsigned char *bitmap=NULL,
bool menuButton=false, bool isMini=false, bool menuButton=false, bool isMini=false,
const QString& tip=NULL); const QString& tip=NULL);
@ -82,6 +82,7 @@ class GalliumClient : public Client
void slotReset(); void slotReset();
void slotMaximize(); void slotMaximize();
void menuButtonPressed(); void menuButtonPressed();
void menuButtonReleased();
private: private:
enum Buttons{ BtnHelp=0, BtnMax, BtnIconify, BtnClose, enum Buttons{ BtnHelp=0, BtnMax, BtnIconify, BtnClose,
@ -94,6 +95,7 @@ class GalliumClient : public Client
bool hiddenItems; bool hiddenItems;
QBoxLayout* hb; QBoxLayout* hb;
bool smallButtons; bool smallButtons;
bool closing;
}; };
}; };