void server_init_atoms ()
{
server.atom._XROOTPMAP_ID = XInternAtom (server.dsp, "_XROOTPMAP_ID", False);
+ server.atom._XROOTMAP_ID = XInternAtom (server.dsp, "_XROOTMAP_ID", False);
server.atom._NET_CURRENT_DESKTOP = XInternAtom (server.dsp, "_NET_CURRENT_DESKTOP", False);
server.atom._NET_NUMBER_OF_DESKTOPS = XInternAtom (server.dsp, "_NET_NUMBER_OF_DESKTOPS", False);
server.atom._NET_DESKTOP_NAMES = XInternAtom (server.dsp, "_NET_DESKTOP_NAMES", False);
Pixmap ret = None;
unsigned long *res;
- int c = 2;
+ Atom pixmap_atoms[] = { server.atom._XROOTPMAP_ID, server.atom._XROOTMAP_ID };
+ int i;
- do {
- res = server_get_property (server.root_win, server.atom._XROOTPMAP_ID, XA_PIXMAP, 0);
+ for (i=0; i<sizeof(pixmap_atoms)/sizeof(Atom); ++i) {
+ res = server_get_property (server.root_win, pixmap_atoms[i], XA_PIXMAP, 0);
if (res) {
ret = *((Pixmap*)res);
XFree(res);
break;
}
- } while (--c > 0);
+ }
server.root_pmap = ret;
if (server.root_pmap == None)
typedef struct Global_atom
{
Atom _XROOTPMAP_ID;
+ Atom _XROOTMAP_ID;
Atom _NET_CURRENT_DESKTOP;
Atom _NET_NUMBER_OF_DESKTOPS;
Atom _NET_DESKTOP_NAMES;
active_task();
panel_refresh = 1;
}
- else if (at == server.atom._XROOTPMAP_ID) {
+ else if (at == server.atom._XROOTPMAP_ID || at == server.atom._XROOTMAP_ID) {
// change Wallpaper
for (i=0 ; i < nb_panel ; i++) {
set_panel_background(&panel1[i]);