if (!child && !undecorated) {
Int32Pointer x = bridge.createInt32Pointer(1, false);
Int32Pointer y = bridge.createInt32Pointer(1, false);
Int32Pointer w = bridge.createInt32Pointer(1, false);
Int32Pointer h = bridge.createInt32Pointer(1, false);
CLongPointer root = bridge.createCLongPointer(1, false);
Int32Pointer border = bridge.createInt32Pointer(1, false);
Int32Pointer depth = bridge.createInt32Pointer(1, false);
x11.XGetGeometry(display, windowID, root, x, y, w, h, border, depth);
long rootID = root.get(0);
long frameID = getFrameID(windowID, rootID);
if (frameID != 0 && frameID != rootID && parentID == rootID) {
int width = w.get(0), height = h.get(0);
CLongPointer childWindow = bridge.createCLongPointer(1, false);
//get window coordinates relative to WM's frame
x11.XTranslateCoordinates(display, getParentID(), frameID,
x.get(0), y.get(0), x, y, childWindow);
insets.top = y.get(0);