aboutsummaryrefslogtreecommitdiff
path: root/src/Window.cc
diff options
context:
space:
mode:
authorMathias Gumz <akira at fluxbox dot org>2008-01-02 21:44:16 (GMT)
committerMathias Gumz <akira at fluxbox dot org>2008-01-02 21:44:16 (GMT)
commitb73411a95ffadf8d5c98429b49b08f86071b11dc (patch)
tree0f25b203d2b52dbd44775e3c4889ca662c040098 /src/Window.cc
parentd24e2aae6ed435d045990b6e3ce95de2df629be7 (diff)
downloadfluxbox-b73411a95ffadf8d5c98429b49b08f86071b11dc.zip
fluxbox-b73411a95ffadf8d5c98429b49b08f86071b11dc.tar.bz2
moved seldom used code to where it is actually used, no need to include code into compilation when its not needed
Diffstat (limited to 'src/Window.cc')
-rw-r--r--src/Window.cc28
1 files changed, 26 insertions, 2 deletions
diff --git a/src/Window.cc b/src/Window.cc
index 8222c06..b05593c 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -234,6 +234,30 @@ private:
234 WinClient &m_client; 234 WinClient &m_client;
235}; 235};
236 236
237
238/// helper class for some STL routines
239class ChangeProperty {
240public:
241 ChangeProperty(Display *disp, Atom prop, int mode,
242 unsigned char *state, int num):m_disp(disp),
243 m_prop(prop),
244 m_state(state),
245 m_num(num),
246 m_mode(mode){
247
248 }
249 void operator () (FbTk::FbWindow *win) {
250 XChangeProperty(m_disp, win->window(), m_prop, m_prop, 32, m_mode,
251 m_state, m_num);
252 }
253private:
254 Display *m_disp;
255 Atom m_prop;
256 unsigned char *m_state;
257 int m_num;
258 int m_mode;
259};
260
237}; 261};
238 262
239 263
@@ -2012,7 +2036,7 @@ void FluxboxWindow::installColormap(bool install) {
2012 */ 2036 */
2013void FluxboxWindow::saveBlackboxAttribs() { 2037void FluxboxWindow::saveBlackboxAttribs() {
2014 for_each(m_clientlist.begin(), m_clientlist.end(), 2038 for_each(m_clientlist.begin(), m_clientlist.end(),
2015 FbTk::ChangeProperty( 2039 ChangeProperty(
2016 display, 2040 display,
2017 FbAtoms::instance()->getFluxboxAttributesAtom(), 2041 FbAtoms::instance()->getFluxboxAttributesAtom(),
2018 PropModeReplace, 2042 PropModeReplace,
@@ -2036,7 +2060,7 @@ void FluxboxWindow::setState(unsigned long new_state, bool setting_up) {
2036 state[1] = (unsigned long) None; 2060 state[1] = (unsigned long) None;
2037 2061
2038 for_each(m_clientlist.begin(), m_clientlist.end(), 2062 for_each(m_clientlist.begin(), m_clientlist.end(),
2039 FbTk::ChangeProperty(display, 2063 ChangeProperty(display,
2040 FbAtoms::instance()->getWMStateAtom(), 2064 FbAtoms::instance()->getWMStateAtom(),
2041 PropModeReplace, 2065 PropModeReplace,
2042 (unsigned char *)state, 2)); 2066 (unsigned char *)state, 2));