|
From: <ka...@us...> - 2011-08-29 21:31:30
|
Revision: 3626
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3626&view=rev
Author: kappa1
Date: 2011-08-29 21:31:23 +0000 (Mon, 29 Aug 2011)
Log Message:
-----------
Linux Display - create native Display window at the correct position on linux.
Modified Paths:
--------------
trunk/LWJGL/src/native/linux/opengl/org_lwjgl_opengl_Display.c
trunk/LWJGL/src/native/linux/opengles/org_lwjgl_opengl_Display.c
Modified: trunk/LWJGL/src/native/linux/opengl/org_lwjgl_opengl_Display.c
===================================================================
--- trunk/LWJGL/src/native/linux/opengl/org_lwjgl_opengl_Display.c 2011-08-29 13:34:17 UTC (rev 3625)
+++ trunk/LWJGL/src/native/linux/opengl/org_lwjgl_opengl_Display.c 2011-08-29 21:31:23 UTC (rev 3626)
@@ -334,15 +334,17 @@
// Use Motif decoration hint property and hope the window manager respects them
setDecorations(disp, win, 0);
}
- XSizeHints * size_hints = XAllocSizeHints();
- size_hints->flags = PMinSize | PMaxSize;
- size_hints->min_width = width;
- size_hints->max_width = width;
- size_hints->min_height = height;
- size_hints->max_height = height;
- XSetWMNormalHints(disp, win, size_hints);
+ XSizeHints * window_hints = XAllocSizeHints();
+ window_hints->flags = PPosition | PMinSize | PMaxSize;
+ window_hints->x = x;
+ window_hints->y = y;
+ window_hints->min_width = width;
+ window_hints->max_width = width;
+ window_hints->min_height = height;
+ window_hints->max_height = height;
+ XSetWMNormalHints(disp, win, window_hints);
updateWindowHints(env, disp, win);
- XFree(size_hints);
+ XFree(window_hints);
#define NUM_ATOMS 1
Atom protocol_atoms[NUM_ATOMS] = {XInternAtom(disp, "WM_DELETE_WINDOW", False)/*, XInternAtom(disp, "WM_TAKE_FOCUS", False)*/};
XSetWMProtocols(disp, win, protocol_atoms, NUM_ATOMS);
Modified: trunk/LWJGL/src/native/linux/opengles/org_lwjgl_opengl_Display.c
===================================================================
--- trunk/LWJGL/src/native/linux/opengles/org_lwjgl_opengl_Display.c 2011-08-29 13:34:17 UTC (rev 3625)
+++ trunk/LWJGL/src/native/linux/opengles/org_lwjgl_opengl_Display.c 2011-08-29 21:31:23 UTC (rev 3626)
@@ -328,15 +328,17 @@
// Use Motif decoration hint property and hope the window manager respects them
setDecorations(disp, win, 0);
}
- XSizeHints * size_hints = XAllocSizeHints();
- size_hints->flags = PMinSize | PMaxSize;
- size_hints->min_width = width;
- size_hints->max_width = width;
- size_hints->min_height = height;
- size_hints->max_height = height;
- XSetWMNormalHints(disp, win, size_hints);
+ XSizeHints * window_hints = XAllocSizeHints();
+ window_hints->flags = PPosition | PMinSize | PMaxSize;
+ window_hints->x = x;
+ window_hints->y = y;
+ window_hints->min_width = width;
+ window_hints->max_width = width;
+ window_hints->min_height = height;
+ window_hints->max_height = height;
+ XSetWMNormalHints(disp, win, window_hints);
updateWindowHints(env, disp, win);
- XFree(size_hints);
+ XFree(window_hints);
#define NUM_ATOMS 1
Atom protocol_atoms[NUM_ATOMS] = {XInternAtom(disp, "WM_DELETE_WINDOW", False)/*, XInternAtom(disp, "WM_TAKE_FOCUS", False)*/};
XSetWMProtocols(disp, win, protocol_atoms, NUM_ATOMS);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-10-13 22:05:23
|
Revision: 3671
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3671&view=rev
Author: matzon
Date: 2011-10-13 22:05:17 +0000 (Thu, 13 Oct 2011)
Log Message:
-----------
applied patch by xranby to remove warnings
Modified Paths:
--------------
trunk/LWJGL/src/native/linux/opengl/org_lwjgl_opengl_Display.c
trunk/LWJGL/src/native/linux/opengles/org_lwjgl_opengl_Display.c
Modified: trunk/LWJGL/src/native/linux/opengl/org_lwjgl_opengl_Display.c
===================================================================
--- trunk/LWJGL/src/native/linux/opengl/org_lwjgl_opengl_Display.c 2011-10-13 16:53:53 UTC (rev 3670)
+++ trunk/LWJGL/src/native/linux/opengl/org_lwjgl_opengl_Display.c 2011-10-13 22:05:17 UTC (rev 3671)
@@ -178,7 +178,7 @@
XChangeProperty(disp, window,
XInternAtom(disp, "_NET_WM_NAME", False),
XInternAtom(disp, "UTF8_STRING", False),
- 8, PropModeReplace, (const char *)(intptr_t)title,
+ 8, PropModeReplace, (const unsigned char *)(intptr_t)title,
len);
}
Modified: trunk/LWJGL/src/native/linux/opengles/org_lwjgl_opengl_Display.c
===================================================================
--- trunk/LWJGL/src/native/linux/opengles/org_lwjgl_opengl_Display.c 2011-10-13 16:53:53 UTC (rev 3670)
+++ trunk/LWJGL/src/native/linux/opengles/org_lwjgl_opengl_Display.c 2011-10-13 22:05:17 UTC (rev 3671)
@@ -175,7 +175,7 @@
XChangeProperty(disp, window,
XInternAtom(disp, "_NET_WM_NAME", False),
XInternAtom(disp, "UTF8_STRING", False),
- 8, PropModeReplace, (const char *)(intptr_t)title,
+ 8, PropModeReplace, (const unsigned char *)(intptr_t)title,
len);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ka...@us...> - 2011-10-26 20:24:29
|
Revision: 3688
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3688&view=rev
Author: kappa1
Date: 2011-10-26 20:24:22 +0000 (Wed, 26 Oct 2011)
Log Message:
-----------
Only set X window hints on the Linux native display window when not using Display.setParent()
Modified Paths:
--------------
trunk/LWJGL/src/native/linux/opengl/org_lwjgl_opengl_Display.c
trunk/LWJGL/src/native/linux/opengles/org_lwjgl_opengl_Display.c
Modified: trunk/LWJGL/src/native/linux/opengl/org_lwjgl_opengl_Display.c
===================================================================
--- trunk/LWJGL/src/native/linux/opengl/org_lwjgl_opengl_Display.c 2011-10-25 17:42:56 UTC (rev 3687)
+++ trunk/LWJGL/src/native/linux/opengl/org_lwjgl_opengl_Display.c 2011-10-26 20:24:22 UTC (rev 3688)
@@ -376,8 +376,10 @@
setDecorations(disp, win, 0);
}
- updateWindowBounds(disp, win, x, y, width, height, JNI_TRUE, resizable);
- updateWindowHints(env, disp, win);
+ if (RootWindow(disp, screen) == parent_handle) { // on set hints when Display.setParent isn't used
+ updateWindowBounds(disp, win, x, y, width, height, JNI_TRUE, resizable);
+ updateWindowHints(env, disp, win);
+ }
#define NUM_ATOMS 1
Atom protocol_atoms[NUM_ATOMS] = {XInternAtom(disp, "WM_DELETE_WINDOW", False)/*, XInternAtom(disp, "WM_TAKE_FOCUS", False)*/};
Modified: trunk/LWJGL/src/native/linux/opengles/org_lwjgl_opengl_Display.c
===================================================================
--- trunk/LWJGL/src/native/linux/opengles/org_lwjgl_opengl_Display.c 2011-10-25 17:42:56 UTC (rev 3687)
+++ trunk/LWJGL/src/native/linux/opengles/org_lwjgl_opengl_Display.c 2011-10-26 20:24:22 UTC (rev 3688)
@@ -370,8 +370,10 @@
setDecorations(disp, win, 0);
}
- updateWindowBounds(disp, win, x, y, width, height, JNI_TRUE, resizable);
- updateWindowHints(env, disp, win);
+ if (RootWindow(disp, screen) == parent_handle) { // on set hints when Display.setParent isn't used
+ updateWindowBounds(disp, win, x, y, width, height, JNI_TRUE, resizable);
+ updateWindowHints(env, disp, win);
+ }
#define NUM_ATOMS 1
Atom protocol_atoms[NUM_ATOMS] = {XInternAtom(disp, "WM_DELETE_WINDOW", False)/*, XInternAtom(disp, "WM_TAKE_FOCUS", False)*/};
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|