summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRui Matos <tiagomatos@gmail.com>2015-04-27 19:01:51 +0200
committerRui Matos <tiagomatos@gmail.com>2015-04-27 19:44:58 +0200
commitd62c595e51a95357d899fd275935e85196182118 (patch)
tree06e0489603f83a7d3fad1b77b22fac26925d7dbf
parentdd3cf9474470bf65dfa8ca0e796f2616fed55b87 (diff)
events: Ignore some event types when reseting idle time
These events don't result from actual hardware events so we shouldn't use them to reset idle time. https://bugzilla.gnome.org/show_bug.cgi?id=748541
-rw-r--r--src/core/events.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/core/events.c b/src/core/events.c
index 43efe1d9..263f76bc 100644
--- a/src/core/events.c
+++ b/src/core/events.c
@@ -93,6 +93,15 @@ handle_idletime_for_event (const ClutterEvent *event)
if (device == NULL)
return;
+ if (event->any.flags & CLUTTER_EVENT_FLAG_SYNTHETIC ||
+ event->type == CLUTTER_ENTER ||
+ event->type == CLUTTER_LEAVE ||
+ event->type == CLUTTER_STAGE_STATE ||
+ event->type == CLUTTER_DESTROY_NOTIFY ||
+ event->type == CLUTTER_CLIENT_MESSAGE ||
+ event->type == CLUTTER_DELETE)
+ return;
+
device_id = clutter_input_device_get_device_id (device);
core_monitor = meta_idle_monitor_get_core ();