diff --git a/clients/oxygen/oxygenbutton.h b/clients/oxygen/oxygenbutton.h index a74af55069..83ccb1f291 100644 --- a/clients/oxygen/oxygenbutton.h +++ b/clients/oxygen/oxygenbutton.h @@ -52,7 +52,7 @@ public: ~OxygenButton(); QSize sizeHint() const; - const int lastMousePress(){return lastmouse_;} + int lastMousePress(){return lastmouse_;} void reset(long unsigned int){repaint();} protected: diff --git a/clients/oxygen/oxygenclient.cpp b/clients/oxygen/oxygenclient.cpp index 5ecbadea2a..911a7672c0 100644 --- a/clients/oxygen/oxygenclient.cpp +++ b/clients/oxygen/oxygenclient.cpp @@ -51,6 +51,7 @@ #include #include #include +#include #include "math.h" @@ -68,6 +69,12 @@ OxygenHelper *oxygenHelper() return globalHelper; } +static void oxkwincleanupBefore() +{ + OxygenHelper *h = globalHelper; + h->invalidateCaches(); +} + void renderDot(QPainter *p, const QPointF &point, qreal diameter) { p->drawEllipse(QRectF(point.x()-diameter/2, point.y()-diameter/2, diameter, diameter)); @@ -79,6 +86,7 @@ OxygenClient::OxygenClient(KDecorationBridge *b, KDecorationFactory *f) , colorCacheInvalid_(true) , helper_(*globalHelper) { + qAddPostRoutine(oxkwincleanupBefore); } OxygenClient::~OxygenClient()