mirror of
https://github.com/brl/mutter.git
synced 2024-12-25 04:22:05 +00:00
tests: Update the devices test
Use the DeviceManager API instead of the X11 specific API.
This commit is contained in:
parent
157da20e86
commit
d5331bfb57
@ -43,6 +43,7 @@ test_devices_main (int argc, char **argv)
|
|||||||
ClutterActor *stage;
|
ClutterActor *stage;
|
||||||
TestDevicesApp *app;
|
TestDevicesApp *app;
|
||||||
ClutterColor stage_color = { 0x61, 0x64, 0x8c, 0xff };
|
ClutterColor stage_color = { 0x61, 0x64, 0x8c, 0xff };
|
||||||
|
ClutterDeviceManager *manager;
|
||||||
const GSList *stage_devices, *l;
|
const GSList *stage_devices, *l;
|
||||||
|
|
||||||
/* force enabling X11 support */
|
/* force enabling X11 support */
|
||||||
@ -63,10 +64,11 @@ test_devices_main (int argc, char **argv)
|
|||||||
|
|
||||||
clutter_actor_show_all (stage);
|
clutter_actor_show_all (stage);
|
||||||
|
|
||||||
stage_devices = clutter_x11_get_input_devices ();
|
manager = clutter_device_manager_get_default ();
|
||||||
|
stage_devices = clutter_device_manager_peek_devices (manager);
|
||||||
|
|
||||||
if (stage_devices == NULL)
|
if (stage_devices == NULL)
|
||||||
g_error ("No extended input devices found.");
|
g_error ("No input devices found.");
|
||||||
|
|
||||||
for (l = stage_devices; l != NULL; l = l->next)
|
for (l = stage_devices; l != NULL; l = l->next)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user