const long OBFrame::event_mask;
OBFrame::OBFrame(OBClient *client, otk::Style *style)
const long OBFrame::event_mask;
OBFrame::OBFrame(OBClient *client, otk::Style *style)
- : otk::OtkWidget(Openbox::instance, style, Horizontal, 0, 1,
- CWOverrideRedirect),
+ : otk::OtkWidget(Openbox::instance, style, Horizontal, 0, 1, true),
int width; // the width of the client and its border
int bwidth; // width to make borders
int cbwidth; // width of the inner client border
int width; // the width of the client and its border
int bwidth; // width to make borders
int cbwidth; // width of the inner client border
// set the label size
_label.setGeometry(0, bevel, width, _style->getFont()->height());
// set the buttons sizes
// set the label size
_label.setGeometry(0, bevel, width, _style->getFont()->height());
// set the buttons sizes
- _button_iconify.setGeometry(0, bevel + 1,
- _label.height() - 2,
- _label.height() - 2);
+ _button_iconify.setGeometry(0, bevel + 1, butsize, butsize);
- _button_stick.setGeometry(0, bevel + 1,
- _label.height() - 2,
- _label.height() - 2);
+ _button_stick.setGeometry(0, bevel + 1, butsize, butsize);
- _button_close.setGeometry(0, bevel + 1,
- _label.height() - 2,
- _label.height() - 2);
+ _button_close.setGeometry(0, bevel + 1, butsize, butsize);
// the size of the label. this ASSUMES the layout has only buttons other
// that the ONE LABEL!!
// adds an extra sep so that there's a space on either side of the
// titlebar.. note: x = sep, below.
int lwidth = width - sep * 2 -
// the size of the label. this ASSUMES the layout has only buttons other
// that the ONE LABEL!!
// adds an extra sep so that there's a space on either side of the
// titlebar.. note: x = sep, below.
int lwidth = width - sep * 2 -
// quick sanity check for really small windows. if this is needed, its
// obviously not going to be displayed right...
// XXX: maybe we should make this look better somehow? constraints?
// quick sanity check for really small windows. if this is needed, its
// obviously not going to be displayed right...
// XXX: maybe we should make this look better somehow? constraints?
case 'I':
_button_iconify.move(x, _button_iconify.rect().y());
x += _button_iconify.width();
break;
case 'I':
_button_iconify.move(x, _button_iconify.rect().y());
x += _button_iconify.width();
break;
case 'M':
_button_max.move(x, _button_max.rect().y());
x += _button_max.width();
break;
case 'M':
_button_max.move(x, _button_max.rect().y());
x += _button_max.width();
break;
case 'S':
_button_stick.move(x, _button_stick.rect().y());
x += _button_stick.width();
break;
case 'S':
_button_stick.move(x, _button_stick.rect().y());
x += _button_stick.width();
break;
case 'C':
_button_close.move(x, _button_close.rect().y());
x += _button_close.width();
case 'C':
_button_close.move(x, _button_close.rect().y());
x += _button_close.width();
- XShapeCombineMask(otk::OBDisplay::display, window(), ShapeBounding,
+ XShapeCombineMask(otk::OBDisplay::display, _window, ShapeBounding,
- XShapeCombineShape(otk::OBDisplay::display, window(), ShapeBounding,
+ XShapeCombineShape(otk::OBDisplay::display, _window, ShapeBounding,