wayland: Make it possible to trigger popups through pointer/keyboard/touch

Right now we just check the pointer serial, so the popup will be
immediately dismissed if the client passes a serial corresponding to
another input device.

Abstract this a bit further and add a meta_wayland_seat_can_popup() call
that will check the serial all input devices. This makes it possible to
trigger menus through touch or keyboard devices.

https://bugzilla.gnome.org/show_bug.cgi?id=756296
This commit is contained in:
Carlos Garnacho
2015-10-09 16:42:06 +02:00
parent dd5a4ecdf9
commit a5d2555196
7 changed files with 46 additions and 2 deletions

View File

@ -673,3 +673,10 @@ meta_wayland_keyboard_create_new_resource (MetaWaylandKeyboard *keyboard,
wl_list_insert (&keyboard->resource_list, wl_resource_get_link (cr));
}
}
gboolean
meta_wayland_keyboard_can_popup (MetaWaylandKeyboard *keyboard,
uint32_t serial)
{
return keyboard->key_serial == serial;
}