void XWindow::openWindow(const Pnt2f& ScreenPosition, const Vec2f& Size, const std::string& WindowName) { int argc(1); char **argv = new char*[1]; (*argv)= "Bla"; XSetStandardProperties(this->getDisplay(), this->getWindow(), WindowName.c_str(), WindowName.c_str(), None, argv, argc, NULL); attachWindow(); this->init(); XMapWindow(this->getDisplay(), this->getWindow()); XEvent event; XIfEvent(this->getDisplay(), &event, wait_for_map_notify, (char *)(this->getWindow())); produceWindowOpened(); this->activate(); setPosition(ScreenPosition); setSize(Vec2us(Size[0], Size[1])); //Set things up to capture the delete window event Atom wm_delete_window=XInternAtom(this->getDisplay(), "WM_DELETE_WINDOW", False); XSetWMProtocols(this->getDisplay(), this->getWindow(), &wm_delete_window, 1); Atom wm_protocols=XInternAtom(this->getDisplay(), "WM_PROTOCOLS", False); }
void InternalWindow::open(void) { produceWindowOpened(); }