Don't crash when making window sticky/maximized without a sticky/maximized button.
svn path=/trunk/kdebase/kwin/; revision=79649
This commit is contained in:
parent
5198b0b270
commit
692efa5cde
1 changed files with 5 additions and 2 deletions
|
@ -203,6 +203,7 @@ KWMThemeClient::KWMThemeClient( Workspace *ws, WId w, QWidget *parent,
|
|||
const char *name )
|
||||
: Client( ws, w, parent, name, WResizeNoErase | WNorthWestGravity)
|
||||
{
|
||||
stickyBtn = maxBtn = 0;
|
||||
init_theme();
|
||||
connect(options, SIGNAL(resetClients()), this, SLOT(slotReset()));
|
||||
QGridLayout *layout = new QGridLayout(this);
|
||||
|
@ -482,12 +483,14 @@ void KWMThemeClient::mouseDoubleClickEvent( QMouseEvent * e )
|
|||
|
||||
void KWMThemeClient::stickyChange(bool on)
|
||||
{
|
||||
stickyBtn->setPixmap(on ? *pinupPix : *pindownPix);
|
||||
if (stickyBtn)
|
||||
stickyBtn->setPixmap(on ? *pinupPix : *pindownPix);
|
||||
}
|
||||
|
||||
void KWMThemeClient::maximizeChange(bool m)
|
||||
{
|
||||
maxBtn->setPixmap(m ? *minmaxPix : *maxPix);
|
||||
if (maxBtn)
|
||||
maxBtn->setPixmap(m ? *minmaxPix : *maxPix);
|
||||
}
|
||||
|
||||
Client::MousePosition KWMThemeClient::mousePosition(const QPoint &p) const
|
||||
|
|
Loading…
Reference in a new issue