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

Wayland in Docker containers #42

Open
KaruroChori opened this issue Dec 5, 2024 · 8 comments
Open

Wayland in Docker containers #42

KaruroChori opened this issue Dec 5, 2024 · 8 comments
Labels
build-system enhancement New feature or request help wanted Extra attention is needed

Comments

@KaruroChori
Copy link
Owner

Support for wayland was left out of the docker containers in docker/docker-compose.yml.
Neither me nor @andy5995 have wayland on our systems, so any external help would be appreciated.

@KaruroChori KaruroChori added enhancement New feature or request help wanted Extra attention is needed build-system labels Dec 5, 2024
@andy5995
Copy link
Contributor

andy5995 commented Dec 5, 2024

@Jammyjamjamman The instructions for wayland are in https://github.com/KaruroChori/vs-fltk/blob/master/docker/README.md#for-wayland-based-systems-eg-some-modern-linux-environments but haven't been tested, and once tested, the wayland service needs to be added to docker-compose.yml

But anyone else can let use know here if they want to take this issue. :)

@andy5995
Copy link
Contributor

andy5995 commented Dec 7, 2024

We worked on this today, and found that if one is in Wayland, using the x11-dev service works, but it's not technically using Wayland.

He found some stuff about wayland in the fltk docs which mentioned setting some env vars, but when he tried it, the result didn't change. It might be we overlooked something, after having worked on the issue for about two hours and weren't mentally fresh.

@andy5995
Copy link
Contributor

andy5995 commented Dec 7, 2024

Actually, using vs with Wayland in general might need a separate issue. Jammy tried in the container and on his host system. The app worked in both places, but didn't use Wayland.

@KaruroChori
Copy link
Owner Author

KaruroChori commented Dec 7, 2024

Please, could you disable line https://github.com/KaruroChori/vs-fltk/blob/master/meson.build#L33 ?
That is likely responsible for forcing X11. It is still in place as macos can only build this project with x11 but not cocoa for some extremely strange reason.
#37

@andy5995
Copy link
Contributor

andy5995 commented Dec 7, 2024

Please, could you disable line https://github.com/KaruroChori/vs-fltk/blob/master/meson.build#L33 ? That is likely responsible for forcing X11. It is still in place as macos can only build this project with x11 but not cocoa for some extremely strange reason. #37

Disable it? Do mean the next time we test? Otherwise you could retitle and merge #37, that's the only change in that PR.

@KaruroChori
Copy link
Owner Author

KaruroChori commented Dec 7, 2024

Yes, just to see if that was the reason. In case it is what prevents wayland from working, I will add some option to make sure the macos14 build does not fail.

@KaruroChori
Copy link
Owner Author

I just applied a patch which should remove x11 when other options are available (and forced it via options for the macos14 build). You can test from master directly.

@andy5995
Copy link
Contributor

andy5995 commented Dec 8, 2024

We did more testing today. The results didn't change, but we did find out something useful I think:

FLTK_BACKEND is ignored by vs. But when we built the libfltk separately and ran the examples from that project, it ran them under Wayland.

https://fltk.gitlab.io/fltk/wayland-devel.html

    if the app defines a global bool variable called fl_disable_wayland and this variable is true, the X11 leg is chosen;
    if environment variable FLTK_BACKEND is defined to string "wayland", the Wayland leg is chosen;
    if environment variable FLTK_BACKEND is defined to string "x11", the X11 leg is chosen;
    otherwise, a connection to a Wayland compositor is attempted; if it's successful, the Wayland leg is chosen; if it's not, the X11 leg is chosen.

This was referenced Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build-system enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants