xwm: Reparent client windows into ARGB windows
authorKristian Høgsberg <krh@bitplanet.net>
Thu, 2 May 2013 17:43:24 +0000 (13:43 -0400)
committerKristian Høgsberg <krh@bitplanet.net>
Thu, 2 May 2013 17:43:34 +0000 (13:43 -0400)
commitf91871980e095caa827f4f39e6c178fc0a2bd396
tree292a1e4a6af5f65f89e4c0f5d16505b45b26d7cf
parentafe690cbcf8e6fc729628262c6e4f9999fb1a8c1
xwm: Reparent client windows into ARGB windows

We used to rely on an ugly hack where the xwayland server would always
report RGB X windows as having ARGB pixels, so that texturing from these
would also sample the undefined alpha.  We also relied on Xrender rendering
to RGB X windows to write the alpha channel correctly, so that when we
texture from the RGB X window as an ARGB surface we end up getting the
alpha written by Xrender.

That was obviously all broken.  We can instead reparent client windows into
ARGB frame windows.  That way we can render the decorations using a
ARGB render pictformat and sample back those alpha values in a well-defined
way.  We can also unbreak xwayland and let it report RGB pixel format for
RGB windows.  We still need the opaque region or the RGB-only client window
but that's OK.
src/xwayland/window-manager.c
src/xwayland/xwayland.h