xpra icon
Bug tracker and wiki

This bug tracker and wiki are being discontinued
please use https://github.com/Xpra-org/xpra instead.

Opened 7 years ago

Closed 7 years ago

Last modified 16 months ago

#961 closed defect (fixed)

transparency support is broken with pixmap backing

Reported by: Antoine Martin Owned by: Antoine Martin
Priority: major Milestone: 0.16
Component: client Version: 0.15.x
Keywords: alpha Cc:

Description (last modified by Antoine Martin)

Tested with opengl=no and various encodings as part of the testing for #937 and associated changes (in particular the new test code in r10409), the client still claims to support alpha and tells the server (with added debug):

HAS_ALPHA=True, properties={'encoding.transparency': False, 'encodings.rgb_formats': ('RGB', 'RGBX', 'RGBA'), \
    'encoding.full_csc_modes': {
        'h264': ('ARGB', 'BGRA', 'BGRX', 'GBRP', 'RGB', 'XRGB', 'YUV420P'), 'h265': ('GBRP', 'RGB', 'YUV420P'), \
        'vp9': ('YUV420P',), \
        'vp8': ('YUV420P',)}, 'encoding.csc_modes': ('BGRX', 'GBRP', 'RGB', 'YUV420P', 'BGRA', 'ARGB', 'XRGB') \
    }, supports_transparency=True

But the standard test scripts come up without transparency..

Change History (4)

comment:1 Changed 7 years ago by Antoine Martin

Description: modified (diff)
Status: newassigned

Bisected down:

So, the problem is from r8551 which synchronizes _NET_WM_BYPASS_COMPOSITOR.
It looks innocuous... but it does call realize().

init_window(metadata) comes before setup_window(), and so it may realize the window before we have had a chance to set the colormap.

comment:2 Changed 7 years ago by Antoine Martin

In theory, something like this should fix it (delaying metadata init until after setup_window):

--- xpra/client/client_window_base.py	(revision 10395)
+++ xpra/client/client_window_base.py	(working copy)
@@ -49,6 +49,7 @@
+        self.update_metadata(metadata)
     def __repr__(self):
         return "ClientWindow(%s)" % self._id
@@ -68,7 +69,6 @@
         self._window_workspace = WORKSPACE_UNSET        #will get set in set_metadata if present
         self._desktop_workspace = self.get_desktop_workspace()
         workspacelog("init_window(..) workspace=%s, current workspace=%s", self._window_workspace, self._desktop_workspace)
-        self.update_metadata(metadata)
     def get_desktop_workspace(self):

But it doesn't... no idea why.
Neither does turning off "bypass-compositor" syncing.. so another change must have the same effect.
I even tried to turn off most of the handlers that call realize(), still no luck!

comment:3 Changed 7 years ago by Antoine Martin

Resolution: fixed
Status: assignedclosed

Bisecting again, but connecting to a 0.14.x server, so that the "bypass-compositor" code doesn't fire and we can find the second transparency bug:

So the second bug is caused by r9977: which is now partially reverted in r10419. That fixes transparency when connecting to older servers.
We now also skip unpremultiply if there is no alpha (which would do absolutely nothing useful), as is the case with csc modules giving us RGBX or with mmap giving us raw BGRX.

For newer servers, you also need r10420 which applies the patch from comment:2. The potential for regressions from this one is high...

And since I was re-ordering initialization code, I took it a step further and cleaned up the mess that was the realize() override and delayed properties (many attributes are in fact plain X11 properties that can only be set once the window is realized): see r10421.
Again, the potential for regressions is higher than normal.

comment:4 Changed 16 months ago by migration script

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/961

Note: See TracTickets for help on using tickets.