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,
|
||||
_size.left + _size.right + _client->area().width(),
|
||||
_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
|
||||
}
|
||||
|
||||
|
|
|
@ -106,6 +106,12 @@ Openbox::~Openbox()
|
|||
{
|
||||
_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
|
||||
otk::OBDisplay::destroy();
|
||||
}
|
||||
|
|
|
@ -124,7 +124,7 @@ void OBXEventHandler::configureRequest(const XConfigureRequestEvent &e)
|
|||
|
||||
|
||||
// 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;
|
||||
XWMHints *wmhint;
|
||||
|
@ -177,7 +177,7 @@ static void manageWindow(int screen, Window window)
|
|||
}
|
||||
|
||||
// XXX: move this to the OBScreen or OBClient class!
|
||||
static void unmanageWindow(OBClient *client)
|
||||
void OBXEventHandler::unmanageWindow(OBClient *client)
|
||||
{
|
||||
OBFrame *frame = client->frame;
|
||||
|
||||
|
|
|
@ -13,6 +13,10 @@ extern "C" {
|
|||
|
||||
namespace ob {
|
||||
|
||||
// XXX: TEMPORARY!!
|
||||
class OBClient;
|
||||
|
||||
|
||||
//! Handles X events
|
||||
/*!
|
||||
There are 2 type of X events:<br>
|
||||
|
@ -142,6 +146,11 @@ public:
|
|||
@param e The XEvent to handle
|
||||
*/
|
||||
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