aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/FbPixmap.cc
diff options
context:
space:
mode:
authorrathnor <rathnor>2004-09-11 12:33:14 (GMT)
committerrathnor <rathnor>2004-09-11 12:33:14 (GMT)
commit7d793fc6a8d7aa07a7636df2e96054c4a8e2c6a8 (patch)
treead753983b54d61f8a01fb32794d67bf50585789e /src/FbTk/FbPixmap.cc
parentc8f9cf1177b6de1cc210f0706dae302b9aa4f7b5 (diff)
downloadfluxbox_pavel-7d793fc6a8d7aa07a7636df2e96054c4a8e2c6a8.zip
fluxbox_pavel-7d793fc6a8d7aa07a7636df2e96054c4a8e2c6a8.tar.bz2
fix issues that resulted in unnecessary X errors
Diffstat (limited to 'src/FbTk/FbPixmap.cc')
-rw-r--r--src/FbTk/FbPixmap.cc22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/FbTk/FbPixmap.cc b/src/FbTk/FbPixmap.cc
index 43e74d8..66eee21 100644
--- a/src/FbTk/FbPixmap.cc
+++ b/src/FbTk/FbPixmap.cc
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: FbPixmap.cc,v 1.14 2004/09/10 15:46:08 akir Exp $ 22// $Id: FbPixmap.cc,v 1.15 2004/09/11 12:33:14 rathnor Exp $
23 23
24#include "FbPixmap.hh" 24#include "FbPixmap.hh"
25#include "App.hh" 25#include "App.hh"
@@ -305,28 +305,26 @@ Pixmap FbPixmap::getRootPixmap(int screen_num) {
305 }; 305 };
306 306
307 Pixmap root_pm = None; 307 Pixmap root_pm = None;
308
309 for (prop = 0; prop_ids[prop]; prop++) { 308 for (prop = 0; prop_ids[prop]; prop++) {
310 if (XGetWindowProperty(s_display, 309 if (XGetWindowProperty(s_display,
311 RootWindow(s_display, screen_num), 310 RootWindow(s_display, screen_num),
312 XInternAtom(s_display, prop_ids[prop], False), 311 XInternAtom(s_display, prop_ids[prop], False),
313 0L, 4, 312 0l, 4l,
314 False, XA_PIXMAP, 313 False, XA_PIXMAP,
315 &real_type, &real_format, 314 &real_type, &real_format,
316 &items_read, &items_left, 315 &items_read, &items_left,
317 (unsigned char **) &data) == Success && 316 (unsigned char **) &data) == Success) {
318 real_format == 32 && items_read == 1) { 317 if (real_format == 32 && items_read == 1) {
319 318
320 if (strcmp(prop_ids[prop], "_XSETROOT_ID") == 0) { 319 if (print_error && strcmp(prop_ids[prop], "_XSETROOT_ID") == 0) {
321 if (print_error) {
322 fprintf(stderr, "%s", error_message); 320 fprintf(stderr, "%s", error_message);
323 print_error = false; 321 print_error = false;
324 } 322 } else
325 } else 323 root_pm = (Pixmap) (*data);
326 root_pm = (Pixmap) (*data); 324 }
327
328 XFree(data); 325 XFree(data);
329 break; 326 if (root_pm != None)
327 break;
330 } 328 }
331 } 329 }
332 330