Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare Dillo for FLTK 1.4 #246

Open
rodarima opened this issue Aug 15, 2024 · 11 comments
Open

Prepare Dillo for FLTK 1.4 #246

rodarima opened this issue Aug 15, 2024 · 11 comments
Labels
build Related with the build process enhancement New feature or request fltk-1.4 Related to the port to FLTK 1.4
Milestone

Comments

@rodarima
Copy link
Member

We should prepare Dillo to be compatible with FLTK 1.4, as currently the
configure prevents building with other than FLTK 1.3.

There may be some other changes to do with the transition.

@rodarima rodarima added build Related with the build process enhancement New feature or request labels Aug 15, 2024
@rodarima
Copy link
Member Author

Related: #258

@rodarima
Copy link
Member Author

FLTK 1.4rc1 released: https://www.fltk.org/newsgroups.php?s22210+gfltk.coredev+v22223

One of the main changes with FLTK 1.4 is that they switched the units to "scale units", which are DPI independent. This will cause problems with images and text that is currently rendered to be shown at an specific size.

We probably will need to adjust the rendering of elements to take into the account the DPI, so they are properly rendered on the screen. Similarly, icons will need to have higher resolutions, so we can properly scale them on high DPI screens.

So far FLTK 1.4 causes gliches when scrolling, so it will remain not compatible until we can fix them:

fltk-1 4-glitches

@xlex8
Copy link
Contributor

xlex8 commented Oct 28, 2024

FLTK 1.4.0rc2 has been released:
https://www.fltk.org/articles.php?L1949

I don't see any scrolling glitches as you mentioned above, so hopefully thats fixed now.

@rodarima
Copy link
Member Author

rodarima commented Oct 28, 2024

I don't see any scrolling glitches as you mentioned above, so hopefully thats fixed now.

These problems are likely in Dillo not FLTK. The FLTK new commits don't change any DPI code that I can see. They are still present for me on 1.4.0rc2.

What is your screen DPI? Are you on Xorg or Wayland? If on Xorg:

$ xdpyinfo | grep -B2 resolution

Also, how did you built dillo with FLTK 1.4? Can you attach the config.log and:

$ ldd src/dillo

@xlex8
Copy link
Contributor

xlex8 commented Oct 28, 2024

It's Xorg @ 96dpi.

I set configure.ac to:

AC_PATH_PROG(FLTK_CONFIG,fltk-config)
AC_MSG_CHECKING([FLTK 1.4])
fltk_version="$FLTK_CONFIG --version 2>/dev/null"
case $fltk_version in
1.4.*) AC_MSG_RESULT(yes)
LIBFLTK_CXXFLAGS=$FLTK_CONFIG --cxxflags
LIBFLTK_CFLAGS=$FLTK_CONFIG --cflags
LIBFLTK_LIBS=$FLTK_CONFIG --ldflags;;

Then removed the original FLTK package, built the new 1.4.0rc2 from source, and installed:

$ fltk-config --version
1.4.0

Then built dillo with the new version.

I sent you the config.log and the ldd output.

@rodarima
Copy link
Member Author

It's Xorg @ 96dpi.

I don't think you will see it on 96dpi. You need a DPI value larger than 96 (but not a multiple), so it triggers the rounding problem. My screen is 101dpi which seems to be very problematic.

You may be able to fake a 101dpi and reproduce it with:

$ FLTK_SCALING_FACTOR=1.0539418854166667 src/dillo

I can also try with another 96dpi screen and see if it goes away on my end (probably).

@xlex8
Copy link
Contributor

xlex8 commented Oct 28, 2024

Ok, I start to see some glitching when doing that, and when changing the dpi higher than 96 with xrandr.

@juanitotc
Copy link

For info - I just built dillo-3.1.0 against fltk-1.4.0rc3 wayland only and things seem to work

rodarima added a commit that referenced this issue Nov 24, 2024
There are several problems that need to be resolved before we can switch
to FLTK 1.4. The support is intentionally disabled until it is ready.

See: #246
rodarima added a commit that referenced this issue Nov 27, 2024
Homebrew has updated the default version of FLTK to 1.4, which is
causing rendering issues in Dillo. So for now, we build with FLTK 1.3 by
pinning it.

See: Homebrew/homebrew-core#198029
See: #246
rodarima added a commit that referenced this issue Nov 27, 2024
Homebrew has updated the default version of FLTK to 1.4, which is
causing rendering issues in Dillo. So for now, we build with FLTK 1.3 by
pinning it.

See: Homebrew/homebrew-core#198029
See: #246
rodarima added a commit that referenced this issue Nov 27, 2024
Homebrew has updated the default version of FLTK to 1.4, which is
causing rendering issues in Dillo. So for now, we build with FLTK 1.3 by
pinning it.

See: Homebrew/homebrew-core#198029
See: #246
@xlex8
Copy link
Contributor

xlex8 commented Dec 26, 2024

FLTK 1.4.1 was released a while ago, and the changelog indicates that this issue might be fixed, but unfortunately there is still some of this glitching happening in Dillo with it.
dillo-fltk-glitch

@rodarima
Copy link
Member Author

FLTK 1.4.1 was released a while ago, and the changelog indicates that this
issue might be fixed, but unfortunately there is still some of this glitching
happening in Dillo with it.

This issue is here to act as a meta-issue, so I can cross-link all other
fixes required for FLTK 1.4. There are several issues with FLTK 1.4 which you
can find in the issue tracker searching for "FLTK" (I should add a new label).

Until all of them are solved and I have checked that there is no big penalty in
performance, I will not consider supporting FLTK 1.4 officially. Some issues may
require large changes on Dillo, so I would not expect this to happen any time
soon.

If you are refering to this:

Fix graphical glitches on 101 DPI screen

This doesn't solve the issue on Dillo rendering, but it "fixes" a issue on a
FLTK test program.

dillo-fltk-glitch

I have multiple patches to mitigate this issue, none good enough. There is
something wrong on the FLTK side, and until I don't find the proper solution, it
will remain broken.

There are other issues that are not so evident which would need to be solved
too. So it is safer to keep Dillo clearly broken, so we don't end up with
distributions shipping with FLTK 1.4 and a crappy patch to make it apparently
work.

One way in which you can help is by testing future patches on your hardware, so
we can determine it is fixed on a broad variety of screen resolutions. In the
meanwhile, we will have to wait.

@xlex8
Copy link
Contributor

xlex8 commented Dec 26, 2024 via email

@rodarima rodarima added this to the Release 3.3.0 milestone Jan 19, 2025
@rodarima rodarima added the fltk-1.4 Related to the port to FLTK 1.4 label Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Related with the build process enhancement New feature or request fltk-1.4 Related to the port to FLTK 1.4
Projects
None yet
Development

No branches or pull requests

3 participants