commit b25b8878c017a89bb9e02145fab5f452db4b143a
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Mon Feb 11 20:19:48 2019 +0100

    accessibilitywatcher: Ignore events from invisible objects
    
    which have their extents actually undefined.

diff --git a/src/focuspoll/accessibilitywatcher.cpp b/src/focuspoll/accessibilitywatcher.cpp
index 773547a..8f63298 100644
--- a/src/focuspoll/accessibilitywatcher.cpp
+++ b/src/focuspoll/accessibilitywatcher.cpp
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2016 Auboyneau Vincent <ksamak@riseup.net>
- * Copyright (C) 2018 Samuel Thibault <sthibault@hypra.fr>
+ * Copyright (C) 2018-2019 Samuel Thibault <sthibault@hypra.fr>
  *
  *   This file is part of compiz.
  *
@@ -256,6 +256,15 @@ AccessibilityWatcher::registerEvent (const AtspiEvent *event, const gchar *type)
 		   atspi_accessible_get_role_name (event->source, NULL),
 		   atspi_accessible_get_name (application.get (), NULL));
 
+    auto stateSet0 = unique_gobject (atspi_accessible_get_state_set (event->source));
+    if (!atspi_state_set_contains (stateSet0.get (), ATSPI_STATE_SHOWING) ||
+        !atspi_state_set_contains (stateSet0.get (), ATSPI_STATE_VISIBLE))
+    {
+	/* This is not actually on-screen, its coordinates will not mean anything */
+	delete (res);
+	return;
+    }
+
     if (!res->active)
     {
 	// prevents skipping events that are not designated as active. we check the activeness of parents.
