summaryrefslogtreecommitdiffstats
path: root/src/nativewindow/classes/com/sun
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2009-10-03 21:56:30 -0700
committerSven Gothel <[email protected]>2009-10-03 21:56:30 -0700
commitbf584fba26561a1905f37251d681ac100d4a0779 (patch)
tree59df84cac68eb274318d7280c900f5a2b2df714c /src/nativewindow/classes/com/sun
parent4d4b7c52d032d0c9302e4e16560f2e874e31b8bc (diff)
NativeWindow extends SurfaceUpdatedListener for 'surfaceUpdated' propagation. GLDrawableFactory.createGLDrawable() propagates NativeWindow to offscreen NullWindow.
Diffstat (limited to 'src/nativewindow/classes/com/sun')
-rw-r--r--src/nativewindow/classes/com/sun/nativewindow/impl/NullWindow.java15
-rw-r--r--src/nativewindow/classes/com/sun/nativewindow/impl/jawt/JAWTWindow.java2
2 files changed, 14 insertions, 3 deletions
diff --git a/src/nativewindow/classes/com/sun/nativewindow/impl/NullWindow.java b/src/nativewindow/classes/com/sun/nativewindow/impl/NullWindow.java
index c5a617990..6f568df13 100644
--- a/src/nativewindow/classes/com/sun/nativewindow/impl/NullWindow.java
+++ b/src/nativewindow/classes/com/sun/nativewindow/impl/NullWindow.java
@@ -96,7 +96,17 @@ public class NullWindow implements NativeWindow {
return false;
}
- public void surfaceUpdated(Object updater) { }
+ NativeWindow upstreamNW = null;
+
+ public void setUpstreamNativeWindow(NativeWindow upstream) {
+ upstreamNW = upstream;
+ }
+
+ public void surfaceUpdated(Object updater, NativeWindow window, long when) {
+ if(null!=upstreamNW) {
+ upstreamNW.surfaceUpdated(updater, upstreamNW, when);
+ }
+ }
public long getDisplayHandle() {
return displayHandle;
@@ -142,7 +152,8 @@ public class NullWindow implements NativeWindow {
return "NullWindow[config "+config+
", displayHandle 0x"+Long.toHexString(getDisplayHandle())+
", surfaceHandle 0x"+Long.toHexString(getSurfaceHandle())+
- ", size "+getWidth()+"x"+getHeight()+"]";
+ ", size "+getWidth()+"x"+getHeight()+
+ ", upstream "+upstreamNW+"]";
}
}
diff --git a/src/nativewindow/classes/com/sun/nativewindow/impl/jawt/JAWTWindow.java b/src/nativewindow/classes/com/sun/nativewindow/impl/jawt/JAWTWindow.java
index b4975706d..e821f9b3a 100644
--- a/src/nativewindow/classes/com/sun/nativewindow/impl/jawt/JAWTWindow.java
+++ b/src/nativewindow/classes/com/sun/nativewindow/impl/jawt/JAWTWindow.java
@@ -129,7 +129,7 @@ public abstract class JAWTWindow implements NativeWindow {
return false;
}
- public void surfaceUpdated(Object updater) { }
+ public void surfaceUpdated(Object updater, NativeWindow window, long when) { }
public long getDisplayHandle() {
return config.getScreen().getDevice().getHandle();