mirror of
https://github.com/brl/mutter.git
synced 2024-11-10 07:56:14 -05:00
2008-01-19 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-event.c (clutter_event_copy): Take an extra reference on the related actor in ClutterEventCrossing that we explicitly unref in clutter_event_free(). (#714, Neil Roberts)
This commit is contained in:
parent
86c2e6e734
commit
5b40709270
@ -1,3 +1,9 @@
|
||||
2008-01-19 Emmanuele Bassi <ebassi@openedhand.com>
|
||||
|
||||
* clutter/clutter-event.c (clutter_event_copy): Take an extra
|
||||
reference on the related actor in ClutterEventCrossing that we
|
||||
explicitly unref in clutter_event_free(). (#714, Neil Roberts)
|
||||
|
||||
2008-01-18 Emmanuele Bassi <ebassi@openedhand.com>
|
||||
|
||||
* tests/test-actors.c (input_cb): Fix the callback signature;
|
||||
|
@ -341,6 +341,19 @@ clutter_event_copy (ClutterEvent *event)
|
||||
new_event = clutter_event_new (CLUTTER_NOTHING);
|
||||
*new_event = *event;
|
||||
|
||||
/* deep copies or references must be added here */
|
||||
switch (new_event->type)
|
||||
{
|
||||
case CLUTTER_ENTER:
|
||||
case CLUTTER_LEAVE:
|
||||
if (new_event->crossing.related)
|
||||
g_object_ref (new_event->crossing.related);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return new_event;
|
||||
}
|
||||
|
||||
@ -357,7 +370,8 @@ clutter_event_free (ClutterEvent *event)
|
||||
{
|
||||
if ((event->type == CLUTTER_LEAVE || event->type == CLUTTER_ENTER) &&
|
||||
event->crossing.related)
|
||||
g_object_unref (event->crossing.related);
|
||||
g_object_unref (event->crossing.related);
|
||||
|
||||
g_slice_free (ClutterEvent, event);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user