svn path=/trunk/kdebase/kwin/; revision=235470
This commit is contained in:
parent
1e3aa4ef97
commit
cafa67e113
2 changed files with 12 additions and 1 deletions
|
@ -408,6 +408,7 @@ GalliumClient::GalliumClient( Workspace *ws, WId w, QWidget *parent,
|
|||
|
||||
// Connect required stuff together
|
||||
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[BtnIconify], SIGNAL( clicked() ), this, SLOT( iconify() ));
|
||||
connect( button[BtnMax], SIGNAL( clicked() ), this, SLOT( slotMaximize() ));
|
||||
|
@ -449,6 +450,7 @@ GalliumClient::GalliumClient( Workspace *ws, WId w, QWidget *parent,
|
|||
button[BtnClose]->hide();
|
||||
|
||||
hiddenItems = false;
|
||||
closing = false;
|
||||
|
||||
// Make sure that the menu button uses the correct mini-icon
|
||||
iconChange();
|
||||
|
@ -772,6 +774,13 @@ void GalliumClient::menuButtonPressed()
|
|||
button[BtnMenu]->setDown(false);
|
||||
}
|
||||
else
|
||||
closing = true;
|
||||
}
|
||||
|
||||
|
||||
void GalliumClient::menuButtonReleased()
|
||||
{
|
||||
if ( closing )
|
||||
closeWindow();
|
||||
}
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ using namespace KWinInternal;
|
|||
class GalliumButton : public KWinButton
|
||||
{
|
||||
public:
|
||||
GalliumButton(Client *parent=0, const char *name=0,
|
||||
GalliumButton(Client *parent=0, const char *name=0,
|
||||
const unsigned char *bitmap=NULL,
|
||||
bool menuButton=false, bool isMini=false,
|
||||
const QString& tip=NULL);
|
||||
|
@ -82,6 +82,7 @@ class GalliumClient : public Client
|
|||
void slotReset();
|
||||
void slotMaximize();
|
||||
void menuButtonPressed();
|
||||
void menuButtonReleased();
|
||||
|
||||
private:
|
||||
enum Buttons{ BtnHelp=0, BtnMax, BtnIconify, BtnClose,
|
||||
|
@ -94,6 +95,7 @@ class GalliumClient : public Client
|
|||
bool hiddenItems;
|
||||
QBoxLayout* hb;
|
||||
bool smallButtons;
|
||||
bool closing;
|
||||
};
|
||||
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue