]> Dogcows Code - chaz/openbox/commitdiff
position the client inside the frame correctly.
authorDana Jansens <danakj@orodu.net>
Sun, 10 Nov 2002 04:26:36 +0000 (04:26 +0000)
committerDana Jansens <danakj@orodu.net>
Sun, 10 Nov 2002 04:26:36 +0000 (04:26 +0000)
unmanage all clients on shutdown

src/frame.cc
src/openbox.cc
src/xeventhandler.cc
src/xeventhandler.hh

index 9e4a8edb19199d828b85966f60c0086d1e63936b..601bbe3950fcc9eeec64dce3d1cca123597fc076 100644 (file)
@@ -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
 }
 
index c5a93eeb25003d278f6299958b15d9d597a297e6..757a6984235e328672863e66a7d74e2e8f93126a 100644 (file)
@@ -105,6 +105,12 @@ Openbox::Openbox(int argc, char **argv)
 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();
index bdebadd8f63417a6508a32b3f86d47e2d43ec3c7..ad7d7e27f22356c85aa6d462429aa5383f8f32cc 100644 (file)
@@ -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;
 
index 87afee3a406c8efe5b96f9b7075b1dbd6f12267c..e46ae1169f88a030a2f60717ba972b542dfa564e 100644 (file)
@@ -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*);
 };
 
 }
This page took 0.030355 seconds and 4 git commands to generate.