|
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.
|