Created attachment 127617 [details]
Example program reproducing the problem
I'm on current debian testing (amd64), so XOrg server 1.18.4.
When I run the attached sample program against my "normal X server", I get the expected output as shown in the attached screenshot "good.png" When I run the same program against Xephyr, I get the output as shown in "bad.png". Here, the window border of the first window is not drawn by the server.
Created attachment 127618 [details]
The wrong output that Xephyr produces
Created attachment 127619 [details]
The expected output
Oh and one more thing: When forcing a redraw of Xephyr (exactly: Going to another workspace in my WM and then back), Xephyr starts displaying the expected result.
Created attachment 128204 [details]
Smaller test case
Here is a smaller test case.
I was wrong in assuming that this was related to the SHAPE extension. Instead, this seems to be about having a depth=32 window which is created with border width 0, then mapped and then gets a non-zero border width.
First attempt at a patch: https://lists.x.org/archives/xorg-devel/2016-November/051926.html
Supposedly fixed by https://cgit.freedesktop.org/xorg/xserver/commit/?id=f31875510d818ba517f082e124adb294db906e51. However, I can't build latest xserver right now to test the fix, so I'll leave this open.
I think the patch which was committed is slightly wrong and introduces a new problem:
> Sorry, but I think that this is wrong. The definition
> of HasBorder(pWindow) is in include/windowstr.h:
> #define HasBorder(w) ((w)->borderWidth || wClipShape(w))
> Your patch drops the shape check.
-- GitLab Migration Automatic Message --
This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.
You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/xserver/issues/199.