some more things to happen when changing styles on a frame
This commit is contained in:
parent
f257e4b079
commit
209b7f212d
1 changed files with 7 additions and 3 deletions
10
src/frame.cc
10
src/frame.cc
|
@ -52,9 +52,14 @@ void OBFrame::loadStyle(const otk::Style *style)
|
||||||
_size.left = _size.top = _size.bottom = _size.right = 2;
|
_size.left = _size.top = _size.bottom = _size.right = 2;
|
||||||
|
|
||||||
if (replace) {
|
if (replace) {
|
||||||
|
resize();
|
||||||
|
|
||||||
XSetWindowBorderWidth(otk::OBDisplay::display, _window,
|
XSetWindowBorderWidth(otk::OBDisplay::display, _window,
|
||||||
_style->getBorderWidth());
|
_style->getBorderWidth());
|
||||||
|
|
||||||
|
XMoveWindow(otk::OBDisplay::display, _client->window(),
|
||||||
|
_size.left, _size.top);
|
||||||
|
|
||||||
// XXX: make everything redraw
|
// XXX: make everything redraw
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -65,8 +70,6 @@ void OBFrame::resize()
|
||||||
XResizeWindow(otk::OBDisplay::display, _window,
|
XResizeWindow(otk::OBDisplay::display, _window,
|
||||||
_size.left + _size.right + _client->area().width(),
|
_size.left + _size.right + _client->area().width(),
|
||||||
_size.top + _size.bottom + _client->area().height());
|
_size.top + _size.bottom + _client->area().height());
|
||||||
XMoveWindow(otk::OBDisplay::display, _client->window(),
|
|
||||||
_size.left, _size.top);
|
|
||||||
// XXX: more is gunna have to happen here
|
// XXX: more is gunna have to happen here
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -88,7 +91,8 @@ void OBFrame::grabClient()
|
||||||
// reparent the client to the frame
|
// reparent the client to the frame
|
||||||
XSelectInput(otk::OBDisplay::display, _client->window(),
|
XSelectInput(otk::OBDisplay::display, _client->window(),
|
||||||
OBClient::event_mask & ~StructureNotifyMask);
|
OBClient::event_mask & ~StructureNotifyMask);
|
||||||
XReparentWindow(otk::OBDisplay::display, _client->window(), _window, 0, 0);
|
XReparentWindow(otk::OBDisplay::display, _client->window(), _window,
|
||||||
|
_size.left, _size.top);
|
||||||
XSelectInput(otk::OBDisplay::display, _client->window(),
|
XSelectInput(otk::OBDisplay::display, _client->window(),
|
||||||
OBClient::event_mask);
|
OBClient::event_mask);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue