DocWindowFrame::DocWindowFrame( App& app, xcb_connection_t* conn, xcb_window_t parent, xcb_screen_t* screen, ClientWindow& client) : WindowFrame(app, conn, client) , mFrameWindow( conn, screen, parent, XCB_EVENT_MASK_EXPOSURE | XCB_EVENT_MASK_BUTTON_PRESS, 100 + client.getX() - 20, 100 + client.getY() - 20, client.getWidth() + kWindowWidthDelta, client.getHeight() + kWindowHeightDelta) { mWindowLabel = new Label(app, screen, mFrameWindow, app.getBlackPen(), &app.getSystemFont(), Label::kHAlignLeft, app.getColor(kColorGray), 5, 2, 100, 18, L""); mFrameParentWindow = screen->root; mGc = xcb_generate_id(app); uint32_t mask = XCB_GC_FOREGROUND; uint32_t values[] = { app.getColor(kColorGray) }; xcb_create_gc(app, mGc, mFrameWindow, mask, values); app.addWindowHandler(mFrameWindow, this); // Reparent last to make the client window topmost client.reparent(&mFrameWindow, kWindowPosLeft, kWindowPosTop); setTitle(L"Test title"); }