- XConfigureWindow(dpy, cre->window, cre->value_mask, &(XWindowChanges){
- .x = cre->x,
- .y = cre->y,
- .width = cre->width,
- .height = cre->height,
- });
-
- /* This seems necessary for, but causes flicker
- * there could be a better way to do this */
- if ((win = win_find(dpy,xe->xmaprequest.window,0)))
- sys_move(win, win->x, win->y, win->w, win->h);
+ if ((win = win_find(dpy,xe->xmaprequest.window,1))) {
+ XSendEvent(dpy, cre->window, False, StructureNotifyMask, &(XEvent){
+ .xconfigure.type = ConfigureNotify,
+ .xconfigure.display = win->sys->dpy,
+ .xconfigure.event = win->sys->xid,
+ .xconfigure.window = win->sys->xid,
+ .xconfigure.x = win->x,
+ .xconfigure.y = win->y,
+ .xconfigure.width = win->w,
+ .xconfigure.height = win->h,
+ });
+ XSync(win->sys->dpy, False);
+ }