summaryrefslogtreecommitdiffstats
path: root/src/demos
diff options
context:
space:
mode:
Diffstat (limited to 'src/demos')
-rw-r--r--src/demos/newt/NEWTTest1.java2
-rw-r--r--src/demos/newt/TaskManagerTest1.java7
-rw-r--r--src/demos/newt/util/TaskToolWM.java12
3 files changed, 11 insertions, 10 deletions
diff --git a/src/demos/newt/NEWTTest1.java b/src/demos/newt/NEWTTest1.java
index 51a31c7..0cfc190 100644
--- a/src/demos/newt/NEWTTest1.java
+++ b/src/demos/newt/NEWTTest1.java
@@ -100,7 +100,7 @@ public class NEWTTest1 implements WindowListener, KeyListener, MouseListener
while (running)
{
- window.pumpMessages();
+ display.pumpMessages();
window.lockSurface();
try
diff --git a/src/demos/newt/TaskManagerTest1.java b/src/demos/newt/TaskManagerTest1.java
index d2b7e98..6044cb7 100644
--- a/src/demos/newt/TaskManagerTest1.java
+++ b/src/demos/newt/TaskManagerTest1.java
@@ -26,6 +26,7 @@ public class TaskManagerTest1 implements WindowListener, KeyListener, MouseList
}
Window window;
+ Display display;
public void windowResized(WindowEvent e) {
System.err.println("windowResized "+e);
@@ -91,8 +92,8 @@ public class TaskManagerTest1 implements WindowListener, KeyListener, MouseList
// prolog - lock whatever you need
// do it ..
- if(null!=window) {
- window.pumpMessages();
+ if(null!=display) {
+ display.pumpMessages();
}
} catch (Throwable t) {
// handle errors ..
@@ -136,7 +137,7 @@ public class TaskManagerTest1 implements WindowListener, KeyListener, MouseList
caps.setBlueBits(8);
//caps.setBackgroundOpaque(true);
- Display display = NewtFactory.createDisplay(null);
+ display = NewtFactory.createDisplay(null);
Screen screen = NewtFactory.createScreen(display, 0);
window = NewtFactory.createWindow(screen, caps);
window.setTitle("GlassPrism");
diff --git a/src/demos/newt/util/TaskToolWM.java b/src/demos/newt/util/TaskToolWM.java
index eade4e6..0f1b180 100644
--- a/src/demos/newt/util/TaskToolWM.java
+++ b/src/demos/newt/util/TaskToolWM.java
@@ -74,18 +74,18 @@ public class TaskToolWM {
}
private static class EventThread implements Runnable {
- Window window;
+ Display display;
- EventThread(Window w) {
- window = w;
+ EventThread(Display d) {
+ display = d;
}
public void run() {
try {
// prolog - lock whatever you need
// do it ..
- if(null!=window) {
- window.pumpMessages();
+ if(null!=display) {
+ display.pumpMessages();
}
} catch (Throwable t) {
// handle errors ..
@@ -101,7 +101,7 @@ public class TaskToolWM {
synchronized(window2Event) {
Runnable evt = (Runnable) window2Event.get(w);
if(null==evt) {
- evt = new EventThread(w);
+ evt = new EventThread(w.getScreen().getDisplay());
window2Event.put(w, evt);
eventMgr.addTask(evt);
res = true;