diff options
author | sgilbertson <sgilbertson@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-07-15 16:07:18 +0000 |
---|---|---|
committer | sgilbertson <sgilbertson@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-07-15 16:07:18 +0000 |
commit | 581d57e6c0faef95b511984510372d09ca55210c (patch) | |
tree | 36d9688009aa0d1293f407c7660e7901e7986ce0 /libjava/gnu/awt/xlib/XToolkit.java | |
parent | 53c0d211319a9f957d984f6e40b2828e1c586d47 (diff) | |
download | ppe42-gcc-581d57e6c0faef95b511984510372d09ca55210c.tar.gz ppe42-gcc-581d57e6c0faef95b511984510372d09ca55210c.zip |
2005-07-15 Scott Gilbertson <scottg@mantatest.com>
* gnu/awt/xlib/XCanvasPeer.java (attributes): New field.
(eventMask): New field.
(XCanvasPeer(Component)): Use attributes field.
(setBackground): Implemented.
(setEventMask): Process mask only if changed.
* gnu/awt/xlib/XEventLoop.java (class): Iplement Runnable.
(eventLoopThread): New field.
(XEventLoop(Display,EventQueue)): Start eventLoopThread.
(interrupt): Removed.
(run): New method.
* gnu/awt/xlib/XEventQueue.java (getNextEvent): Process Container
and Component events.
* gnu/awt/xlib/XFramePeer.java (processingConfigureNotify): New
field.
(configureNotify): Set and clear processingConfigureNotify.
(setBounds): Process only if processingConfigureNotify is false.
(toBack): Implemented.
(toFront): Implemented.
* gnu/awt/xlib/XGraphics.java (setColor): Ignore null color.
* gnu/awt/xlib/XGraphicsConfiguration.java (getPixel): Ignore null
color.
* gnu/awt/xlib/XToolkit.java (nativeQueueEmpty): Always return true.
(wakeNativeQueue): Do nothing.
(iterateNativeQueue): Do queue.wait if blocking.
* gnu/gcj/xlib/Font.java (loadFont): New method.
(loadFontImpl): Renamed native method, was loadFont.
* gnu/gcj/xlib/Window.java (toFront): New method.
(toBack): New method.
* gnu/gcj/xlib/natFont.cc (loadFontImpl): Renamed method, was
loadFont.
* gnu/gcj/xlib/natWindow.cc (toBack): New method.
(toFront): New method.
* gnu/gcj/xlib/natXAnyEvent.cc (loadNext): Removed timeout.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@102057 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/gnu/awt/xlib/XToolkit.java')
-rw-r--r-- | libjava/gnu/awt/xlib/XToolkit.java | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/libjava/gnu/awt/xlib/XToolkit.java b/libjava/gnu/awt/xlib/XToolkit.java index c6e140eb3e1..87acec3e349 100644 --- a/libjava/gnu/awt/xlib/XToolkit.java +++ b/libjava/gnu/awt/xlib/XToolkit.java @@ -445,13 +445,16 @@ public class XToolkit extends ClasspathToolkit } public boolean nativeQueueEmpty() - { - return eventLoop.isIdle(); + { + // Tell EventQueue the native queue is empty, because XEventLoop + // separately ensures that native events are posted to AWT. + return true; } public void wakeNativeQueue() { - eventLoop.interrupt(); + // Not implemented, because the native queue is always awake. + // (i.e. it's polled in a thread separate from the AWT dispatch thread) } /** Checks the native event queue for events. If blocking, waits until an @@ -464,6 +467,18 @@ public class XToolkit extends ClasspathToolkit */ public void iterateNativeQueue(java.awt.EventQueue locked, boolean block) { - eventLoop.postNextEvent(block); - } + // There is nothing to do here except block, because XEventLoop + // iterates the queue in a dedicated thread. + if (block) + { + try + { + queue.wait (); + } + catch (InterruptedException ie) + { + // InterruptedException intentionally ignored + } + } + }; } |