Commit fd1057d1 authored by Torsten Schönfeld's avatar Torsten Schönfeld

Fix a test failure in t/zz-GdkEvent.t

Apparently, the default main loop's event queue might sometimes already
contain events even though we did not put any in there (for example, a
settings change notification).  This caused test failures.  To avoid
this, clear the event queue before relying on its contents.
parent 15f111f7
......@@ -397,8 +397,11 @@ SKIP: {
skip 'misc. stuff; missing annotations', 4
unless Gtk3::CHECK_VERSION(3, 2, 0);
my $event = Gtk3::Gdk::Event->new ('button-press');
# First, clear all pending events.
Gtk3::main_iteration while Gtk3::events_pending;
# Then add our own.
my $event = Gtk3::Gdk::Event->new ('button-press');
$event->put;
ok (Gtk3::Gdk::events_pending);
isa_ok (Gtk3::Gdk::Event::get (), 'Gtk3::Gdk::EventButton');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment