mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 19:42:05 +00:00
tests: Fix test-events output
• The enter/leave event line should take into account the case where the related field is set to NULL (meaning entering from off-stage and leaving the stage). • The ButtonRelease line shows the click count but uses the button; the button *and* the click count should be displayed for both ButtonPress and ButtonRelease, to verify they match.
This commit is contained in:
parent
b3a42c3b09
commit
68b47e3ed4
@ -193,22 +193,28 @@ input_cb (ClutterActor *actor,
|
||||
case CLUTTER_ENTER:
|
||||
g_print ("[%s] ENTER (from:%s)",
|
||||
clutter_actor_get_name (source_actor),
|
||||
clutter_actor_get_name (clutter_event_get_related (event)));
|
||||
clutter_event_get_related (event) != NULL
|
||||
? clutter_actor_get_name (clutter_event_get_related (event))
|
||||
: "<out of stage>");
|
||||
break;
|
||||
case CLUTTER_LEAVE:
|
||||
g_print ("[%s] LEAVE (to:%s)",
|
||||
clutter_actor_get_name (source_actor),
|
||||
clutter_actor_get_name (clutter_event_get_related (event)));
|
||||
clutter_event_get_related (event) != NULL
|
||||
? clutter_actor_get_name (clutter_event_get_related (event))
|
||||
: "<out of stage>");
|
||||
break;
|
||||
case CLUTTER_BUTTON_PRESS:
|
||||
g_print ("[%s] BUTTON PRESS (click count:%i)",
|
||||
g_print ("[%s] BUTTON PRESS (button:%i, click count:%i)",
|
||||
clutter_actor_get_name (source_actor),
|
||||
clutter_event_get_button (event),
|
||||
clutter_event_get_click_count (event));
|
||||
break;
|
||||
case CLUTTER_BUTTON_RELEASE:
|
||||
g_print ("[%s] BUTTON RELEASE (click count:%i)",
|
||||
g_print ("[%s] BUTTON RELEASE (button:%i, click count:%i)",
|
||||
clutter_actor_get_name (source_actor),
|
||||
clutter_event_get_button (event));
|
||||
clutter_event_get_button (event),
|
||||
clutter_event_get_click_count (event));
|
||||
|
||||
if (source_actor == CLUTTER_ACTOR (stage))
|
||||
clutter_stage_set_key_focus (stage, NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user