[Gtk-sharp-list] ThreadNotify Problem Under Windows

Archie Maskill galepsus at gmail.com
Tue Oct 18 18:44:27 EDT 2005


On 10/18/05, Miguel de Icaza <miguel at ximian.com> wrote:

> Now, the latest version of Gtk# 2 uses Timeouts instead of idle handlers
> that will trigger the method immediately instead of the idle time.



Many thanks to Miguel for putting me on track for finding a solution!

For those who are interested, this was the problem of
ThreadNotify.WakeupMain queueing up messages on the GTK thread, and the
messages not being acted upon until the mouse was moved within the
application window.

The two solutions I came up with were :

a) tell the user to wiggle the mouse incessantly, for as long as the
application is running

b) add this line : GLib.Timeout.Add(200, new GLib.TimeoutHandler( DoNothing
));
and this method : bool DoNothing() { return true; }

which "reminds" the GTK thread to deal with queued up messages about 5 times
per second.

Not the prettiest solution, but it was either that or going back to SWF.

Thanks again!
Archie
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20051018/c0b5f7e6/attachment.html


More information about the Gtk-sharp-list mailing list