+
+ if (_decorations & OBClient::Decor_Titlebar) {
+ XMoveResizeWindow(otk::OBDisplay::display, _titlebar,
+ _titlebar_area.x(), _titlebar_area.y(),
+ _titlebar_area.width(), _titlebar_area.height());
+ XMoveResizeWindow(otk::OBDisplay::display, _label,
+ _label_area.x(), _label_area.y(),
+ _label_area.width(), _label_area.height());
+ if (_decorations & OBClient::Decor_Iconify)
+ XMoveResizeWindow(otk::OBDisplay::display, _button_iconify,
+ _button_iconify_area.x(), _button_iconify_area.y(),
+ _button_iconify_area.width(),
+ _button_iconify_area.height());
+ if (_decorations & OBClient::Decor_Maximize)
+ XMoveResizeWindow(otk::OBDisplay::display, _button_max,
+ _button_max_area.x(), _button_max_area.y(),
+ _button_max_area.width(),
+ _button_max_area.height());
+ if (_decorations & OBClient::Decor_Sticky)
+ XMoveResizeWindow(otk::OBDisplay::display, _button_stick,
+ _button_stick_area.x(), _button_stick_area.y(),
+ _button_stick_area.width(),
+ _button_stick_area.height());
+ if (_decorations & OBClient::Decor_Close)
+ XMoveResizeWindow(otk::OBDisplay::display, _button_close,
+ _button_close_area.x(), _button_close_area.y(),
+ _button_close_area.width(),
+ _button_close_area.height());
+ }
+
+ if (_decorations & OBClient::Decor_Handle) {
+ XMoveResizeWindow(otk::OBDisplay::display, _handle,
+ _handle_area.x(), _handle_area.y(),
+ _handle_area.width(), _handle_area.height());
+ XMoveResizeWindow(otk::OBDisplay::display, _grip_left,
+ _grip_left_area.x(), _grip_left_area.y(),
+ _grip_left_area.width(), _grip_left_area.height());
+ XMoveResizeWindow(otk::OBDisplay::display, _grip_right,
+ _grip_right_area.x(), _grip_right_area.y(),
+ _grip_right_area.width(), _grip_right_area.height());
+ }
+
+ // map/unmap all the windows
+ if (_decorations & OBClient::Decor_Titlebar) {
+ XMapWindow(otk::OBDisplay::display, _label);
+ if (_decorations & OBClient::Decor_Iconify)
+ XMapWindow(otk::OBDisplay::display, _button_iconify);
+ else
+ XUnmapWindow(otk::OBDisplay::display, _button_iconify);
+ if (_decorations & OBClient::Decor_Maximize)
+ XMapWindow(otk::OBDisplay::display, _button_max);
+ else
+ XUnmapWindow(otk::OBDisplay::display, _button_max);
+ if (_decorations & OBClient::Decor_Sticky)
+ XMapWindow(otk::OBDisplay::display, _button_stick);
+ else
+ XUnmapWindow(otk::OBDisplay::display, _button_stick);
+ if (_decorations & OBClient::Decor_Close)
+ XMapWindow(otk::OBDisplay::display, _button_close);
+ else
+ XUnmapWindow(otk::OBDisplay::display, _button_close);
+ XMapWindow(otk::OBDisplay::display, _titlebar);
+ } else {
+ XUnmapWindow(otk::OBDisplay::display, _titlebar);
+ XUnmapWindow(otk::OBDisplay::display, _label);
+ XUnmapWindow(otk::OBDisplay::display, _button_iconify);
+ XUnmapWindow(otk::OBDisplay::display, _button_max);
+ XUnmapWindow(otk::OBDisplay::display, _button_stick);
+ XUnmapWindow(otk::OBDisplay::display, _button_close);
+ }
+
+ if (_decorations & OBClient::Decor_Handle) {
+ XMapWindow(otk::OBDisplay::display, _grip_left);
+ XMapWindow(otk::OBDisplay::display, _grip_right);
+ XMapWindow(otk::OBDisplay::display, _handle);
+ } else {
+ XUnmapWindow(otk::OBDisplay::display, _handle);
+ XUnmapWindow(otk::OBDisplay::display, _grip_left);
+ XUnmapWindow(otk::OBDisplay::display, _grip_right);
+ }
+