private PaintQueue paint; // Paint-only queue
internal ArrayList timer_list;
private Thread thread;
- private bool quit_posted;
+ private bool dispatch_idle;
private static readonly int InitialXEventSize = 100;
private static readonly int InitialLXEventSize = 10;
paint = new PaintQueue(InitialPaintSize);
timer_list = new ArrayList ();
this.thread = thread;
- this.quit_posted = false;
+ this.dispatch_idle = true;
}
public int Count {
public void Enqueue (XEvent xevent)
{
+ if (Thread.CurrentThread != thread) {
+ Console.WriteLine ("Hwnd.Queue.Enqueue called from a different thread without locking.");
+ Console.WriteLine (Environment.StackTrace);
+ }
+
xqueue.Enqueue (xevent);
}
public XEvent Dequeue ()
{
+ if (Thread.CurrentThread != thread) {
+ Console.WriteLine ("Hwnd.Queue.Dequeue called from a different thread without locking.");
+ Console.WriteLine (Environment.StackTrace);
+ }
+
if (xqueue.Count == 0) {
lock (lqueue) {
return lqueue.Dequeue ();
public XEvent Peek()
{
+ if (Thread.CurrentThread != thread) {
+ Console.WriteLine ("Hwnd.Queue.Peek called from a different thread without locking.");
+ Console.WriteLine (Environment.StackTrace);
+ }
+
if (xqueue.Count == 0) {
lock (lqueue) {
return lqueue.Peek ();
return xqueue.Peek();
}
- public bool PostQuitState {
+ public bool DispatchIdle {
get {
- return quit_posted;
+ return dispatch_idle;
}
-
set {
- quit_posted = value;
+ dispatch_idle = value;
}
}