mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-17 06:10:15 +00:00
mir: handle generic input events
This commit is contained in:
parent
b1e5ad469c
commit
6a51ac59f0
@ -550,9 +550,28 @@ gdk_mir_event_source_queue_event (GdkDisplay *display,
|
||||
GdkWindow *window,
|
||||
const MirEvent *event)
|
||||
{
|
||||
const MirInputEvent *input_event;
|
||||
|
||||
// FIXME: Only generate events if the window wanted them?
|
||||
switch (mir_event_get_type (event))
|
||||
{
|
||||
case mir_event_type_input:
|
||||
input_event = mir_event_get_input_event (event);
|
||||
|
||||
switch (mir_input_event_get_type (input_event))
|
||||
{
|
||||
case mir_input_event_type_key:
|
||||
handle_key_event (window, input_event);
|
||||
break;
|
||||
case mir_input_event_type_touch:
|
||||
handle_motion_event (window, input_event);
|
||||
break;
|
||||
case mir_input_event_type_pointer:
|
||||
handle_motion_event (window, input_event);
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
case mir_event_type_key:
|
||||
handle_key_event (window, mir_event_get_input_event (event));
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user