Re: XDrawRectangle workaround

[email protected] Wed, 03 May 2023 14:14:36 -0500
Newsgroups gmane.comp.lib.fox-toolkit.user
Message-ID <[email protected]>
On 2023-05-03 12:08, Sander Jansen wrote:
> I noticed some missing pixels when running FOX under wayland/GNOME:
> Looks like there may be a driver issue as the FLTK project reported
> the same thing.
> 
> https://github.com/fltk/fltk/issues/156
> https://gitlab.freedesktop.org/xorg/xserver/-/issues/1221
> 
> This workaround makes quality pixels again:
> https://github.com/gogglesmm/gogglesmm/commit/7ed5be92dec805765304f4b05f02fe46
> _______________________________________________
> Foxgui-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/foxgui-users

Possible fix:

1) in FXVisual, initialize CG with line width == 1, in 
FXVisual::setupgc():

       gval.line_width=1;

     [passing the extra GCLineWidth into XCreateGC().

2) In FXDC, initialize width=1.

I'm not sure there's any difference between linewith of 0 and
linewidth of 1, anyway.

At least on my box, I see no ill-effects from this change.

I'll drop the changes tonight, but you can probably
easily enough try it yourself.

FYI, I don't see the issue.  But I'm running on a VM and
it may be the case I'm not exercising a "real" hardware
driver....

      -- JVZ