From baeacf877fd4d9136a2cbc86b4c8f679727fd4b4 Mon Sep 17 00:00:00 2001 From: fluxgen Date: Sun, 14 Dec 2003 01:10:39 +0000 Subject: no need to have Workspace instance in ClientMenuItem since it already hold the window which has workspace num --- src/Workspace.cc | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/src/Workspace.cc b/src/Workspace.cc index 069c3e2..d2ebf60 100644 --- a/src/Workspace.cc +++ b/src/Workspace.cc @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Workspace.cc,v 1.86 2003/12/10 23:08:03 fluxgen Exp $ +// $Id: Workspace.cc,v 1.87 2003/12/14 01:10:39 fluxgen Exp $ #include "Workspace.hh" @@ -35,7 +35,6 @@ #include "MenuItem.hh" #include "FbTk/StringUtil.hh" -#include "FbTk/SimpleCommand.hh" // use GNU extensions #ifndef _GNU_SOURCE @@ -75,24 +74,17 @@ int countTransients(const WinClient &client) { class ClientMenuItem:public FbTk::MenuItem { public: - ClientMenuItem(WinClient &client, Workspace &space): + ClientMenuItem(WinClient &client): FbTk::MenuItem(client.title().c_str(), client.fbwindow() ? &client.fbwindow()->menu() : 0), - m_client(client), m_space(space) { + m_client(client) { } void click(int button, int time) { if (m_client.fbwindow() == 0) return; FluxboxWindow &win = *m_client.fbwindow(); - BScreen &scr = win.screen(); - // determine workspace change - for (size_t i=0; igetMenuLayer())), m_layermanager(layermanager), m_name(name), - m_id(i) { + m_id(id) { m_cascade_x = new int[scrn.numHeads() + 1]; @@ -420,7 +411,7 @@ void Workspace::updateClientmenu() { FluxboxWindow::ClientList::iterator client_it_end = (*win_it)->clientList().end(); for (; client_it != client_it_end; ++client_it) - m_clientmenu.insert(new ClientMenuItem(*(*client_it), *this)); + m_clientmenu.insert(new ClientMenuItem(*(*client_it))); } m_clientmenu.update(); -- cgit v0.11.2