(uint32) xfw->handle, xfw->left, xfw->top, xfw->right, xfw->bottom,
xfw->width, xfw->height, event->xconfigure.send_event);
- if (app && ! event->xconfigure.send_event)
- xf_rail_adjust_position(xfi, window);
+ if (app && xfw->decorations)
+ {
+ xf_rail_adjust_position(xfi, window);
+ window->windowOffsetX = xfw->left;
+ window->windowOffsetY = xfw->top;
+ window->windowWidth = xfw->right - xfw->left;
+ window->windowHeight = xfw->bottom - xfw->top;
+ }
+ else
+ {
+ if (app && ! event->xconfigure.send_event)
+ xf_rail_adjust_position(xfi, window);
+ }
}
return True;
}
+int xf_MapWindow(Display* dis, Window wnd)
+{
+ XEvent xevent;
+
+ XMapWindow(dis, wnd);
+ do
+ {
+ XMaskEvent(dis, VisibilityChangeMask, &xevent);
+ }
+ while (xevent.type != VisibilityNotify);
+ return 0;
+}
+
xfWindow* xf_CreateDesktopWindow(xfInfo* xfi, char* name, int width, int height, boolean decorations)
{
xfWindow* window;
PropModeReplace, (uint8*) xf_icon_prop, ARRAY_SIZE(xf_icon_prop));
XSelectInput(xfi->display, window->handle, input_mask);
- XMapWindow(xfi->display, window->handle);
+ xf_MapWindow(xfi->display, window->handle);
}
XStoreName(xfi->display, window->handle, name);
XClassHint* class_hints;
int input_mask;
- window->decorations = false;
+ /* this window need decorations */
+ if (wnd->extendedStyle & WS_EX_APPWINDOW)
+ window->decorations = true;
+ else
+ window->decorations = false;
+
window->fullscreen = false;
window->window = wnd;
window->local_move.state = LMS_NOT_ACTIVE;
ColormapChangeMask | OwnerGrabButtonMask;
XSelectInput(xfi->display, window->handle, input_mask);
- XMapWindow(xfi->display, window->handle);
+ xf_MapWindow(xfi->display, window->handle);
memset(&gcv, 0, sizeof(gcv));
window->gc = XCreateGC(xfi->display, window->handle, GCGraphicsExposures, &gcv);
}
#ifdef WITH_XEXT
- XShapeCombineRectangles(xfi->display, window->handle, ShapeBounding, 0, 0, xrects, nrects, ShapeSet, 0);
+ if (window->decorations == false)
+ {
+ XShapeCombineRectangles(xfi->display, window->handle, ShapeBounding, 0, 0, xrects,
+ nrects, ShapeSet, 0);
+ }
#endif
xfree(xrects);