mono/mono — pull request #312 by robwilkens (2012-06-02 13:58:03+00:00)
Title: Novell Bug #321541 Fix:  Changes it so Idle event is only delivered to thread which asked for it.

Created a hashtable of per-thread event handlers for idle.. Assigned into
that hashtable when the regular Idle eventhandler was assigned by mapping
it by ManagedThreadId. The hashtable had to use a separate object (different
class) rather than an EventHandler directly, because an eventhandler
apparently cannot be assigned to another object, it can only be a part of a
class. It also couldn't be checked for null or called from outside the class
so i handled that as appropriate (by secondary callers).

This has been checked against the code in 321541 and the code appears to work
fine now. I have also confirmed no new unit test failures have been introduced
by this change. There were 3 failures before, and are three failures now.

Also, This includes a unit test, which will fail without this patch.

Here's a shortcut to the Novell bug:
https://bugzilla.novell.com/show_bug.cgi?id=321541

Please note my comment in the commit about only testing on X11 while minorly modifying other drivers insomuch as they call the Idle event.