summaryrefslogtreecommitdiffstats
path: root/src/newt/classes/com
diff options
context:
space:
mode:
Diffstat (limited to 'src/newt/classes/com')
-rw-r--r--src/newt/classes/com/jogamp/newt/impl/windows/WindowsWindow.java4
-rw-r--r--src/newt/classes/com/jogamp/newt/impl/x11/X11Window.java3
-rw-r--r--src/newt/classes/com/jogamp/newt/opengl/GLWindow.java9
3 files changed, 12 insertions, 4 deletions
diff --git a/src/newt/classes/com/jogamp/newt/impl/windows/WindowsWindow.java b/src/newt/classes/com/jogamp/newt/impl/windows/WindowsWindow.java
index daa09b034..2c3ffc3cc 100644
--- a/src/newt/classes/com/jogamp/newt/impl/windows/WindowsWindow.java
+++ b/src/newt/classes/com/jogamp/newt/impl/windows/WindowsWindow.java
@@ -34,6 +34,7 @@
package com.jogamp.newt.impl.windows;
+import com.jogamp.nativewindow.impl.windows.GDI;
import javax.media.nativewindow.*;
import com.jogamp.newt.impl.WindowImpl;
import javax.media.nativewindow.util.Insets;
@@ -168,7 +169,7 @@ public class WindowsWindow extends WindowImpl {
}
protected Point getLocationOnScreenImpl(int x, int y) {
- return (Point) getRelativeLocation0( getWindowHandle(), 0 /*root win*/, x, y);
+ return GDI.GetRelativeLocation( getWindowHandle(), 0 /*root win*/, x, y);
}
//----------------------------------------------------------------------
@@ -190,7 +191,6 @@ public class WindowsWindow extends WindowImpl {
boolean parentChange, int fullScreenChange, int decorationChange);
private static native void setTitle0(long windowHandle, String title);
private native void requestFocus0(long windowHandle, boolean force);
- private native Object getRelativeLocation0(long src_win, long dest_win, int src_x, int src_y);
private void insetsChanged(int left, int top, int right, int bottom) {
if (left != -1 && top != -1 && right != -1 && bottom != -1) {
diff --git a/src/newt/classes/com/jogamp/newt/impl/x11/X11Window.java b/src/newt/classes/com/jogamp/newt/impl/x11/X11Window.java
index 06c7dfa99..91143923d 100644
--- a/src/newt/classes/com/jogamp/newt/impl/x11/X11Window.java
+++ b/src/newt/classes/com/jogamp/newt/impl/x11/X11Window.java
@@ -33,6 +33,7 @@
package com.jogamp.newt.impl.x11;
+import com.jogamp.nativewindow.impl.x11.X11Util;
import com.jogamp.newt.impl.WindowImpl;
import javax.media.nativewindow.*;
import javax.media.nativewindow.x11.*;
@@ -114,7 +115,7 @@ public class X11Window extends WindowImpl {
}
protected Point getLocationOnScreenImpl(int x, int y) {
- return (Point) getRelativeLocation0( getDisplayHandle(), getScreenIndex(), getWindowHandle(), 0 /*root win*/, x, y);
+ return X11Util.GetRelativeLocation( getDisplayHandle(), getScreenIndex(), getWindowHandle(), 0 /*root win*/, x, y);
}
//----------------------------------------------------------------------
diff --git a/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java b/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java
index 54fcfe85e..967836cf6 100644
--- a/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java
+++ b/src/newt/classes/com/jogamp/newt/opengl/GLWindow.java
@@ -60,7 +60,7 @@ import javax.media.nativewindow.util.Insets;
* via {@link #invoke(boolean, javax.media.opengl.GLRunnable)} to the OpenGL command stream.<br>
* <p>
*/
-public class GLWindow implements GLAutoDrawable, Window {
+public class GLWindow implements GLAutoDrawable, Window, NEWTEventConsumer {
private WindowImpl window;
/**
@@ -687,6 +687,13 @@ public class GLWindow implements GLAutoDrawable, Window {
}
//----------------------------------------------------------------------
+ // NEWTEventConsumer
+ //
+ public boolean consumeEvent(NEWTEvent event) {
+ return window.consumeEvent(event);
+ }
+
+ //----------------------------------------------------------------------
// Window completion
//
public final void windowRepaint(int x, int y, int width, int height) {