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/XEventLoop.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/XEventLoop.java')
-rw-r--r-- | libjava/gnu/awt/xlib/XEventLoop.java | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/libjava/gnu/awt/xlib/XEventLoop.java b/libjava/gnu/awt/xlib/XEventLoop.java index 149ee736d7c..d0c46a804d5 100644 --- a/libjava/gnu/awt/xlib/XEventLoop.java +++ b/libjava/gnu/awt/xlib/XEventLoop.java @@ -21,12 +21,13 @@ import java.awt.event.InputEvent; import java.awt.event.MouseEvent; import java.util.Vector; -public class XEventLoop +public class XEventLoop implements Runnable { Display display; EventQueue queue; XAnyEvent anyEvent; - + private Thread eventLoopThread; + LightweightRedirector lightweightRedirector = new LightweightRedirector(); public XEventLoop(Display display, EventQueue queue) @@ -35,13 +36,17 @@ public class XEventLoop this.queue = queue; anyEvent = new XAnyEvent(display); + eventLoopThread = new Thread(this, "AWT thread for XEventLoop"); + eventLoopThread.start(); } - void interrupt() + public void run () { - anyEvent.interrupt(); + // FIXME: do we need an interrupt mechanism for window shutdown? + while (true) + postNextEvent (true); } - + /** If there's an event available, post it. * @return true if an event was posted */ @@ -65,7 +70,7 @@ public class XEventLoop AWTEvent event = null; if (loadNextEvent(block)) { - event = createEvent(); + event = createEvent(); event = lightweightRedirector.redirect(event); } return event; |