[gtk+] Disable XI2 in gtk_test_init()



commit 7030492a3b57191c3e1ae7728bb69999e8c9a555
Author: Carlos Garnacho <carlosg gnome org>
Date:   Mon Dec 20 13:48:10 2010 +0100

    Disable XI2 in gtk_test_init()
    
    gdk_test_simulate_*() uses XSendEvent, which doesn't currently work
    with XI2/GenericEvents, so make tests use core events for the time
    being. Luckily there's a lot more to test than low-level event
    handling in these tests.

 gtk/gtktestutils.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtktestutils.c b/gtk/gtktestutils.c
index 704674b..a77ebe7 100644
--- a/gtk/gtktestutils.c
+++ b/gtk/gtktestutils.c
@@ -77,6 +77,14 @@ gtk_test_init (int    *argcp,
   gtk_disable_setlocale();
   setlocale (LC_ALL, "C");
   g_test_bug_base ("http://bugzilla.gnome.org/show_bug.cgi?id=%s";);
+
+  /* XSendEvent() doesn't work yet on XI2 events.
+   * So at the moment gdk_test_simulate_* can only
+   * send events that GTK+ understands if XI2 is
+   * disabled, bummer.
+   */
+  gdk_disable_multidevice ();
+
   gtk_init (argcp, argvp);
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]