FLTK logo

Re: [fltk/fltk] FLTK 1.4: X11 Clipping bugs (Issue #963)

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.issues  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: [fltk/fltk] FLTK 1.4: X11 Clipping bugs (Issue #963) Albrecht Schlosser 14:17 Apr 28  
 

Here's a first comment, only as a quick reaction. This was not intended as a final statement - but it became longer and more detailed than I had anticipated, and thus it may well be final. A solution is included.

First of all, this behavior is a property of X11 because this is the only platform which is supported by FLTK and allows only 16 bits of coordinate space. Although FLTK allows larger widgets and scroll areas it is not possible to use coordinates larget than 16 bits in pure X11.

I remember to have "fixed" (more precise: improved) some of the clipping issues at some time in the past by clipping coordinates internally before they are applied to the X11 protocol but this is something that can't be done completely.

The only valid solution is IMHO to restrict coordinates in user space (not trying to clip inside FLTK). There may be some points where this can still improved but I'm pretty sure that we won't try to "fix" this in FLTK. It's clear that Windows and macOS support full 32-bit coordinate space which is why these issues don't exist on these platforms.

I'm not sure about Wayland though. Does Wayland support full 32-bit coordinate space? Since all drawing is done by FLTK in internal buffers using Cairo this would be something that needs to be supported by Cairo (I assume this works OOTB, and see my test results below).

Another important test would be to build FLTK on X11 with Cairo drawing, either the hybrid (Wayland + X11) build or the X11-only build with Cairo drawing:

  • ./configure --enable-usecairo ... or
  • cmake -D FLTK_GRAPHICS_CAIRO:BOOL=ON ...

@dannye I tried your test program with the setup mentioned above (Cairo drawing) and it seems to work as intended on Linux/X11 and Linux/Wayland. As a double check I tested it with

./configure --disable-wayland --disable-use-cairo ; make

and this showed the effects as described above and seen in the video.

Summary after my quick tests: The solution to all clipping issues on X11 which uses only 16-bit coordinates (this is not a FLTK fault) is to use Cairo drawing which is available since FLTK 1.4.0 or to use Wayland which also uses Cairo drawing internally. The hybrid FLTK lib works well as both X11 and Wayland clients.

For the record: If anything regarding coordinates > 16 bit appears to work "better" in FLTK 1.3 then this is only by good luck.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <fltk/fltk/issues/963/2081659054@github.com>

Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.