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"
|
||||
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue