+ XSetWindowAttributes attrib;
+ unsigned long mask;
+ const otk::ScreenInfo *info = otk::display->screenInfo(client->screen());
+
+ // create all of the decor windows (except title bar buttons)
+ mask = CWOverrideRedirect | CWEventMask;
+ attrib.event_mask = Frame::event_mask;
+ attrib.override_redirect = true;
+ _frame = createWindow(info, info->rootWindow(), mask, &attrib);
+
+ mask = 0;
+ _plate = createWindow(info, _frame, mask, &attrib);
+ mask = CWEventMask;
+ attrib.event_mask = (ButtonPressMask | ButtonReleaseMask | ButtonMotionMask |
+ ExposureMask);
+ _title = createWindow(info, _frame, mask, &attrib);
+ _label = createWindow(info, _title, mask, &attrib);
+ _handle = createWindow(info, _frame, mask, &attrib);
+ mask |= CWCursor;
+ attrib.cursor = openbox->cursors().ll_angle;
+ _lgrip = createWindow(info, _handle, mask, &attrib);
+ attrib.cursor = openbox->cursors().lr_angle;
+ _rgrip = createWindow(info, _handle, mask, &attrib);
+
+ // the other stuff is shown based on decor settings
+ XMapWindow(**otk::display, _plate);
+ XMapWindow(**otk::display, _lgrip);
+ XMapWindow(**otk::display, _rgrip);
+ XMapWindow(**otk::display, _label);
+
+ applyStyle(*otk::RenderStyle::style(_client->screen()));
+
+ // XXX load buttons
+ _numbuttons = 0;
+ _buttons = new Window[0];
+ _buttons_sur = new otk::Surface*[0];
+ _titleorder = new int[1];
+ _titleorder[0] = -1;
+
+ // register all of the windows with the event dispatcher
+ Window *w = allWindows();
+ for (unsigned int i = 0; w[i]; ++i)
+ openbox->registerHandler(w[i], this);
+ delete [] w;