diff --git a/geometrytip.cpp b/geometrytip.cpp index 26a1c06448..08b3f9207e 100644 --- a/geometrytip.cpp +++ b/geometrytip.cpp @@ -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)) { diff --git a/geometrytip.h b/geometrytip.h index 29f93165c2..f0a71dba15 100644 --- a/geometrytip.h +++ b/geometrytip.h @@ -23,6 +23,8 @@ class GeometryTip: public QLabel private: const XSizeHints* sizeHints; const Client* c; + int framewidth; + int frameheight; }; }