Ensure that the geometrytip dimensions are updated when resizing a window

in transparent mode.

svn path=/trunk/kdebase/kwin/; revision=239876
This commit is contained in:
Karol Szwed 2003-07-29 15:12:16 +00:00
parent a33e94d36c
commit 2269952b2b
2 changed files with 8 additions and 3 deletions

View file

@ -39,6 +39,10 @@ GeometryTip::GeometryTip( const Client* client, const XSizeHints* xSizeHints, bo
setFrameStyle( QFrame::Raised | QFrame::StyledPanel );
setAlignment( AlignCenter | AlignTop );
sizeHints = xSizeHints;
QWidget* wrap = c->windowWrapper();
framewidth = client->width() - wrap->width();
frameheight = client->height() - wrap->height();
}
GeometryTip::~GeometryTip()
@ -49,10 +53,9 @@ void GeometryTip::setGeometry( const QRect& geom )
{
int w, h;
int bw, bh;
QWidget* wrap = c->windowWrapper();
w = wrap->width();
h = wrap->height();
w = geom.width() - framewidth;
h = geom.height() - frameheight;
if (sizeHints) {
if (!(sizeHints->flags & PBaseSize)) {

View file

@ -23,6 +23,8 @@ class GeometryTip: public QLabel
private:
const XSizeHints* sizeHints;
const Client* c;
int framewidth;
int frameheight;
};
}