From e2715a85118ed183880c42dea2fad79402c896cb Mon Sep 17 00:00:00 2001 From: Andreas Fink Date: Sat, 11 Dec 2010 09:15:14 +0000 Subject: [PATCH] *fix* issue 313 (pcmanfm sets _XROOTMAP_ID instead of _XROOTPMAP_ID) --- src/server.c | 10 ++++++---- src/server.h | 1 + src/tint.c | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/server.c b/src/server.c index 6ec363b..46fd8a1 100644 --- a/src/server.c +++ b/src/server.c @@ -36,6 +36,7 @@ void server_catch_error (Display *d, XErrorEvent *ev){} 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); @@ -188,16 +189,17 @@ void get_root_pixmap() 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 0); + } server.root_pmap = ret; if (server.root_pmap == None) diff --git a/src/server.h b/src/server.h index ec6bb1d..da11b1d 100644 --- a/src/server.h +++ b/src/server.h @@ -17,6 +17,7 @@ typedef struct Global_atom { Atom _XROOTPMAP_ID; + Atom _XROOTMAP_ID; Atom _NET_CURRENT_DESKTOP; Atom _NET_NUMBER_OF_DESKTOPS; Atom _NET_DESKTOP_NAMES; diff --git a/src/tint.c b/src/tint.c index db40959..a7016b3 100644 --- a/src/tint.c +++ b/src/tint.c @@ -584,7 +584,7 @@ void event_property_notify (XEvent *e) 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]); -- 2.45.2