moved seldom used code to where it is actually used, no need to include code into compilation when its not needed

This commit is contained in:
Mathias Gumz 2008-01-02 22:44:16 +01:00
parent d24e2aae6e
commit b73411a95f
3 changed files with 26 additions and 27 deletions

View file

@ -244,29 +244,6 @@ private:
bool operator == (Window win, const FbWindow &fbwin);
/// helper class for some STL routines
class ChangeProperty {
public:
ChangeProperty(Display *disp, Atom prop, int mode,
unsigned char *state, int num):m_disp(disp),
m_prop(prop),
m_state(state),
m_num(num),
m_mode(mode){
}
void operator () (FbTk::FbWindow *win) {
XChangeProperty(m_disp, win->window(), m_prop, m_prop, 32, m_mode,
m_state, m_num);
}
private:
Display *m_disp;
Atom m_prop;
unsigned char *m_state;
int m_num;
int m_mode;
};
/// Interface class to render FbWindow foregrounds.
class FbWindowRenderer {
public:

View file

@ -41,8 +41,6 @@
#include "Toolbar.hh"
#include "fluxbox.hh"
#include "FbTk/FbWindow.hh"
#include <utility>
namespace {

View file

@ -234,6 +234,30 @@ private:
WinClient &m_client;
};
/// helper class for some STL routines
class ChangeProperty {
public:
ChangeProperty(Display *disp, Atom prop, int mode,
unsigned char *state, int num):m_disp(disp),
m_prop(prop),
m_state(state),
m_num(num),
m_mode(mode){
}
void operator () (FbTk::FbWindow *win) {
XChangeProperty(m_disp, win->window(), m_prop, m_prop, 32, m_mode,
m_state, m_num);
}
private:
Display *m_disp;
Atom m_prop;
unsigned char *m_state;
int m_num;
int m_mode;
};
};
@ -2012,7 +2036,7 @@ void FluxboxWindow::installColormap(bool install) {
*/
void FluxboxWindow::saveBlackboxAttribs() {
for_each(m_clientlist.begin(), m_clientlist.end(),
FbTk::ChangeProperty(
ChangeProperty(
display,
FbAtoms::instance()->getFluxboxAttributesAtom(),
PropModeReplace,
@ -2036,7 +2060,7 @@ void FluxboxWindow::setState(unsigned long new_state, bool setting_up) {
state[1] = (unsigned long) None;
for_each(m_clientlist.begin(), m_clientlist.end(),
FbTk::ChangeProperty(display,
ChangeProperty(display,
FbAtoms::instance()->getWMStateAtom(),
PropModeReplace,
(unsigned char *)state, 2));