stage: set key focus actor to NULL before emitting focus-out
authorTommi Komulainen <tko@litl.com>
Fri, 24 Apr 2009 15:43:39 +0000 (16:43 +0100)
committerEmmanuele Bassi <ebassi@linux.intel.com>
Thu, 11 Jun 2009 11:14:10 +0000 (12:14 +0100)
commitbf0c21e0154a9666d5be2be18cf93f3a5119953c
tree8e78f84ac3826dac068e77b8332f8ece8264eaf3
parentdf839e22e6c5e5e323168fd4b336ff2b4df0fbcc
stage: set key focus actor to NULL before emitting focus-out

Someone might hide the previously focused actor in the focus-out signal
handler and as key focus still appears to be on that actor we'd get
re-entrant call and get glib critical from g_object_weak_unref

This changes clutter_stage_get_key_focus() to return stage/NULL during
focus-out signal emission. It used to be the actor focus-out was being
emitted on.

Fixes bug:

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

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
clutter/clutter-stage.c