+void Openbox::addClient(Window window, OBClient *client)
+{
+ _clients[window] = client;
+}
+
+
+void Openbox::removeClient(Window window)
+{
+ ClientMap::iterator it = _clients.find(window);
+ if (it != _clients.end())
+ _clients.erase(it);
+}
+
+
+OBClient *Openbox::findClient(Window window)
+{
+ /*
+ NOTE: we dont use _clients[] to find the value because that will insert
+ a new null into the hash, which really sucks when we want to clean up the
+ hash at shutdown!
+ */
+ ClientMap::iterator it = _clients.find(window);
+ if (it != _clients.end())
+ return it->second;
+ else
+ return (OBClient*) 0;
+}
+