Added window title bars to linux
This commit is contained in:
parent
5ea14c3919
commit
30e1e4459d
|
@ -234,15 +234,13 @@ int getDisplayModes(Display *disp, int screen, int *num_modes, XF86VidModeModeIn
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
JNIEXPORT jboolean JNICALL Java_org_lwjgl_Display_nCreate(JNIEnv * env, jclass clazz, jint width, jint height, jint bpp, jint freq, jint alpha_bits, jint depth_bits, jint stencil_bits, jboolean fullscreen) {
|
JNIEXPORT jboolean JNICALL Java_org_lwjgl_Display_nCreate(JNIEnv * env, jclass clazz, jint width, jint height, jint bpp, jint freq, jint alpha_bits, jint depth_bits, jint stencil_bits, jboolean fullscreen, jstring title) {
|
||||||
Window root_win;
|
Window root_win;
|
||||||
XSetWindowAttributes attribs;
|
XSetWindowAttributes attribs;
|
||||||
Colormap cmap;
|
Colormap cmap;
|
||||||
int attribmask;
|
int attribmask;
|
||||||
int num_modes, i;
|
int num_modes, i;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
win_width = width;
|
win_width = width;
|
||||||
win_height = height;
|
win_height = height;
|
||||||
current_fullscreen = fullscreen;
|
current_fullscreen = fullscreen;
|
||||||
|
@ -291,6 +289,9 @@ JNIEXPORT jboolean JNICALL Java_org_lwjgl_Display_nCreate(JNIEnv * env, jclass c
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
printf("Created window\n");
|
printf("Created window\n");
|
||||||
#endif
|
#endif
|
||||||
|
const char * title_str = env->GetStringUTFChars(title, NULL);
|
||||||
|
XStoreName(disp, win, title_str);
|
||||||
|
env->ReleaseStringUTFChars(title, title_str);
|
||||||
XMapRaised(disp, win);
|
XMapRaised(disp, win);
|
||||||
waitMapped(disp, win);
|
waitMapped(disp, win);
|
||||||
if (fullscreen) {
|
if (fullscreen) {
|
||||||
|
|
Loading…
Reference in New Issue