From 79ad9df4de893b42df8e07197c6f75cf931e19b8 Mon Sep 17 00:00:00 2001 From: fluxgen Date: Fri, 15 Nov 2002 12:09:36 +0000 Subject: cleaning --- src/Clientmenu.cc | 12 ++++++------ src/Clientmenu.hh | 11 ++++------- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/src/Clientmenu.cc b/src/Clientmenu.cc index c7fe7a9..e63aadc 100644 --- a/src/Clientmenu.cc +++ b/src/Clientmenu.cc @@ -38,7 +38,7 @@ #include "Workspacemenu.hh" -Clientmenu::Clientmenu(Workspace *ws) : Basemenu(ws->getScreen()), +Clientmenu::Clientmenu(Workspace &ws) : Basemenu(ws.getScreen()), m_wkspc(ws) { setInternalMenu(); } @@ -48,16 +48,16 @@ void Clientmenu::itemSelected(int button, unsigned int index) { if (button > 2) return; //get the window with index of the item we selected - FluxboxWindow *win = m_wkspc->getWindow(index); + FluxboxWindow *win = m_wkspc.getWindow(index); if (win) { if (button == 1) { - if (! m_wkspc->isCurrent()) - m_wkspc->setCurrent(); + if (! m_wkspc.isCurrent()) + m_wkspc.setCurrent(); } else if (button == 2) { - if (! m_wkspc->isCurrent()) + if (! m_wkspc.isCurrent()) win->deiconify(true, false); } - m_wkspc->raiseWindow(win); + m_wkspc.raiseWindow(win); win->setInputFocus(); } diff --git a/src/Clientmenu.hh b/src/Clientmenu.hh index f49822a..77c4d6a 100644 --- a/src/Clientmenu.hh +++ b/src/Clientmenu.hh @@ -22,24 +22,21 @@ #ifndef CLIENTMENU_HH #define CLIENTMENU_HH - #include "Basemenu.hh" -// forward declarations class Workspace; - -class Clientmenu : public Basemenu { +class Clientmenu: public Basemenu { public: - Clientmenu(Workspace *wrksp); + explicit Clientmenu(Workspace &wrksp); protected: virtual void itemSelected(int button, unsigned int index); private: - Workspace *m_wkspc; + Workspace &m_wkspc; }; -#endif // _CLIENTMENU_HH_ +#endif // CLIENTMENU_HH -- cgit v0.11.2