added minimize button, disabling close button since we have no mechnism to notify the user of a close
This commit is contained in:
parent
247be0d0d2
commit
f05f16cc27
|
@ -305,7 +305,7 @@ JNIEXPORT jboolean JNICALL Java_org_lwjgl_Display_nCreate
|
||||||
windowflags = WS_POPUP | WS_VISIBLE;
|
windowflags = WS_POPUP | WS_VISIBLE;
|
||||||
} else {
|
} else {
|
||||||
exstyle = 0;
|
exstyle = 0;
|
||||||
windowflags = WS_OVERLAPPED | WS_BORDER | WS_CAPTION | WS_VISIBLE;
|
windowflags = WS_OVERLAPPED | WS_BORDER | WS_CAPTION | WS_VISIBLE | WS_MINIMIZEBOX | WS_SYSMENU;
|
||||||
}
|
}
|
||||||
isFullscreen = fullscreen == JNI_TRUE;
|
isFullscreen = fullscreen == JNI_TRUE;
|
||||||
|
|
||||||
|
@ -342,6 +342,10 @@ JNIEXPORT jboolean JNICALL Java_org_lwjgl_Display_nCreate
|
||||||
NULL);
|
NULL);
|
||||||
env->ReleaseStringUTFChars(title, titleString);
|
env->ReleaseStringUTFChars(title, titleString);
|
||||||
|
|
||||||
|
// Disable close button
|
||||||
|
HMENU SysMen = GetSystemMenu(hwnd, false);
|
||||||
|
EnableMenuItem(SysMen, SC_CLOSE, MF_BYCOMMAND | MF_DISABLED);
|
||||||
|
|
||||||
// And we never look at windowClass again...
|
// And we never look at windowClass again...
|
||||||
|
|
||||||
ShowWindow(hwnd, SW_SHOWNORMAL);
|
ShowWindow(hwnd, SW_SHOWNORMAL);
|
||||||
|
|
Loading…
Reference in New Issue