Always create the Damage object for ClutterX11TexturePixmap auto updates
Always create the Damage object for ClutterX11TexturePixmap auto updates

If clutter_x11_texture_set_window() was called after
clutter_x11_texture_pixmap_set_automatic(), then the Damage object would
not be properly created so updates to the window were ignored.

Refactor creation of the damage object to a separate function, and
call it from clutter_x11_texture_set_window() and clutter_x11_texture_set_pixmap()
as appropriate. Addition and removal of the filter function is made
conditional on priv->damage to make free_damage_resources() cleanly
idempotent.

See: http://bugzilla.gnome.org/show_bug.cgi?id=587189 for the original
bug report.

http://bugzilla.openedhand.com/show_bug.cgi?id=1710

Signed-off-by: Emmanuele Bassi <049ee2061f71220e5aaf33f5be422fc2a2b06a44@linux.intel.com>

djdeath/clutter-multithreaded,Distrotech/clutter,djdeath/clutter-android,rkudiyarov/clutter_osx,jigpu/clutter,djdeath/clutter-multithreaded,jigpu/clutter,kerrickstaley/clutter-vala,nobled/clutter,ebassi/clutter,djdeath/clutter,GNOME/clutter,GNOME/clutter,GNOME/clutter,spatulasnout/clutter,djdeath/clutter,ebassi/clutter,tardyp/clutter,nobled/clutter,djdeath/clutter-android,djdeath/clutter,djdeath/clutter-android,Distrotech/clutter,rkudiyarov/clutter_osx,nobled/clutter,Distrotech/clutter,collects/clutter,Distrotech/clutter,dlespiau/clutter,spatulasnout/clutter,djdeath/clutter,ebassi/clutter,GNOME/clutter,heysion/clutter-clone,tardyp/clutter,tardyp/clutter,jigpu/clutter,collects/clutter,heysion/clutter-clone,ebassi/clutter,djdeath/clutter-android,collects/clutter,rkudiyarov/clutter_osx,kerrickstaley/clutter-vala,collects/clutter,rkudiyarov/clutter_osx,spatulasnout/clutter,heysion/clutter-clone,Distrotech/clutter,kerrickstaley/clutter-vala,jigpu/clutter,jigpu/clutter,spatulasnout/clutter,dlespiau/clutter,kerrickstaley/clutter-vala,ebassi/clutter,heysion/clutter-clone,jigpu/clutter,djdeath/clutter,heysion/clutter-clone,djdeath/clutter-android,djdeath/clutter-multithreaded,djdeath/clutter,collects/clutter,djdeath/clutter-multithreaded,GNOME/clutter,spatulasnout/clutter,dlespiau/clutter,Distrotech/clutter