void makeDecoration(xcb_window_t cli){ //xcb_change_save_set(conn, cli, XCB_SET_MODE_INSERT); Window container = new Window(root); Window client = new Window(cli); client.xAdd = rc.style.client.xadd; client.yAdd = rc.style.client.yadd; client.right = rc.style.client.right; client.bottom = rc.style.client.bottom; client.widthAdd = rc.style.client.widthadd; client.heightAdd = rc.style.client.heightadd; //client.reparent(container, rc.style.client.xadd, rc.style.client.yadd); container.addDependent(client); getContainer[client.id] = container; getContainer[container.id] = container; getClient[container] = client; foreach(d; rc.style.subs){ switch(d.func){ case none: Window w = new Window(container); goto all; case drag: Dragable w = new Dragable(container); goto all; case close: Button w = new Button(container); goto all; case leftResize: Dragable w = new Dragable(container); goto all; case leftBottomResize: Dragable w = new Dragable(container); goto all; case bottomResize: Dragable w = new Dragable(container); goto all; case rightBottomResize: Dragable w = new Dragable(container); goto all; case rightResize: Dragable w = new Dragable(container); all: if(d.image) w.setBackground(d.image); w.left = d.left; w.top = d.top; w.right = d.right; w.bottom = d.bottom; w.xAdd = d.xadd; w.yAdd = d.yadd; w.widthAdd = d.widthadd; w.heightAdd = d.heightadd; container.addDependent(w); w.map(); getContainer[w.id] = container; default: break; } } container.map(); }