From d2fd031544278a225a231bb5048eeb531f4521df Mon Sep 17 00:00:00 2001 From: Casper Boemann Date: Sat, 20 Dec 2008 04:39:14 +0000 Subject: [PATCH] Try to do the same fix for kwin Please svn up and test this out CCBUG:163538 svn path=/trunk/KDE/kdebase/workspace/; revision=899162 --- clients/oxygen/oxygenbutton.h | 2 +- clients/oxygen/oxygenclient.cpp | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) 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()