adding WS_MAXIMIZEBOX patch for windows and bumping native version
This commit is contained in:
parent
b16a1e182e
commit
367b5fb176
|
@ -46,7 +46,7 @@ import org.lwjgl.opengl.Display;
|
||||||
* $Id$
|
* $Id$
|
||||||
*/
|
*/
|
||||||
final class WindowsSysImplementation extends DefaultSysImplementation {
|
final class WindowsSysImplementation extends DefaultSysImplementation {
|
||||||
private static final int JNI_VERSION = 23;
|
private static final int JNI_VERSION = 24;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
Sys.initialize();
|
Sys.initialize();
|
||||||
|
|
|
@ -143,6 +143,7 @@ final class WindowsDisplay implements DisplayImplementation {
|
||||||
private static final int GWL_EXSTYLE = -20;
|
private static final int GWL_EXSTYLE = -20;
|
||||||
|
|
||||||
private static final int WS_THICKFRAME = 0x00040000;
|
private static final int WS_THICKFRAME = 0x00040000;
|
||||||
|
private static final int WS_MAXIMIZEBOX = 0x00010000;
|
||||||
|
|
||||||
private static final int HTCLIENT = 0x01;
|
private static final int HTCLIENT = 0x01;
|
||||||
|
|
||||||
|
@ -858,6 +859,8 @@ final class WindowsDisplay implements DisplayImplementation {
|
||||||
switch ((int)wParam) {
|
switch ((int)wParam) {
|
||||||
case SIZE_RESTORED:
|
case SIZE_RESTORED:
|
||||||
case SIZE_MAXIMIZED:
|
case SIZE_MAXIMIZED:
|
||||||
|
resized = true;
|
||||||
|
updateWidthAndHeight();
|
||||||
setMinimized(false);
|
setMinimized(false);
|
||||||
break;
|
break;
|
||||||
case SIZE_MINIMIZED:
|
case SIZE_MINIMIZED:
|
||||||
|
@ -1011,9 +1014,9 @@ final class WindowsDisplay implements DisplayImplementation {
|
||||||
|
|
||||||
// update frame style
|
// update frame style
|
||||||
if(resizable) {
|
if(resizable) {
|
||||||
setWindowLongPtr(hwnd, GWL_STYLE, style |= WS_THICKFRAME);
|
setWindowLongPtr(hwnd, GWL_STYLE, style |= (WS_THICKFRAME | WS_MAXIMIZEBOX));
|
||||||
} else {
|
} 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
|
// from the existing client rect, determine the new window rect
|
||||||
|
|
Loading…
Reference in New Issue