mirror of
https://github.com/brl/mutter.git
synced 2025-01-08 18:53:02 +00:00
Return event coordinates for 3BUTTON_PRESS events
The switch() in clutter_event_get_coords() wasn't returning the coordinates for the 3 button press events, thus those events never reached the actors.
This commit is contained in:
parent
59f4df5dfd
commit
00142fdb62
@ -2833,7 +2833,7 @@ clutter_actor_event (ClutterActor *actor,
|
||||
g_return_val_if_fail (event != NULL, FALSE);
|
||||
|
||||
g_object_ref (actor);
|
||||
|
||||
|
||||
g_signal_emit (actor, actor_signals[EVENT], 0, event);
|
||||
|
||||
switch (event->type)
|
||||
|
@ -154,12 +154,17 @@ clutter_event_get_coords (ClutterEvent *event,
|
||||
|
||||
switch (event->type)
|
||||
{
|
||||
case CLUTTER_NOTHING:
|
||||
case CLUTTER_KEY_PRESS:
|
||||
case CLUTTER_KEY_RELEASE:
|
||||
event_x = event_y = 0;
|
||||
case CLUTTER_STAGE_STATE:
|
||||
case CLUTTER_DESTROY_NOTIFY:
|
||||
case CLUTTER_CLIENT_MESSAGE:
|
||||
case CLUTTER_DELETE:
|
||||
break;
|
||||
case CLUTTER_BUTTON_PRESS:
|
||||
case CLUTTER_2BUTTON_PRESS:
|
||||
case CLUTTER_3BUTTON_PRESS:
|
||||
case CLUTTER_BUTTON_RELEASE:
|
||||
event_x = event->button.x;
|
||||
event_y = event->button.y;
|
||||
@ -172,8 +177,6 @@ clutter_event_get_coords (ClutterEvent *event,
|
||||
event_x = event->scroll.x;
|
||||
event_y = event->scroll.y;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (x)
|
||||
@ -440,6 +443,7 @@ clutter_event_get (void)
|
||||
if (!(event->flags & CLUTTER_EVENT_PENDING))
|
||||
{
|
||||
g_queue_remove (context->events_queue, event);
|
||||
|
||||
return (ClutterEvent *) event;
|
||||
}
|
||||
|
||||
|
@ -273,7 +273,7 @@ clutter_do_event (ClutterEvent *event)
|
||||
x, y,
|
||||
CLUTTER_PICK_REACTIVE);
|
||||
|
||||
CLUTTER_NOTE (EVENT, "Reactive event recieved at %ix%i - actor: %p",
|
||||
CLUTTER_NOTE (EVENT, "Reactive event received at %i, %i - actor: %p",
|
||||
x, y, actor);
|
||||
|
||||
if (event->type == CLUTTER_SCROLL)
|
||||
@ -303,14 +303,14 @@ clutter_do_event (ClutterEvent *event)
|
||||
*/
|
||||
while (actor)
|
||||
{
|
||||
if (clutter_actor_is_reactive (actor)
|
||||
|| clutter_actor_get_parent(actor) == NULL /* STAGE */ )
|
||||
if (clutter_actor_is_reactive (actor) ||
|
||||
clutter_actor_get_parent (actor) == NULL /* STAGE */ )
|
||||
{
|
||||
CLUTTER_NOTE (EVENT, "forwarding event to reactive actor");
|
||||
clutter_actor_event (actor, event);
|
||||
}
|
||||
|
||||
actor = clutter_actor_get_parent(actor);
|
||||
actor = clutter_actor_get_parent (actor);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user