From 47366d57200b0bc3a9cd382d60505d765c91f279 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Tue, 4 Aug 2009 12:20:33 +0000 Subject: [PATCH] Reset Repaints on a Toplevel has to include the decoration shadows if used. svn path=/trunk/KDE/kdebase/workspace/; revision=1006788 --- composite.cpp | 2 +- toplevel.h | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/composite.cpp b/composite.cpp index 573825f2f2..5a3a68ddd0 100644 --- a/composite.cpp +++ b/composite.cpp @@ -411,7 +411,7 @@ void Workspace::performCompositing() // TODO I think effects->transformWindowDamage() doesn't need to be called here, // pre-paint will extend painted window areas as necessary. repaints_region |= c->repaints().translated( c->pos()); - c->resetRepaints( c->rect()); + c->resetRepaints( c->decorationRect()); } QRegion repaints = repaints_region; // clear all repaints, so that post-pass can add repaints for the next repaint diff --git a/toplevel.h b/toplevel.h index 62160f7508..9b8f7cc9a4 100644 --- a/toplevel.h +++ b/toplevel.h @@ -65,6 +65,7 @@ class Toplevel virtual QPoint clientPos() const = 0; // inside of geometry() virtual QSize clientSize() const = 0; virtual QRect visibleRect() const; // the area the window occupies on the screen + virtual QRect decorationRect() const; // rect including the decoration shadows // prefer isXXX() instead // 0 for supported types means default for managed/unmanaged types @@ -245,6 +246,11 @@ inline QRect Toplevel::rect() const return QRect( 0, 0, width(), height()); } +inline QRect Toplevel::decorationRect() const + { + return rect(); + } + inline bool Toplevel::readyForPainting() const { return ready_for_painting;