diff options
| author | Dana Jansens <danakj@orodu.net> | 2002-05-25 02:44:46 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2002-05-25 02:44:46 +0000 |
| commit | 99555fea0847edda1e4aa6acac054868324f621f (patch) | |
| tree | b19b09bc79fe0151d07b6dc7a0da5a3f0dff765b /util | |
| parent | b3737edc7cc7d1ebc52ec204dcaa71d9cb859c5a (diff) | |
reusing the blackbox-cvs bsetroot. it did in fact work right now.
Diffstat (limited to 'util')
| -rw-r--r-- | util/bsetroot.cc | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/util/bsetroot.cc b/util/bsetroot.cc index 470ca7b3..cd047c2a 100644 --- a/util/bsetroot.cc +++ b/util/bsetroot.cc @@ -1,5 +1,5 @@ // -*- mode++; indent-tabs-mode: nil; c-basic-offset: 2; -*- -// Window.cc for Blackbox - an X11 Window manager +// bsetroot.cc for Blackbox - an X11 Window manager // Copyright (c) 2001 - 2002 Sean 'Shaleh' Perry <shaleh at debian.org> // Copyright (c) 1997 - 2000, 2002 Brad Hughes <bhughes at trolltech.com> // @@ -150,11 +150,19 @@ void bsetroot::setPixmapProperty(int screen, Pixmap pixmap) { /* Clear out the old pixmap */ XGetWindowProperty(getXDisplay(), screen_info->getRootWindow(), - rootpmap_id, 0L, 1L, False, XA_PIXMAP, - &type, &format, &length, &after, &data); - if (type == XA_PIXMAP && format == 32) { - XKillClient(getXDisplay(), *((Pixmap *) data)); - XSync(getXDisplay(), False); + rootpmap_id, 0L, 1L, False, AnyPropertyType, + &type, &format, &length, &after, &data); + + if ((type == XA_PIXMAP) && (format == 32) && (length == 1)) { + unsigned char* data_esetroot = 0; + XGetWindowProperty(getXDisplay(), screen_info->getRootWindow(), + esetroot_id, 0L, 1L, False, AnyPropertyType, + &type, &format, &length, &after, &data_esetroot); + if (data && data_esetroot && *((Pixmap *) data)) { + XKillClient(getXDisplay(), *((Pixmap *) data)); + XSync(getXDisplay(), False); + XFree(data_esetroot); + } XFree(data); } |
