6693974: Unify EventQueue$EventQueueItem and SunToolkit.$EventQueueItem classes
Reviewed-by: volk, art
This commit is contained in:
parent
9e5e0e9d44
commit
29aa2aecb4
@ -5737,7 +5737,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
|
||||
}
|
||||
}
|
||||
|
||||
transient EventQueueItem[] eventCache;
|
||||
transient sun.awt.EventQueueItem[] eventCache;
|
||||
|
||||
/**
|
||||
* @see #isCoalescingEnabled
|
||||
|
@ -42,6 +42,7 @@ import sun.awt.AppContext;
|
||||
import sun.awt.AWTAutoShutdown;
|
||||
import sun.awt.PeerEvent;
|
||||
import sun.awt.SunToolkit;
|
||||
import sun.awt.EventQueueItem;
|
||||
|
||||
/**
|
||||
* <code>EventQueue</code> is a platform-independent class
|
||||
@ -359,7 +360,7 @@ public class EventQueue {
|
||||
entry != null; entry = entry.next)
|
||||
{
|
||||
// Give Component.coalesceEvents a chance
|
||||
if (entry.event.getSource() == source && entry.id == id) {
|
||||
if (entry.event.getSource() == source && entry.event.getID() == id) {
|
||||
AWTEvent coalescedEvent = source.coalesceEvents(
|
||||
entry.event, e);
|
||||
if (coalescedEvent != null) {
|
||||
@ -499,7 +500,7 @@ public class EventQueue {
|
||||
for (EventQueueItem entry = queues[i].head, prev = null;
|
||||
entry != null; prev = entry, entry = entry.next)
|
||||
{
|
||||
if (entry.id == id) {
|
||||
if (entry.event.getID() == id) {
|
||||
if (prev == null) {
|
||||
queues[i].head = entry.next;
|
||||
} else {
|
||||
@ -545,7 +546,7 @@ public class EventQueue {
|
||||
for (int i = NUM_PRIORITIES - 1; i >= 0; i--) {
|
||||
EventQueueItem q = queues[i].head;
|
||||
for (; q != null; q = q.next) {
|
||||
if (q.id == id) {
|
||||
if (q.event.getID() == id) {
|
||||
return q.event;
|
||||
}
|
||||
}
|
||||
@ -1051,14 +1052,3 @@ class Queue {
|
||||
EventQueueItem head;
|
||||
EventQueueItem tail;
|
||||
}
|
||||
|
||||
class EventQueueItem {
|
||||
AWTEvent event;
|
||||
int id;
|
||||
EventQueueItem next;
|
||||
|
||||
EventQueueItem(AWTEvent evt) {
|
||||
event = evt;
|
||||
id = evt.getID();
|
||||
}
|
||||
}
|
||||
|
@ -2039,12 +2039,3 @@ class PostEventQueue {
|
||||
SunToolkit.wakeupEventQueue(eventQueue, event.getSource() == AWTAutoShutdown.getInstance());
|
||||
}
|
||||
} // class PostEventQueue
|
||||
|
||||
class EventQueueItem {
|
||||
AWTEvent event;
|
||||
EventQueueItem next;
|
||||
|
||||
EventQueueItem(AWTEvent evt) {
|
||||
event = evt;
|
||||
}
|
||||
} // class EventQueueItem
|
||||
|
Loading…
Reference in New Issue
Block a user