summaryrefslogtreecommitdiff
path: root/plugins/unityshell
diff options
authorAndrea Azzarone <azzaronea@gmail.com>2012-09-28 03:10:48 +0200
committerAndrea Azzarone <azzaronea@gmail.com>2012-09-28 03:10:48 +0200
commitcc564013155afc3e24b987d9afdd19c631283708 (patch)
treece3fcb079e454ff053f01d50e650c33f6e05445e /plugins/unityshell
parent3f9fb3f0e145a9397d828a2648bab1a8e1920cb1 (diff)
Use compiz tick-source.
(bzr r2762)
Diffstat (limited to 'plugins/unityshell')
-rw-r--r--plugins/unityshell/src/unityshell.cpp14
-rw-r--r--plugins/unityshell/src/unityshell.h2
2 files changed, 13 insertions, 3 deletions
diff --git a/plugins/unityshell/src/unityshell.cpp b/plugins/unityshell/src/unityshell.cpp
index 61b948de2..6221f31c4 100644
--- a/plugins/unityshell/src/unityshell.cpp
+++ b/plugins/unityshell/src/unityshell.cpp
@@ -24,7 +24,6 @@
#include <Nux/HLayout.h>
#include <Nux/BaseWindow.h>
#include <Nux/WindowCompositor.h>
-#include <Nux/NuxTimerTickSource.h>
#include <UnityCore/Variant.h>
@@ -234,7 +233,7 @@ UnityScreen::UnityScreen(CompScreen* screen)
this));
#endif
- tick_source_.reset(new nux::NuxTimerTickSource);
+ tick_source_.reset(new na::TickSource);
animation_controller_.reset(new na::AnimationController(*tick_source_));
wt->RedrawRequested.connect(sigc::mem_fun(this, &UnityScreen::onRedrawRequested));
@@ -1301,6 +1300,10 @@ void UnityScreen::preparePaint(int ms)
{
cScreen->preparePaint(ms);
+ static long long big_tick = 0;
+ big_tick += ms*1000;
+ tick_source_->tick(big_tick);
+
for (ShowdesktopHandlerWindowInterface *wi : ShowdesktopHandler::animating_windows)
wi->HandleAnimations (ms);
@@ -1322,6 +1325,13 @@ void UnityScreen::donePaint()
if (didShellRepaint)
wt->ClearDrawList();
+ if (animation_controller_->HasRunningAnimations())
+ {
+ cScreen->damageRegionSetEnabled(this, false);
+ cScreen->damageScreen();
+ cScreen->damageRegionSetEnabled(this, true);
+ }
+
std::list <ShowdesktopHandlerWindowInterface *> remove_windows;
for (ShowdesktopHandlerWindowInterface *wi : ShowdesktopHandler::animating_windows)
diff --git a/plugins/unityshell/src/unityshell.h b/plugins/unityshell/src/unityshell.h
index a11ce4dd2..26785b1ca 100644
--- a/plugins/unityshell/src/unityshell.h
+++ b/plugins/unityshell/src/unityshell.h
@@ -246,7 +246,7 @@ private:
bool TopPanelBackgroundTextureNeedsUpdate() const;
void UpdateTopPanelBackgroundTexture();
- std::unique_ptr<nux::NuxTimerTickSource> tick_source_;
+ std::unique_ptr<na::TickSource> tick_source_;
std::unique_ptr<na::AnimationController> animation_controller_;
Settings dash_settings_;