From 62daa94704f3f5125916b81a3494d45ab0c0d09a Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Thu, 27 Nov 2008 03:27:17 +0000 Subject: Newt-KD: working inc. events. Screen size can be set w/ property newt.ws.swidth newt.ws.sheight git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1807 232f8b59-042b-4e1e-8c03-345bb8c30851 --- src/classes/com/sun/javafx/newt/x11/X11Window.java | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'src/classes/com/sun/javafx/newt/x11/X11Window.java') diff --git a/src/classes/com/sun/javafx/newt/x11/X11Window.java b/src/classes/com/sun/javafx/newt/x11/X11Window.java index 311ba7dae..c77933f18 100755 --- a/src/classes/com/sun/javafx/newt/x11/X11Window.java +++ b/src/classes/com/sun/javafx/newt/x11/X11Window.java @@ -95,10 +95,10 @@ public class X11Window extends Window { if(this.fullscreen!=fullscreen) { int x,y,w,h; this.fullscreen=fullscreen; - if(this.fullscreen) { + if(fullscreen) { x = 0; y = 0; - w = getDisplayWidth0(getDisplayHandle(), getScreenIndex())/2; - h = getDisplayHeight0(getDisplayHandle(), getScreenIndex())/2; + w = screen.getWidth(); + h = screen.getHeight(); } else { x = nfs_x; y = nfs_y; @@ -111,14 +111,6 @@ public class X11Window extends Window { return true; } - public int getDisplayWidth() { - return getDisplayWidth0(getDisplayHandle(), getScreenIndex()); - } - - public int getDisplayHeight() { - return getDisplayHeight0(getDisplayHandle(), getScreenIndex()); - } - protected void dispatchMessages(int eventMask) { DispatchMessages(getDisplayHandle(), windowHandle, eventMask); } @@ -135,8 +127,6 @@ public class X11Window extends Window { private native void DispatchMessages(long display, long windowHandle, int eventMask); private native void setSize0(long display, long windowHandle, int width, int height, int decorationToggle, boolean isVisible); private native void setPosition0(long display, long windowHandle, int x, int y); - private native int getDisplayWidth0(long display, int scrn_idx); - private native int getDisplayHeight0(long display, int scrn_idx); private void sizeChanged(int newWidth, int newHeight) { width = newWidth; -- cgit v1.2.3