Commit e0f04efa authored by Emmanuele Bassi's avatar Emmanuele Bassi

device: When changing the stage, unset the pointer actor

If we do not unset the Stage we will have stale data, and the Crossing
event when re-entering a Stage will not be emitted, as the actor under
the pointer might be the same as before.
parent 5d834682
......@@ -295,9 +295,9 @@ _clutter_input_device_set_stage (ClutterInputDevice *device,
g_object_weak_unref (G_OBJECT (device->cursor_actor),
cursor_weak_unref,
device);
device->cursor_actor = NULL;
}
device->cursor_actor = NULL;
}
/*
......@@ -367,6 +367,14 @@ _clutter_input_device_set_actor (ClutterInputDevice *device,
cev.crossing.y = device->current_y;
cev.crossing.device = device;
CLUTTER_NOTE (EVENT, "Device '%s' entering '%s' at %d, %d",
device->device_name,
clutter_actor_get_name (actor) != NULL
? clutter_actor_get_name (actor)
: G_OBJECT_TYPE_NAME (actor),
device->current_x,
device->current_y);
/* if there is an actor overlapping the Stage boundary and we
* don't do this check then we'll emit an ENTER event only on
* the actor instead of emitting it on the Stage *and* the
......@@ -377,6 +385,8 @@ _clutter_input_device_set_actor (ClutterInputDevice *device,
cev.crossing.source = CLUTTER_ACTOR (device->stage);
cev.crossing.related = NULL;
CLUTTER_NOTE (EVENT, "Adding Crossing[Enter] event for Stage");
_clutter_process_event (&cev);
cev.crossing.source = actor;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment