summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Spilsbury <smspillaz@gmail.com>2010-08-14 19:53:15 +0800
committerSam Spilsbury <smspillaz@gmail.com>2010-08-14 19:53:15 +0800
commitf640fa90f99fd8fbcce9cafef59b2e4b0cc5b341 (patch)
treee5f8c309f1f02d42907d18675b101a083ca7d1c5
parentd76f05f9d8952833151e5f2223396911d7ddd54c (diff)
downloadkdecompat-f640fa90f99fd8fbcce9cafef59b2e4b0cc5b341.tar.gz
kdecompat-f640fa90f99fd8fbcce9cafef59b2e4b0cc5b341.tar.bz2
Don't stop screen level paint functions if one window has nothing to paint
-rw-r--r--src/kdecompat.cpp32
-rw-r--r--src/kdecompat.h6
2 files changed, 23 insertions, 15 deletions
diff --git a/src/kdecompat.cpp b/src/kdecompat.cpp
index 63db0de..6032a32 100644
--- a/src/kdecompat.cpp
+++ b/src/kdecompat.cpp
@@ -29,19 +29,27 @@
COMPIZ_PLUGIN_20090315 (kdecompat, KDECompatPluginVTable);
inline void
-KDECompatWindow::checkPaintFunctions ()
+KDECompatScreen::checkPaintFunctions ()
{
- bool enabled = (mPreviews.size () || mIsPreview ||
- (mSlideData && mSlideData->remaining > 0.0));
+ bool enabled = false;
+
+ foreach (CompWindow *w, screen->windows ())
+ {
+ KDECompatWindow *kcw = KDECompatWindow::get (w);
+ bool wEnabled = (kcw->mPreviews.size () || kcw->mIsPreview ||
+ (kcw->mSlideData &&
+ kcw->mSlideData->remaining > 0.0));
+ enabled |= wEnabled;
+
+ kcw->gWindow->glPaintSetEnabled (kcw, enabled);
+ kcw->cWindow->damageRectSetEnabled (kcw, enabled);
+ }
KDECOMPAT_SCREEN (screen);
- ks->gScreen->glPaintOutputSetEnabled (ks, enabled);
- ks->cScreen->donePaintSetEnabled (ks, enabled);
- ks->cScreen->preparePaintSetEnabled (ks, enabled);
-
- gWindow->glPaintSetEnabled (this, enabled);
- cWindow->damageRectSetEnabled (this, enabled);
+ gScreen->glPaintOutputSetEnabled (ks, enabled);
+ cScreen->donePaintSetEnabled (ks, enabled);
+ cScreen->preparePaintSetEnabled (ks, enabled);
}
void
@@ -95,7 +103,7 @@ KDECompatWindow::startSlideAnimation (bool appearing)
mSlideData->appearing = appearing;
ks->mHasSlidingPopups = true;
- checkPaintFunctions ();
+ ks->checkPaintFunctions ();
cWindow->addDamage ();
sendSlideEvent (true);
@@ -111,7 +119,7 @@ KDECompatWindow::endSlideAnimation ()
sendSlideEvent (false);
}
- checkPaintFunctions ();
+ KDECompatScreen::get (screen)->checkPaintFunctions ();
}
void
@@ -439,7 +447,7 @@ KDECompatWindow::updatePreviews ()
break;
}
- checkPaintFunctions ();
+ ks->checkPaintFunctions ();
}
}
diff --git a/src/kdecompat.h b/src/kdecompat.h
index e7f7318..45dced3 100644
--- a/src/kdecompat.h
+++ b/src/kdecompat.h
@@ -88,6 +88,9 @@ class KDECompatScreen :
void
freeScaleTimeout ();
+ inline void
+ checkPaintFunctions ();
+
CompositeScreen *cScreen;
GLScreen *gScreen;
@@ -202,9 +205,6 @@ class KDECompatWindow :
void
windowNotify (CompWindowNotify n);
-
- inline void
- checkPaintFunctions ();
};
#define KDECOMPAT_WINDOW(w) \