Merge branch 'master' into a11y
Conflicts: eek/eek-gtk-keyboard.c
This commit is contained in:
@ -492,23 +492,15 @@ on_button_event (GtkWidget *widget,
|
||||
GdkEventButton *event,
|
||||
gpointer user_data)
|
||||
{
|
||||
EekElement *keyboard = user_data, *section, *key;
|
||||
EekGtkKeyboard *keyboard = EEK_GTK_KEYBOARD(user_data), *key;
|
||||
EekGtkKeyboardPrivate *priv = EEK_GTK_KEYBOARD_GET_PRIVATE(keyboard);
|
||||
EekBounds bounds;
|
||||
gdouble x, y;
|
||||
|
||||
x = (gdouble)event->x / priv->scale;
|
||||
y = (gdouble)event->y / priv->scale;
|
||||
section = eek_container_find_by_position (EEK_CONTAINER(keyboard), x, y);
|
||||
if (section) {
|
||||
eek_element_get_bounds (keyboard, &bounds);
|
||||
x -= bounds.x;
|
||||
y -= bounds.y;
|
||||
key = eek_container_find_by_position (EEK_CONTAINER(section),
|
||||
x,
|
||||
y);
|
||||
if (!key)
|
||||
return FALSE;
|
||||
key = eek_keyboard_find_key_by_position (EEK_KEYBOARD(keyboard), x, y);
|
||||
if (key)
|
||||
switch (event->type) {
|
||||
case GDK_BUTTON_PRESS:
|
||||
press_key (EEK_GTK_KEYBOARD(keyboard), EEK_KEY(key));
|
||||
@ -519,7 +511,6 @@ on_button_event (GtkWidget *widget,
|
||||
default:
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user