mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 03:22:04 +00:00
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>
|
||||
|
||||
* clutter/clutter-fixed.h:
|
||||
|
@ -1376,7 +1376,8 @@ clutter_do_event (ClutterEvent *event)
|
||||
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;
|
||||
|
||||
|
@ -874,7 +874,13 @@ clutter_stage_event (ClutterStage *stage,
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user