Bug 98499 - Window border not correctly drawn for depth=32 windows
Summary: Window border not correctly drawn for depth=32 windows
Status: RESOLVED MOVED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/Ext/Composite (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-30 10:53 UTC by Uli Schlachter
Modified: 2018-12-13 18:31 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Example program reproducing the problem (2.90 KB, text/x-csrc)
2016-10-30 10:53 UTC, Uli Schlachter
no flags Details
The wrong output that Xephyr produces (309 bytes, image/png)
2016-10-30 10:54 UTC, Uli Schlachter
no flags Details
The expected output (6.90 KB, image/png)
2016-10-30 10:55 UTC, Uli Schlachter
no flags Details
Smaller test case (1.83 KB, text/x-csrc)
2016-11-26 16:57 UTC, Uli Schlachter
no flags Details

Description Uli Schlachter 2016-10-30 10:53:59 UTC
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.
Comment 1 Uli Schlachter 2016-10-30 10:54:24 UTC
Created attachment 127618 [details]
The wrong output that Xephyr produces
Comment 2 Uli Schlachter 2016-10-30 10:55:29 UTC
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.
Comment 3 Uli Schlachter 2016-11-26 16:57:04 UTC
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.
Comment 4 Uli Schlachter 2016-11-26 18:01:15 UTC
First attempt at a patch: https://lists.x.org/archives/xorg-devel/2016-November/051926.html
Comment 5 Uli Schlachter 2016-12-10 12:33:43 UTC
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.
Comment 6 Uli Schlachter 2016-12-29 09:56:31 UTC
I think the patch which was committed is slightly wrong and introduces a new problem:

https://lists.x.org/archives/xorg-devel/2016-December/052058.html

> 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.
Comment 7 GitLab Migration User 2018-12-13 18:31:40 UTC
-- 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.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.