On Fri, Mar 4, 2011 at 6:12 AM, Harris, Donald <[email protected]> wrote:
> Good morning,
>
> Ok, so I downloaded your latest source code, and when I run do-build, it 
> fails with this:
[...]
> wimpiggy/lowlevel/bindings.c:604: warning: parameter names (without types) in 
> function declaration
> wimpiggy/lowlevel/bindings.c:606: error: expected â=â, â,â, â;â, âasmâ or 
> â__attribute__â before â__Pyx_PyInt_from_py_CARD32â

Ugh, sorry to hear that. I have no idea why Cython would be generating
invalid C code :-(. I suppose upgrading cython might help, but I don't
know.

> Now, as for the xpra log... I attached it to the email.  Looking through it I 
> didn't see anything that jumped out at me, but what do I know?  :)
>
> I did notice a couple of things though after launching the program.  Like if 
> I right click, it draws a blank window on the screen where the menu would be 
> normally.  Also if I open yast2 for instance, the buttons actually work and 
> if I click around the blank window, it will open up more windows with the 
> titles and everything.  So it's talking to the server, it's just not drawing 
> it completely.  Don't know if that means anything, just thought I would throw 
> that out there.

Right, it looks like for some reason, the xpra server is failing when
it tries to read graphical contents out of the server-side X server.
I'm attaching a patch that makes the relevant code a little more
paranoid and log a little more. If you apply it and run with '-d all'
again, you should see lines like "failed to name a window pixmap
(expect an X error soon)". If you do, then this is the problem.

(It should apply to whichever version of xpra you're currently using.
Use 'patch -p1 <composite-helper-more-robust.patch' in your source
tree, or even your build tree should probably work -- whatever
directory contains a 'wimpiggy' subdirectory.)

However, I can't figure out why this code wouldn't work -- it looks
like a bug in Xvfb, or in GTK+, or in PyGTK, or something. I wouldn't
be shocked if those pieces have received somewhat less testing on
S/390 than on other architectures. It might be worth trying to use a
more recent version of each of those (in that order). Otherwise, I'm
afraid I'm not sure what to say...

-- Nathaniel
diff -r 1ae63c9cddaa wimpiggy/composite.py
--- a/wimpiggy/composite.py	Wed Aug 04 20:54:07 2010 -0700
+++ b/wimpiggy/composite.py	Fri Mar 04 08:05:23 2011 -0800
@@ -72,13 +72,16 @@ class CompositeHelper(AutoPropGObjectMix
     def invalidate_pixmap(self):
         log("invalidating named pixmap", type="pixmap")
         if self._listening_to is not None:
-            # Don't want to stop listening to self._window!:
-            assert self._window not in self._listening_to
-            for w in self._listening_to:
-                remove_event_receiver(w, self)
+            self._cleanup_listening(self._listening_to)
             self._listening_to = None
         self._contents_handle = None
 
+    def _cleanup_listening(self, listening):
+        # Don't want to stop listening to self._window!:
+        assert self._window not in self._listening_to
+        for w in self._listening_to:
+            remove_event_receiver(w, self)
+
     def do_get_property_contents_handle(self, name):
         if self._contents_handle is None:
             log("refreshing named pixmap", type="pixmap")
@@ -99,24 +102,37 @@ class CompositeHelper(AutoPropGObjectMix
                 #   4) call NameWindowPixmap
                 # we are safe.  (I think.)
                 listening = []
-                win = get_parent(self._window)
-                while win is not None and win.get_parent() is not None:
-                    # We have to use a lowlevel function to manipulate the
-                    # event selection here, because SubstructureRedirectMask
-                    # does not roundtrip through the GDK event mask
-                    # functions.  So if we used them, here, we would clobber
-                    # corral window selection masks, and those don't deserve
-                    # clobbering.  They are our friends!  X is driving me
-                    # slowly mad.
-                    addXSelectInput(win, const["StructureNotifyMask"])
-                    add_event_receiver(win, self)
-                    listening.append(win)
-                    win = get_parent(win)
-                handle = xcomposite_name_window_pixmap(self._window)
-                self._contents_handle = handle
-                # Don't save the listening set until after NameWindowPixmap
-                # has succeeded, to maintain our invariant:
-                self._listening_to = listening
+                try:
+                    win = get_parent(self._window)
+                    while win is not None and win.get_parent() is not None:
+                        # We have to use a lowlevel function to manipulate the
+                        # event selection here, because
+                        # SubstructureRedirectMask does not roundtrip through
+                        # the GDK event mask functions.  So if we used them,
+                        # here, we would clobber corral window selection
+                        # masks, and those don't deserve clobbering.  They are
+                        # our friends!  X is driving me slowly mad.
+                        addXSelectInput(win, const["StructureNotifyMask"])
+                        add_event_receiver(win, self)
+                        listening.append(win)
+                        win = get_parent(win)
+                    handle = xcomposite_name_window_pixmap(self._window)
+                except:
+                    try:
+                        self._cleanup_listening(listening)
+                    except:
+                        pass
+                    raise
+                if handle is None:
+                    log("failed to name a window pixmap (expect an X error soon)",
+                        type="pixmap")
+                    self._cleanup_listening(listening)
+                else:
+                    self._contents_handle = handle
+                    # Don't save the listening set until after
+                    # NameWindowPixmap has succeeded, to maintain our
+                    # invariant:
+                    self._listening_to = listening
             trap.swallow(set_pixmap)
         return self._contents_handle
 
_______________________________________________
Parti-discuss mailing list
[email protected]
http://lists.partiwm.org/cgi-bin/mailman/listinfo/parti-discuss

Reply via email to