]> Dogcows Code - chaz/tint2/commitdiff
*fix* issue 313 (pcmanfm sets _XROOTMAP_ID instead of _XROOTPMAP_ID)
authorAndreas Fink <andreas.fink85@googlemail.com>
Sat, 11 Dec 2010 09:15:14 +0000 (09:15 +0000)
committerAndreas Fink <andreas.fink85@googlemail.com>
Sat, 11 Dec 2010 09:15:14 +0000 (09:15 +0000)
src/server.c
src/server.h
src/tint.c

index 6ec363b0d5d95f11bae10bd75df9f41c7eb5a663..46fd8a1626a0aca0235a2ec707e6ba95cb120b8e 100644 (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)
index ec6bb1d32d7f38fbd3cecb0f3664bf8fc175d1b0..da11b1de2e20e87430101d0d4e24fe0ea706d26c 100644 (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;
index db4095985ffa2668afdf23ec237e8b55b13c1d47..a7016b3ea403e463c590c8825e7440d263f316fd 100644 (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]);
This page took 0.025637 seconds and 4 git commands to generate.