all repos — openbox @ f257e4b0792e07e11a56828d4769f618e35df105

openbox fork - make it a bit more like ryudo

position the client inside the frame correctly.
unmanage all clients on shutdown
Dana Jansens danakj@orodu.net
commit

f257e4b0792e07e11a56828d4769f618e35df105

parent

b9cac2146e1dfe54cb6c0ce647d6c7d58d17de54

4 files changed, 19 insertions(+), 2 deletions(-)

jump to
M src/frame.ccsrc/frame.cc

@@ -65,6 +65,8 @@ {

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 }
M src/openbox.ccsrc/openbox.cc

@@ -105,6 +105,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();
M src/xeventhandler.ccsrc/xeventhandler.cc

@@ -124,7 +124,7 @@ }

// 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 @@ // XXX: handle any requested states such as shaded/maximized

} // XXX: move this to the OBScreen or OBClient class! -static void unmanageWindow(OBClient *client) +void OBXEventHandler::unmanageWindow(OBClient *client) { OBFrame *frame = client->frame;
M src/xeventhandler.hhsrc/xeventhandler.hh

@@ -13,6 +13,10 @@ }

namespace ob { +// XXX: TEMPORARY!! +class OBClient; + + //! Handles X events /*! There are 2 type of X events:<br>

@@ -142,6 +146,11 @@ /*!

@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*); }; }