diff options
author | Henrik Kinnunen <fluxgen@fluxbox.org> | 2010-03-17 15:35:07 (GMT) |
---|---|---|
committer | Henrik Kinnunen <fluxgen@fluxbox.org> | 2010-03-17 15:35:07 (GMT) |
commit | ce0b41c8472135898a553d6d649d852beb80cffb (patch) | |
tree | 8cca2f6d8795c19c86ab70fa22e9c724e5f4453b /src/Ewmh.cc | |
parent | 7a86dad21b1d50b35857496c165e4e85cc0d2bd3 (diff) | |
download | fluxbox-ce0b41c8472135898a553d6d649d852beb80cffb.zip fluxbox-ce0b41c8472135898a553d6d649d852beb80cffb.tar.bz2 |
Changed #ifdef DEBUG ... cerr << to using fbdbg.
This will reduce the number of #ifdef DEBUG for
simple debug messages.
include "Debug.hh" and use fbdbg instead of cerr for debug.
Diffstat (limited to 'src/Ewmh.cc')
-rw-r--r-- | src/Ewmh.cc | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/src/Ewmh.cc b/src/Ewmh.cc index fb1b832..b4fafc3 100644 --- a/src/Ewmh.cc +++ b/src/Ewmh.cc | |||
@@ -29,6 +29,7 @@ | |||
29 | #include "fluxbox.hh" | 29 | #include "fluxbox.hh" |
30 | #include "FbWinFrameTheme.hh" | 30 | #include "FbWinFrameTheme.hh" |
31 | #include "FocusControl.hh" | 31 | #include "FocusControl.hh" |
32 | #include "Debug.hh" | ||
32 | 33 | ||
33 | #include "FbTk/App.hh" | 34 | #include "FbTk/App.hh" |
34 | #include "FbTk/FbWindow.hh" | 35 | #include "FbTk/FbWindow.hh" |
@@ -129,10 +130,10 @@ void extractNetWmIcon(Atom net_wm_icon, WinClient& winclient) { | |||
129 | 130 | ||
130 | // actually there is some data in _NET_WM_ICON | 131 | // actually there is some data in _NET_WM_ICON |
131 | nr_icon_data = nr_bytes_left / sizeof(CARD32); | 132 | nr_icon_data = nr_bytes_left / sizeof(CARD32); |
132 | #ifdef DEBUG | 133 | |
133 | std::cerr << "extractNetWmIcon: " << winclient.title() << "\n"; | 134 | fbdbg << "extractNetWmIcon: " << winclient.title() << "\n"; |
134 | std::cerr << "nr_icon_data: " << nr_icon_data << "\n"; | 135 | fbdbg << "nr_icon_data: " << nr_icon_data << "\n"; |
135 | #endif | 136 | |
136 | // read all the icons stored in _NET_WM_ICON | 137 | // read all the icons stored in _NET_WM_ICON |
137 | if (raw_data) | 138 | if (raw_data) |
138 | XFree(raw_data); | 139 | XFree(raw_data); |
@@ -144,9 +145,9 @@ void extractNetWmIcon(Atom net_wm_icon, WinClient& winclient) { | |||
144 | 145 | ||
145 | return; | 146 | return; |
146 | } | 147 | } |
147 | #ifdef DEBUG | 148 | |
148 | std::cerr << "nr_read: " << nr_read << "|" << nr_bytes_left << "\n"; | 149 | fbdbg << "nr_read: " << nr_read << "|" << nr_bytes_left << "\n"; |
149 | #endif | 150 | |
150 | } | 151 | } |
151 | 152 | ||
152 | IconContainer icon_data; // stores all available data, sorted by size (width x height) | 153 | IconContainer icon_data; // stores all available data, sorted by size (width x height) |
@@ -161,28 +162,26 @@ void extractNetWmIcon(Atom net_wm_icon, WinClient& winclient) { | |||
161 | 162 | ||
162 | width = raw_data[i++]; | 163 | width = raw_data[i++]; |
163 | if (width >= nr_icon_data) { | 164 | if (width >= nr_icon_data) { |
164 | #ifdef DEBUG | 165 | |
165 | std::cerr << "Ewmh.cc extractNetWmIcon found strange _NET_WM_ICON width (" | 166 | fbdbg << "Ewmh.cc extractNetWmIcon found strange _NET_WM_ICON width (" |
166 | << width << ") for " << winclient.title() << "\n"; | 167 | << width << ") for " << winclient.title() << "\n"; |
167 | #endif | ||
168 | break; | 168 | break; |
169 | } | 169 | } |
170 | 170 | ||
171 | height = raw_data[i++]; | 171 | height = raw_data[i++]; |
172 | if (height >= nr_icon_data) { | 172 | if (height >= nr_icon_data) { |
173 | #ifdef DEBUG | 173 | |
174 | std::cerr << "Ewmh.cc extractNetWmIcon found strange _NET_WM_ICON height (" | 174 | fbdbg << "Ewmh.cc extractNetWmIcon found strange _NET_WM_ICON height (" |
175 | << height << ") for " << winclient.title() << "\n"; | 175 | << height << ") for " << winclient.title() << "\n"; |
176 | #endif | 176 | |
177 | break; | 177 | break; |
178 | } | 178 | } |
179 | 179 | ||
180 | // strange values stored in the NETWM_ICON | 180 | // strange values stored in the NETWM_ICON |
181 | if (i + width * height > nr_icon_data) { | 181 | if (i + width * height > nr_icon_data) { |
182 | #ifdef DEBUG | 182 | fbdbg << "Ewmh.cc extractNetWmIcon found strange _NET_WM_ICON dimensions (" |
183 | std::cerr << "Ewmh.cc extractNetWmIcon found strange _NET_WM_ICON dimensions (" | ||
184 | << width << "x" << height << ")for " << winclient.title() << "\n"; | 183 | << width << "x" << height << ")for " << winclient.title() << "\n"; |
185 | #endif | 184 | |
186 | break; | 185 | break; |
187 | } | 186 | } |
188 | 187 | ||
@@ -1190,9 +1189,9 @@ bool Ewmh::checkClientMessage(const XClientMessageEvent &ce, | |||
1190 | win_gravity, winclient->old_bw); | 1189 | win_gravity, winclient->old_bw); |
1191 | return true; | 1190 | return true; |
1192 | } else if (ce.message_type == m_net->restack_window) { | 1191 | } else if (ce.message_type == m_net->restack_window) { |
1193 | #ifndef DEBUG | 1192 | |
1194 | cerr << "Ewmh: restack window" << endl; | 1193 | fbdbg << "Ewmh: restack window" << endl; |
1195 | #endif // DEBUG | 1194 | |
1196 | if (winclient == 0 || winclient->fbwindow() == 0) | 1195 | if (winclient == 0 || winclient->fbwindow() == 0) |
1197 | return true; | 1196 | return true; |
1198 | 1197 | ||