aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2002-11-15 12:09:36 (GMT)
committerfluxgen <fluxgen>2002-11-15 12:09:36 (GMT)
commit79ad9df4de893b42df8e07197c6f75cf931e19b8 (patch)
tree977c9219e5791f4c0ad7981b8645fa0076333e6b
parent5f4aea396d35529b34af825e92486f4b07bcd162 (diff)
downloadfluxbox-79ad9df4de893b42df8e07197c6f75cf931e19b8.zip
fluxbox-79ad9df4de893b42df8e07197c6f75cf931e19b8.tar.bz2
cleaning
-rw-r--r--src/Clientmenu.cc12
-rw-r--r--src/Clientmenu.hh11
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 @@
38#include "Workspacemenu.hh" 38#include "Workspacemenu.hh"
39 39
40 40
41Clientmenu::Clientmenu(Workspace *ws) : Basemenu(ws->getScreen()), 41Clientmenu::Clientmenu(Workspace &ws) : Basemenu(ws.getScreen()),
42m_wkspc(ws) { 42m_wkspc(ws) {
43 setInternalMenu(); 43 setInternalMenu();
44} 44}
@@ -48,16 +48,16 @@ void Clientmenu::itemSelected(int button, unsigned int index) {
48 if (button > 2) 48 if (button > 2)
49 return; 49 return;
50 //get the window with index of the item we selected 50 //get the window with index of the item we selected
51 FluxboxWindow *win = m_wkspc->getWindow(index); 51 FluxboxWindow *win = m_wkspc.getWindow(index);
52 if (win) { 52 if (win) {
53 if (button == 1) { 53 if (button == 1) {
54 if (! m_wkspc->isCurrent()) 54 if (! m_wkspc.isCurrent())
55 m_wkspc->setCurrent(); 55 m_wkspc.setCurrent();
56 } else if (button == 2) { 56 } else if (button == 2) {
57 if (! m_wkspc->isCurrent()) 57 if (! m_wkspc.isCurrent())
58 win->deiconify(true, false); 58 win->deiconify(true, false);
59 } 59 }
60 m_wkspc->raiseWindow(win); 60 m_wkspc.raiseWindow(win);
61 win->setInputFocus(); 61 win->setInputFocus();
62 } 62 }
63 63
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 @@
22#ifndef CLIENTMENU_HH 22#ifndef CLIENTMENU_HH
23#define CLIENTMENU_HH 23#define CLIENTMENU_HH
24 24
25
26#include "Basemenu.hh" 25#include "Basemenu.hh"
27 26
28// forward declarations
29class Workspace; 27class Workspace;
30 28
31 29class Clientmenu: public Basemenu {
32class Clientmenu : public Basemenu {
33public: 30public:
34 Clientmenu(Workspace *wrksp); 31 explicit Clientmenu(Workspace &wrksp);
35 32
36protected: 33protected:
37 virtual void itemSelected(int button, unsigned int index); 34 virtual void itemSelected(int button, unsigned int index);
38 35
39private: 36private:
40 Workspace *m_wkspc; 37 Workspace &m_wkspc;
41}; 38};
42 39
43 40
44#endif // _CLIENTMENU_HH_ 41#endif // CLIENTMENU_HH
45 42