For some reason XDrawLine() and XDrawRectangle() draw only very first segment of a dashed line if line_width is set to 0.
I couldn't find an explanation in the XLib programming guide.
In order to see the problem add "X11 Driver"/"ClientSideGraphics"="N" to the registry, then the bug could be noticed as a missing focus regtangle on focused buttons, missing dashed lines between nodes in regedit, etc.
Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru --- dlls/winex11.drv/graphics.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/dlls/winex11.drv/graphics.c b/dlls/winex11.drv/graphics.c index e8c59f9baf..586e64afa1 100644 --- a/dlls/winex11.drv/graphics.c +++ b/dlls/winex11.drv/graphics.c @@ -449,6 +449,7 @@ static BOOL X11DRV_SetupGCForPen( X11DRV_PDEVICE *physDev ) val.line_width = physDev->pen.width; if (val.line_width <= 1) { val.cap_style = CapNotLast; + val.line_width = 1; } else { switch (physDev->pen.endcap) {
Dmitry Timoshkov dmitry@baikal.ru writes:
For some reason XDrawLine() and XDrawRectangle() draw only very first segment of a dashed line if line_width is set to 0.
I couldn't find an explanation in the XLib programming guide.
In order to see the problem add "X11 Driver"/"ClientSideGraphics"="N" to the registry, then the bug could be noticed as a missing focus regtangle on focused buttons, missing dashed lines between nodes in regedit, etc.
That's not the normal X11 behavior, we've been using these dashed lines for years without issue. It looks like a bug in your graphics driver.
Alexandre Julliard julliard@winehq.org wrote:
For some reason XDrawLine() and XDrawRectangle() draw only very first segment of a dashed line if line_width is set to 0.
I couldn't find an explanation in the XLib programming guide.
In order to see the problem add "X11 Driver"/"ClientSideGraphics"="N" to the registry, then the bug could be noticed as a missing focus regtangle on focused buttons, missing dashed lines between nodes in regedit, etc.
That's not the normal X11 behavior, we've been using these dashed lines for years without issue. It looks like a bug in your graphics driver.
Hmm, probably you are right, I don't see this behaviour on another machine with Linux in a VM.
For the reference this is with xorg-dri-nouveau-17.3.9 and kernel-4.14.52.
Could we add the patch as a workaround? Is there a problem with making sure that line_width is not 0?
Dmitry Timoshkov dmitry@baikal.ru writes:
Hmm, probably you are right, I don't see this behaviour on another machine with Linux in a VM.
For the reference this is with xorg-dri-nouveau-17.3.9 and kernel-4.14.52.
Could we add the patch as a workaround? Is there a problem with making sure that line_width is not 0?
It's slower, and at least on my box it causes some glitches in regedit. Nothing major, but I don't think it's worth changing.