Store the motion event deliver flag in ClutterStage
authorEmmanuele Bassi <ebassi@linux.intel.com>
Fri, 18 Feb 2011 17:19:04 +0000 (17:19 +0000)
committerEmmanuele Bassi <ebassi@linux.intel.com>
Fri, 18 Feb 2011 19:41:41 +0000 (19:41 +0000)
commitbc548dc86271d38918d310c26c9c59de76218d16
tree3f3362968005016c12508a523948c199f027de18
parent7500b77b2bf8e23e885af6884adc006a4abf5c17
Store the motion event deliver flag in ClutterStage

Once upon a time, the land of Clutter had a stage singleton. It was
created automatically at initialization time and stayed around even
after the main loop was terminated. The singleton was content in
being all there was. There also was a global API to handle the
configuration of the stage singleton that would affect the behaviour
on other classes, signals and properties.

Then, an evil wizard came along and locked the stage singleton in his
black tower, and twisted it until it was possible to create new stages.
These new stages were pesky, and didn't have the same semantics of the
singleton: they didn't stay around when closed, or terminate the main
loop on delete events.

The evil wizard also started moving all the stage-related API from the
global context into class-specific methods.

Finally, the evil wizard cast a spell, and the stage singleton was
demoted to creation on demand - and until somebody called the
clutter_stage_get_default() function, the singleton remained in a limbo
of NULL pointers and undefined memory areas.

There was a last bit - literally - of information still held by the
global API; a tiny, little flag that disabled per-actor motion events.
The evil wizard added private accessors for it, and stored it inside the
stage private structure, in preparation for a deprecation that would
come in a future development cycle.

The evil wizard looked down upon the land of Clutter from the height of
his black tower; the lay of the land had been reshaped into a crucible
of potential, and the last dregs of the original force of creation were
either molted into new, useful shapes, or blasted away by the sheer fury
of his will.

All was good.
clutter/clutter-main.c
clutter/clutter-stage-private.h
clutter/clutter-stage.c