2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / libjava / gnu / awt / xlib / XEventQueue.java
blobea2ad186060584f58455c793a541cce34a48ea3f
1 /* Copyright (C) 2000 Free Software Foundation
3 This file is part of libgcj.
5 This software is copyrighted work licensed under the terms of the
6 Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
7 details. */
9 package gnu.awt.xlib;
11 import java.awt.*;
13 import gnu.gcj.xlib.Display;
15 /**
16 * The only difference here from a standard EventQueue is that the X
17 * display connection is flushed before waiting for more events.
19 public class XEventQueue extends EventQueue
21 Display display;
23 public XEventQueue(Display display)
25 this.display = display;
28 public AWTEvent getNextEvent() throws InterruptedException
30 if ((peekEvent() == null) && (display != null))
31 display.flush();
32 return super.getNextEvent();