st-button: treat keypad Enter keypresses like normal Enter events

Not doing this makes some widgets inconsistent, such as the user list in
the GDM login dialog.

https://bugzilla.gnome.org/show_bug.cgi?id=672471
This commit is contained in:
Cosimo Cecchi 2012-03-20 09:50:59 -04:00
parent 2c5005c1ea
commit 5b8abe6809

View File

@ -210,7 +210,8 @@ st_button_key_press (ClutterActor *actor,
if (button->priv->button_mask & ST_BUTTON_ONE) if (button->priv->button_mask & ST_BUTTON_ONE)
{ {
if (event->keyval == CLUTTER_KEY_space || if (event->keyval == CLUTTER_KEY_space ||
event->keyval == CLUTTER_KEY_Return) event->keyval == CLUTTER_KEY_Return ||
event->keyval == CLUTTER_KEY_KP_Enter)
{ {
st_button_press (button, ST_BUTTON_ONE); st_button_press (button, ST_BUTTON_ONE);
return TRUE; return TRUE;
@ -229,7 +230,8 @@ st_button_key_release (ClutterActor *actor,
if (button->priv->button_mask & ST_BUTTON_ONE) if (button->priv->button_mask & ST_BUTTON_ONE)
{ {
if (event->keyval == CLUTTER_KEY_space || if (event->keyval == CLUTTER_KEY_space ||
event->keyval == CLUTTER_KEY_Return) event->keyval == CLUTTER_KEY_Return ||
event->keyval == CLUTTER_KEY_KP_Enter)
{ {
gboolean is_click; gboolean is_click;