* java/awt/EventQueue.java (isDispatchThread): Do check on top of stack. (push): Make sure push is performed at the top of the thread stack.
From-SVN: r75820
This commit is contained in:
parent
d4f3ce5cc0
commit
25c3f7c8b9
2 changed files with 22 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2004-01-13 Fernando Nasser <fnasser@redhat.com>
|
||||||
|
|
||||||
|
* java/awt/EventQueue.java (isDispatchThread): Do check on top of stack.
|
||||||
|
(push): Make sure push is performed at the top of the thread stack.
|
||||||
|
|
||||||
2004-01-13 Thomas Fitzsimmons <fitzsim@redhat.com>
|
2004-01-13 Thomas Fitzsimmons <fitzsim@redhat.com>
|
||||||
|
|
||||||
* gnu/java/awt/peer/gtk/GtkTextAreaPeer.java,
|
* gnu/java/awt/peer/gtk/GtkTextAreaPeer.java,
|
||||||
|
@ -47,7 +52,7 @@
|
||||||
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMainThread.c (gtkInit):
|
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMainThread.c (gtkInit):
|
||||||
Update postConfigureEvent signature.
|
Update postConfigureEvent signature.
|
||||||
|
|
||||||
2004-01-12 Fernando Nasser <fnasser@redhat.com>
|
2004-01-13 Fernando Nasser <fnasser@redhat.com>
|
||||||
|
|
||||||
* gnu/java/awt/peer/gtk/TestAWT.java (DialogWindow): Add WindowAdapter
|
* gnu/java/awt/peer/gtk/TestAWT.java (DialogWindow): Add WindowAdapter
|
||||||
to handle Window "Closing" events.
|
to handle Window "Closing" events.
|
||||||
|
|
|
@ -269,12 +269,17 @@ public class EventQueue
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return true if the current thread is the AWT event dispatch
|
* Return true if the current thread is the current AWT event dispatch
|
||||||
* thread.
|
* thread.
|
||||||
*/
|
*/
|
||||||
public static boolean isDispatchThread()
|
public static boolean isDispatchThread()
|
||||||
{
|
{
|
||||||
EventQueue eq = Toolkit.getDefaultToolkit().getSystemEventQueue();
|
EventQueue eq = Toolkit.getDefaultToolkit().getSystemEventQueue();
|
||||||
|
|
||||||
|
/* Find last EventQueue in chain */
|
||||||
|
while (eq.next != null)
|
||||||
|
eq = eq.next;
|
||||||
|
|
||||||
return (Thread.currentThread() == eq.dispatchThread);
|
return (Thread.currentThread() == eq.dispatchThread);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -306,6 +311,15 @@ public class EventQueue
|
||||||
if (newEventQueue == null)
|
if (newEventQueue == null)
|
||||||
throw new NullPointerException ();
|
throw new NullPointerException ();
|
||||||
|
|
||||||
|
/* Make sure we are at the top of the stack because callers can
|
||||||
|
only get a reference to the one at the bottom using
|
||||||
|
Toolkit.getDefaultToolkit().getSystemEventQueue() */
|
||||||
|
if (next != null)
|
||||||
|
{
|
||||||
|
next.push (newEventQueue);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
int i = next_out;
|
int i = next_out;
|
||||||
while (i != next_in)
|
while (i != next_in)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue