mirror of
https://github.com/brl/mutter.git
synced 2024-11-23 00:20:42 -05:00
event: Typos in event code could cause crashes
A typo in clutter-event.c meant that the wrong struct location could be used for the input device of key events. Also, a typo in the X11 event code meant that key-presses would come from the pointer device (releases would still come from the keyboard device).
This commit is contained in:
parent
32ad63efef
commit
8801c947d5
@ -575,7 +575,7 @@ clutter_event_get_device (ClutterEvent *event)
|
|||||||
|
|
||||||
case CLUTTER_KEY_PRESS:
|
case CLUTTER_KEY_PRESS:
|
||||||
case CLUTTER_KEY_RELEASE:
|
case CLUTTER_KEY_RELEASE:
|
||||||
device = event->scroll.device;
|
device = event->key.device;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -667,7 +667,7 @@ event_translate (ClutterBackend *backend,
|
|||||||
event->key.type = event->type = CLUTTER_KEY_PRESS;
|
event->key.type = event->type = CLUTTER_KEY_PRESS;
|
||||||
event->key.device =
|
event->key.device =
|
||||||
clutter_device_manager_get_core_device (manager,
|
clutter_device_manager_get_core_device (manager,
|
||||||
CLUTTER_POINTER_DEVICE);
|
CLUTTER_KEYBOARD_DEVICE);
|
||||||
|
|
||||||
translate_key_event (backend, event, xevent);
|
translate_key_event (backend, event, xevent);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user