[mutter] backend: Use new clutter_seat_has_touchscreen helper
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] backend: Use new clutter_seat_has_touchscreen helper
- Date: Mon, 19 Oct 2020 07:50:39 +0000 (UTC)
commit b5d21f00f815dbfd5b6790cd352c7c0d8372719a
Author: Hans de Goede <hdegoede redhat com>
Date: Thu Oct 15 15:41:55 2020 +0200
backend: Use new clutter_seat_has_touchscreen helper
Replace the meta-backend.c private check_has_physical_touchscreen
function with a call to the new clutter_seat_has_touchscreen helper.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1506
src/backends/meta-backend.c | 27 +--------------------------
1 file changed, 1 insertion(+), 26 deletions(-)
---
diff --git a/src/backends/meta-backend.c b/src/backends/meta-backend.c
index c4bba30006..ac8cee4189 100644
--- a/src/backends/meta-backend.c
+++ b/src/backends/meta-backend.c
@@ -393,31 +393,6 @@ check_has_pointing_device (ClutterSeat *seat)
return found;
}
-static inline gboolean
-check_has_physical_touchscreen (ClutterSeat *seat)
-{
- GList *l, *devices;
- gboolean found = FALSE;
-
- devices = clutter_seat_list_devices (seat);
-
- for (l = devices; l; l = l->next)
- {
- ClutterInputDevice *device = l->data;
-
- if (clutter_input_device_get_device_mode (device) != CLUTTER_INPUT_MODE_LOGICAL &&
- clutter_input_device_get_device_type (device) == CLUTTER_TOUCHSCREEN_DEVICE)
- {
- found = TRUE;
- break;
- }
- }
-
- g_list_free (devices);
-
- return found;
-}
-
static void
on_device_removed (ClutterSeat *seat,
ClutterInputDevice *device,
@@ -441,7 +416,7 @@ on_device_removed (ClutterSeat *seat,
g_clear_handle_id (&priv->device_update_idle_id, g_source_remove);
device_type = clutter_input_device_get_device_type (device);
- has_touchscreen = check_has_physical_touchscreen (seat);
+ has_touchscreen = clutter_seat_has_touchscreen (seat);
if (device_type == CLUTTER_TOUCHSCREEN_DEVICE && has_touchscreen)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]