cleaning
This commit is contained in:
parent
5f4aea396d
commit
79ad9df4de
2 changed files with 10 additions and 13 deletions
|
@ -38,7 +38,7 @@
|
||||||
#include "Workspacemenu.hh"
|
#include "Workspacemenu.hh"
|
||||||
|
|
||||||
|
|
||||||
Clientmenu::Clientmenu(Workspace *ws) : Basemenu(ws->getScreen()),
|
Clientmenu::Clientmenu(Workspace &ws) : Basemenu(ws.getScreen()),
|
||||||
m_wkspc(ws) {
|
m_wkspc(ws) {
|
||||||
setInternalMenu();
|
setInternalMenu();
|
||||||
}
|
}
|
||||||
|
@ -48,16 +48,16 @@ void Clientmenu::itemSelected(int button, unsigned int index) {
|
||||||
if (button > 2)
|
if (button > 2)
|
||||||
return;
|
return;
|
||||||
//get the window with index of the item we selected
|
//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 (win) {
|
||||||
if (button == 1) {
|
if (button == 1) {
|
||||||
if (! m_wkspc->isCurrent())
|
if (! m_wkspc.isCurrent())
|
||||||
m_wkspc->setCurrent();
|
m_wkspc.setCurrent();
|
||||||
} else if (button == 2) {
|
} else if (button == 2) {
|
||||||
if (! m_wkspc->isCurrent())
|
if (! m_wkspc.isCurrent())
|
||||||
win->deiconify(true, false);
|
win->deiconify(true, false);
|
||||||
}
|
}
|
||||||
m_wkspc->raiseWindow(win);
|
m_wkspc.raiseWindow(win);
|
||||||
win->setInputFocus();
|
win->setInputFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,24 +22,21 @@
|
||||||
#ifndef CLIENTMENU_HH
|
#ifndef CLIENTMENU_HH
|
||||||
#define CLIENTMENU_HH
|
#define CLIENTMENU_HH
|
||||||
|
|
||||||
|
|
||||||
#include "Basemenu.hh"
|
#include "Basemenu.hh"
|
||||||
|
|
||||||
// forward declarations
|
|
||||||
class Workspace;
|
class Workspace;
|
||||||
|
|
||||||
|
class Clientmenu: public Basemenu {
|
||||||
class Clientmenu : public Basemenu {
|
|
||||||
public:
|
public:
|
||||||
Clientmenu(Workspace *wrksp);
|
explicit Clientmenu(Workspace &wrksp);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void itemSelected(int button, unsigned int index);
|
virtual void itemSelected(int button, unsigned int index);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Workspace *m_wkspc;
|
Workspace &m_wkspc;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif // _CLIENTMENU_HH_
|
#endif // CLIENTMENU_HH
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue