core: Do not update idle times for slave devices

Those go nowhere, so just avoid doing this.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1039
This commit is contained in:
Carlos Garnacho 2020-02-05 16:42:26 +01:00 committed by Georges Basile Stavracas Neto
parent 586723eb44
commit f7646af810

View File

@ -101,11 +101,9 @@ get_window_for_event (MetaDisplay *display,
static void
handle_idletime_for_event (const ClutterEvent *event)
{
ClutterInputDevice *device, *source_device;
MetaIdleMonitor *core_monitor, *device_monitor;
MetaIdleMonitor *core_monitor;
device = clutter_event_get_device (event);
if (device == NULL)
if (clutter_event_get_device (event) == NULL)
return;
if (event->any.flags & CLUTTER_EVENT_FLAG_SYNTHETIC ||
@ -118,17 +116,7 @@ handle_idletime_for_event (const ClutterEvent *event)
return;
core_monitor = meta_idle_monitor_get_core ();
device_monitor = meta_idle_monitor_get_for_device (device);
meta_idle_monitor_reset_idletime (core_monitor);
meta_idle_monitor_reset_idletime (device_monitor);
source_device = clutter_event_get_source_device (event);
if (source_device != device)
{
device_monitor = meta_idle_monitor_get_for_device (source_device);
meta_idle_monitor_reset_idletime (device_monitor);
}
}
static gboolean