diff --git a/repos/gems/src/app/decorator/animator.h b/repos/gems/include/gems/animator.h similarity index 77% rename from repos/gems/src/app/decorator/animator.h rename to repos/gems/include/gems/animator.h index 52b5a5a093..19db820fcd 100644 --- a/repos/gems/src/app/decorator/animator.h +++ b/repos/gems/include/gems/animator.h @@ -11,8 +11,12 @@ * under the terms of the GNU General Public License version 2. */ -#ifndef _ANIMATOR_H_ -#define _ANIMATOR_H_ +#ifndef _INCLUDE__GEMS__ANIMATOR_H_ +#define _INCLUDE__GEMS__ANIMATOR_H_ + +/* Genode includes */ +#include + class Animator { @@ -29,6 +33,8 @@ class Animator public: inline void animate(); + + bool active() const { return _items.first() != nullptr; } }; @@ -69,8 +75,11 @@ class Animator::Item : public Genode::List::Element inline void Animator::animate() { - for (Item *item = _items.first(); item; item = item->next()) + for (Item *item = _items.first(); item; ) { + Item *next = item->next(); item->animate(); + item = next; + } } -#endif /* _ANIMATOR_H_ */ +#endif /* _INCLUDE__GEMS__ANIMATOR_H_ */ diff --git a/repos/gems/src/app/decorator/window.h b/repos/gems/src/app/decorator/window.h index d5107c2016..f778db9d7c 100644 --- a/repos/gems/src/app/decorator/window.h +++ b/repos/gems/src/app/decorator/window.h @@ -17,8 +17,8 @@ #include #include -/* local includes */ -#include +/* gems includes */ +#include namespace Decorator { class Window; }