Hi Francesco,

I closed the bug I filled @ rox on sourceforge artifact, in case of a 
regressiion or something strange with it, I hacked it some more, the guilty is 
most probably in src/tasklist.c:403 (2.8 version)

<code> if (XGetWindowProperty(gdk_display, gdk_x11_get_default_root_xwindow(),
                        gdk_x11_atom_to_xatom(xa__NET_CURRENT_DESKTOP),
                        0, G_MAXLONG, False, XA_CARDINAL, &type, &format, 
&nitems,
                        &bytes_after, (unsigned char **)(&data)) == Success && 
data)
</code>
the call is gdk_x11_atom_to_xatom() and the gtk warning is                      
(ROX-Filer:9094): Gdk-CRITICAL **: gdk_x11_atom_to_xatom_for_display: assertion 
`atom != GDK_NONE' failed
If gtk provided correct warnings I may have found sooner :)

in fact, xa__NET_CURRENT_DESKTOP is 
<code>static GdkAtom xa__NET_CURRENT_DESKTOP = GDK_NONE;</code>
and in (ROX 2.8) 
it is initialised in <code>if (need_init) {...}</code> in       
tasklist_set_active() function *but* in (ROX 2.8) the call of 
update_current_desktop() (in which there is the notorious 
gdk_x11_atom_to_xatom() is made /before/ the 
<code>if (need_init) {...}</code> block

While gdk_x11_atom_to_xatom_for_display() used to return atom("NONE") 
instead of None, it was harmless (I was right, but I looked for
a call of gdk_x11_atom_to_xatom_for_display() not a call of 
gdk_x11_atom_to_xatom() :!) and the bug was yet present in (ROX 2.4.2) while it 
did not provoke grave disfunction, it stayed there...


Francesco, if you really want to keep 2.8 for some reasons in debian, 
it has to be patched so that if (need_init){...} block is called /before/ the 
if (active) ...; block (patch attached)

-- 
Welcome to U1 2521 days up
the Message of the Day is up to date.
To get it, strike "cat /etc/motd" then <return>
u1:~$ _
--- tasklist.c.orig     2009-07-01 19:53:31.000000000 +0200
+++ tasklist.c  2009-07-01 19:54:43.000000000 +0200
@@ -117,8 +117,6 @@
        }
        tasklist_active = active;
        
-       if (active)
-               update_current_desktop();
 
        if (need_init)
        {
@@ -154,9 +152,8 @@
                                        GDK_PROPERTY_CHANGE_MASK);
                need_init = FALSE;
        }
-       
        if (active)
-       {
+       {       update_current_desktop();
                gdk_window_add_filter(NULL, window_filter, NULL);
                update_supported();
        }

Reply via email to