* clutter/clutter-main.c (clutter_do_event): Check the
return value of the ::event signal for the CLUTTER_DELETE
event type.
* clutter/clutter-stage.c (clutter_stage_event): Emit the
::event signal when receiving the CLUTTER_DELETE event; this
allows to intercept the user's closing of the stage window.
+2008-01-18 Emmanuele Bassi <ebassi@openedhand.com>
+
+ * clutter/clutter-main.c (clutter_do_event): Check the
+ return value of the ::event signal for the CLUTTER_DELETE
+ event type.
+
+ * clutter/clutter-stage.c (clutter_stage_event): Emit the
+ ::event signal when receiving the CLUTTER_DELETE event; this
+ allows to intercept the user's closing of the stage window.
+
2007-01-18 Tomas Frydrych <tf@openedhand.com>
* clutter/clutter-fixed.h:
case CLUTTER_DESTROY_NOTIFY:
case CLUTTER_DELETE:
event->any.source = stage;
- if (clutter_stage_event (CLUTTER_STAGE (stage), event))
+ /* the stage did not handle the event, so we just quit */
+ if (!clutter_stage_event (CLUTTER_STAGE (stage), event))
clutter_main_quit ();
break;
priv = stage->priv;
if (event->type == CLUTTER_DELETE)
- return TRUE;
+ {
+ gboolean retval = FALSE;
+
+ g_signal_emit_by_name (stage, "event", event, &retval);
+
+ return retval;
+ }
if (event->type != CLUTTER_STAGE_STATE)
return FALSE;