Only set X window hints on the Linux native display window when not using Display.setParent()

This commit is contained in:
kappa1 2011-10-26 20:24:22 +00:00
parent 84cd3b562b
commit 97075a7228
2 changed files with 8 additions and 4 deletions

View File

@ -376,8 +376,10 @@ static Window createWindow(JNIEnv* env, Display *disp, int screen, jint window_m
setDecorations(disp, win, 0);
}
updateWindowBounds(disp, win, x, y, width, height, JNI_TRUE, resizable);
updateWindowHints(env, disp, win);
if (RootWindow(disp, screen) == parent_handle) { // on set hints when Display.setParent isn't used
updateWindowBounds(disp, win, x, y, width, height, JNI_TRUE, resizable);
updateWindowHints(env, disp, win);
}
#define NUM_ATOMS 1
Atom protocol_atoms[NUM_ATOMS] = {XInternAtom(disp, "WM_DELETE_WINDOW", False)/*, XInternAtom(disp, "WM_TAKE_FOCUS", False)*/};

View File

@ -370,8 +370,10 @@ static Window createWindow(JNIEnv* env, Display *disp, int screen, jint window_m
setDecorations(disp, win, 0);
}
updateWindowBounds(disp, win, x, y, width, height, JNI_TRUE, resizable);
updateWindowHints(env, disp, win);
if (RootWindow(disp, screen) == parent_handle) { // on set hints when Display.setParent isn't used
updateWindowBounds(disp, win, x, y, width, height, JNI_TRUE, resizable);
updateWindowHints(env, disp, win);
}
#define NUM_ATOMS 1
Atom protocol_atoms[NUM_ATOMS] = {XInternAtom(disp, "WM_DELETE_WINDOW", False)/*, XInternAtom(disp, "WM_TAKE_FOCUS", False)*/};