adding WS_MAXIMIZEBOX patch for windows and bumping native version

This commit is contained in:
Brian Matzon 2012-01-11 20:46:57 +00:00
parent b16a1e182e
commit 367b5fb176
2 changed files with 6 additions and 3 deletions

View File

@ -46,7 +46,7 @@ import org.lwjgl.opengl.Display;
* $Id$
*/
final class WindowsSysImplementation extends DefaultSysImplementation {
private static final int JNI_VERSION = 23;
private static final int JNI_VERSION = 24;
static {
Sys.initialize();

View File

@ -143,6 +143,7 @@ final class WindowsDisplay implements DisplayImplementation {
private static final int GWL_EXSTYLE = -20;
private static final int WS_THICKFRAME = 0x00040000;
private static final int WS_MAXIMIZEBOX = 0x00010000;
private static final int HTCLIENT = 0x01;
@ -858,6 +859,8 @@ final class WindowsDisplay implements DisplayImplementation {
switch ((int)wParam) {
case SIZE_RESTORED:
case SIZE_MAXIMIZED:
resized = true;
updateWidthAndHeight();
setMinimized(false);
break;
case SIZE_MINIMIZED:
@ -1011,9 +1014,9 @@ final class WindowsDisplay implements DisplayImplementation {
// update frame style
if(resizable) {
setWindowLongPtr(hwnd, GWL_STYLE, style |= WS_THICKFRAME);
setWindowLongPtr(hwnd, GWL_STYLE, style |= (WS_THICKFRAME | WS_MAXIMIZEBOX));
} else {
setWindowLongPtr(hwnd, GWL_STYLE, style &= ~WS_THICKFRAME);
setWindowLongPtr(hwnd, GWL_STYLE, style &= ~(WS_THICKFRAME | WS_MAXIMIZEBOX));
}
// from the existing client rect, determine the new window rect