position the client inside the frame correctly.
unmanage all clients on shutdown
This commit is contained in:
parent
b9cac2146e
commit
f257e4b079
4 changed files with 19 additions and 2 deletions
|
@ -65,6 +65,8 @@ 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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -105,6 +105,12 @@ Openbox::Openbox(int argc, char **argv)
|
||||||
Openbox::~Openbox()
|
Openbox::~Openbox()
|
||||||
{
|
{
|
||||||
_state = State_Exiting; // time to kill everything
|
_state = State_Exiting; // time to kill everything
|
||||||
|
|
||||||
|
// unmanage all windows
|
||||||
|
ClientMap::iterator it, end;
|
||||||
|
for (it = _clients.begin(), end = _clients.end(); it != end; ++it) {
|
||||||
|
_xeventhandler.unmanageWindow(it->second);
|
||||||
|
}
|
||||||
|
|
||||||
// close the X display
|
// close the X display
|
||||||
otk::OBDisplay::destroy();
|
otk::OBDisplay::destroy();
|
||||||
|
|
|
@ -124,7 +124,7 @@ void OBXEventHandler::configureRequest(const XConfigureRequestEvent &e)
|
||||||
|
|
||||||
|
|
||||||
// XXX: put this into the OBScreen or OBClient class!
|
// XXX: put this into the OBScreen or OBClient class!
|
||||||
static void manageWindow(int screen, Window window)
|
void OBXEventHandler::manageWindow(int screen, Window window)
|
||||||
{
|
{
|
||||||
OBClient *client = 0;
|
OBClient *client = 0;
|
||||||
XWMHints *wmhint;
|
XWMHints *wmhint;
|
||||||
|
@ -177,7 +177,7 @@ static void manageWindow(int screen, Window window)
|
||||||
}
|
}
|
||||||
|
|
||||||
// XXX: move this to the OBScreen or OBClient class!
|
// XXX: move this to the OBScreen or OBClient class!
|
||||||
static void unmanageWindow(OBClient *client)
|
void OBXEventHandler::unmanageWindow(OBClient *client)
|
||||||
{
|
{
|
||||||
OBFrame *frame = client->frame;
|
OBFrame *frame = client->frame;
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,10 @@ extern "C" {
|
||||||
|
|
||||||
namespace ob {
|
namespace ob {
|
||||||
|
|
||||||
|
// XXX: TEMPORARY!!
|
||||||
|
class OBClient;
|
||||||
|
|
||||||
|
|
||||||
//! Handles X events
|
//! Handles X events
|
||||||
/*!
|
/*!
|
||||||
There are 2 type of X events:<br>
|
There are 2 type of X events:<br>
|
||||||
|
@ -142,6 +146,11 @@ public:
|
||||||
@param e The XEvent to handle
|
@param e The XEvent to handle
|
||||||
*/
|
*/
|
||||||
void handle(const XEvent &e);
|
void handle(const XEvent &e);
|
||||||
|
|
||||||
|
|
||||||
|
// XXX: TEMPORARY MOVE TO A SCREEN CLASS OR SOMETHING
|
||||||
|
void manageWindow(int, Window);
|
||||||
|
void unmanageWindow(OBClient*);
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue