compass: Change the device to which we should latch

Instead of using the real "Lid Switch" device to attach our fake compass
to, use "Power Button". "Lid Switch" will only be present on laptops,
but "Power Button" is in both laptops and desktops, making it easier to
test.
This commit is contained in:
Bastien Nocera
2017-02-02 16:04:43 +01:00
parent 6a115c5e9c
commit 6c5cb2e586

View File

@@ -34,8 +34,8 @@ fake_compass_discover (GUdevDevice *device)
if (g_strcmp0 (g_udev_device_get_subsystem (device), "input") != 0)
return FALSE;
/* "Lid switch" is a random input device to latch onto */
if (g_strcmp0 (g_udev_device_get_property (device, "NAME"), "\"Lid Switch\"") != 0)
/* "Power Button" is a random input device to latch onto */
if (g_strcmp0 (g_udev_device_get_property (device, "NAME"), "\"Power Button\"") != 0)
return FALSE;
g_debug ("Found fake compass at %s", g_udev_device_get_sysfs_path (device));