From 8bd3b28335d93b72210d3b7c6c6377da5ce8e20c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Thu, 2 May 2013 15:22:03 +0200 Subject: [PATCH] Remove dead code path from GeometryTip Ctor parameter save_under is always false. In additon include proper needed header instead of client.h. REVIEW: 110272 --- geometry.cpp | 2 +- geometrytip.cpp | 7 +------ geometrytip.h | 5 +++-- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/geometry.cpp b/geometry.cpp index ce0829fab6..5ff46b2772 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -2510,7 +2510,7 @@ void Client::positionGeometryTip() return; // some effect paints this for us if (options->showGeometryTip()) { if (!geometryTip) { - geometryTip = new GeometryTip(&xSizeHint, false); + geometryTip = new GeometryTip(&xSizeHint); } QRect wgeom(moveResizeGeom); // position of the frame, size of the window itself wgeom.setWidth(wgeom.width() - (width() - clientSize().width())); diff --git a/geometrytip.cpp b/geometrytip.cpp index 61c6cded38..f66306a07e 100644 --- a/geometrytip.cpp +++ b/geometrytip.cpp @@ -24,7 +24,7 @@ along with this program. If not, see . namespace KWin { -GeometryTip::GeometryTip(const XSizeHints* xSizeHints, bool save_under): +GeometryTip::GeometryTip(const XSizeHints* xSizeHints): QLabel(0) { setObjectName(QLatin1String("kwingeometry")); @@ -35,11 +35,6 @@ GeometryTip::GeometryTip(const XSizeHints* xSizeHints, bool save_under): setAlignment(Qt::AlignCenter | Qt::AlignTop); setWindowFlags(Qt::X11BypassWindowManagerHint); sizeHints = xSizeHints; - if (save_under) { - XSetWindowAttributes attr; - attr.save_under = True; // use saveunder if possible to avoid weird effects in transparent mode - XChangeWindowAttributes(display(), winId(), CWSaveUnder, &attr); - } } GeometryTip::~GeometryTip() diff --git a/geometrytip.h b/geometrytip.h index 21959773d2..109a4c8058 100644 --- a/geometrytip.h +++ b/geometrytip.h @@ -22,7 +22,8 @@ along with this program. If not, see . #define KWIN_GEOMETRY_TIP_H #include -#include "client.h" +#include +#include namespace KWin { @@ -31,7 +32,7 @@ class GeometryTip: public QLabel { Q_OBJECT public: - GeometryTip(const XSizeHints* xSizeHints, bool save_under); + GeometryTip(const XSizeHints* xSizeHints); ~GeometryTip(); void setGeometry(const QRect& geom);