*fix* issue 313 (pcmanfm sets _XROOTMAP_ID instead of _XROOTPMAP_ID)

git-svn-id: http://tint2.googlecode.com/svn/trunk@614 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
This commit is contained in:
Andreas.Fink85 2010-12-11 09:15:14 +00:00
parent 0ef56da453
commit 07f48183d7
3 changed files with 8 additions and 5 deletions

View file

@ -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<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)

View file

@ -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;

View file

@ -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]);