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.
This commit is contained in:
parent
c9aa5f1b1a
commit
94fb3f0c6a
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
|||||||
|
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>
|
2007-01-18 Tomas Frydrych <tf@openedhand.com>
|
||||||
|
|
||||||
* clutter/clutter-fixed.h:
|
* clutter/clutter-fixed.h:
|
||||||
|
@ -1376,7 +1376,8 @@ clutter_do_event (ClutterEvent *event)
|
|||||||
case CLUTTER_DESTROY_NOTIFY:
|
case CLUTTER_DESTROY_NOTIFY:
|
||||||
case CLUTTER_DELETE:
|
case CLUTTER_DELETE:
|
||||||
event->any.source = stage;
|
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 ();
|
clutter_main_quit ();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -874,7 +874,13 @@ clutter_stage_event (ClutterStage *stage,
|
|||||||
priv = stage->priv;
|
priv = stage->priv;
|
||||||
|
|
||||||
if (event->type == CLUTTER_DELETE)
|
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)
|
if (event->type != CLUTTER_STAGE_STATE)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user