resize on all four corners

svn path=/trunk/kdebase/kwin/; revision=60881
This commit is contained in:
Matthias Ettrich 2000-08-13 16:32:51 +00:00
parent 635d4edac6
commit dc9fb7dc2b
3 changed files with 35 additions and 6 deletions

View file

@ -107,14 +107,14 @@ TitleBar::TitleBar(Manager * client)
question_, SIGNAL(contextHelp()),
client, SLOT(contextHelp())
);
if ( client->isTransient() ) {
// lighter decoration for transient windows
sticky_->hide();
iconify_->hide();
maximise_->hide();
}
}
void
@ -147,7 +147,7 @@ TitleBar::resizeEvent(QResizeEvent *)
if (width() < 120) sizeProblem = 3;
else if (width() < 160) sizeProblem = 2;
else if (width() < 200) sizeProblem = 1;
bool transient = ( (Client*) parentWidget() )->isTransient();
switch (sizeProblem) {
@ -236,6 +236,30 @@ TitleBar::paintEvent(QPaintEvent * e)
}
}
void
TitleBar::mousePressEvent(QMouseEvent * e)
{
text_->client()->fakeMouseEvent(e, this);
QWidget::mousePressEvent(e);
}
void
TitleBar::mouseReleaseEvent(QMouseEvent * e)
{
text_->client()->fakeMouseEvent(e, this);
QWidget::mouseReleaseEvent(e);
}
void
TitleBar::mouseMoveEvent(QMouseEvent * e)
{
text_->client()->fakeMouseEvent(e, this);
QWidget::mouseMoveEvent(e);
}
} // End namespace
// vim:ts=2:sw=2:tw=78

View file

@ -1,6 +1,6 @@
/*
Default KWin client
Copyright 2000
Rik Hemsley <rik@kde.org>
@ -54,6 +54,10 @@ class TitleBar : public QWidget
void resizeEvent(QResizeEvent *);
void paintEvent(QPaintEvent *);
void mousePressEvent(QMouseEvent *);
void mouseReleaseEvent(QMouseEvent *);
void mouseMoveEvent(QMouseEvent *);
private:
CloseButton * close_;

View file

@ -1,6 +1,6 @@
/*
Default KWin client
Copyright 2000
Rik Hemsley <rik@kde.org>
@ -41,9 +41,10 @@ class TitleText : public DBWidget
virtual ~TitleText();
void setActive(bool);
Manager * client() { return client_; }
protected:
void updatePixmap();
void mousePressEvent(QMouseEvent *);