Fix uninitialized memory and logic error in PaintRedirector

The refactoring of Compositor starting with b1739c3 caused some
regressions due to variables in Workspace and Compositor not
being initialized. Furthermore there was a boolean logic error
in PaintRedirector causing the decorations not to paint.

BUG: 305875
icc-effect-5.14.5
Martin Gräßlin 2012-08-27 19:45:01 +02:00
parent ab1f0bb749
commit 7a1fe42be0
3 changed files with 10 additions and 1 deletions

View File

@ -87,7 +87,14 @@ Compositor::Compositor(QObject* workspace)
: QObject(workspace)
, m_suspended(!options->isUseCompositing())
, m_blocked(false)
, cm_selection(NULL)
, vBlankInterval(0)
, fpsInterval(0)
, m_xrrRefreshRate(0)
, forceUnredirectCheck(false)
, m_finishing(false)
, m_timeSinceLastVBlank(0)
, m_nextFrameDelay(0)
, m_scene(NULL)
{
connect(&unredirectTimer, SIGNAL(timeout()), SLOT(delayedCheckUnredirect()));

View File

@ -82,7 +82,7 @@ bool PaintRedirector::eventFilter(QObject* o, QEvent* e)
break;
}
case QEvent::Paint: {
if (Workspace::self()->compositingActive()) {
if (!Workspace::self()->compositingActive()) {
return false;
}
if (!recursionCheck) {

View File

@ -105,6 +105,7 @@ Workspace::Workspace(bool restore)
#ifdef KWIN_BUILD_SCREENEDGES
, m_screenEdgeOrientation(0)
#endif
, m_compositor(NULL)
// Unsorted
, active_popup(NULL)
, active_popup_client(NULL)
@ -482,6 +483,7 @@ void Workspace::init()
Workspace::~Workspace()
{
delete m_compositor;
m_compositor = NULL;
blockStackingUpdates(true);
// TODO: grabXServer();