Skip to content

Wayland patch - #26

Open
silovaa wants to merge 20 commits into
cycfi:developfrom
silovaa:wayland-patch
Open

Wayland patch#26
silovaa wants to merge 20 commits into
cycfi:developfrom
silovaa:wayland-patch

Conversation

@silovaa

@silovaa silovaa commented Mar 28, 2025

Copy link
Copy Markdown
Contributor

I would like to propose replacing the implementation of the GTK window with the Wayland window. I am interested in using Elements on the Linux platform.

@djowel

djowel commented Mar 29, 2025

Copy link
Copy Markdown
Member

Wonderful! What I've been waiting for!

@djowel
djowel changed the base branch from master to develop March 29, 2025 00:13
@djowel

djowel commented Mar 29, 2025

Copy link
Copy Markdown
Member
  • I moved this to target develop to avoid disrupting master. I'll need to test functionality there.
  • It seems the tests are failing on Ubuntu and Windows, can you check?

@djowel

djowel commented Mar 29, 2025

Copy link
Copy Markdown
Member

Also, wouldn't it make sense to have BOTH GTK window AND Wayland window, with specific cmake flags to configure either?

@silovaa

silovaa commented Mar 29, 2025

Copy link
Copy Markdown
Contributor Author

Fixed the failure of tests under Ubuntu. It won't be possible to fix it quickly on Windows, it will take time, there is something wrong with the linking at the build stage (artist.lib(harfbuzz.cpp.obj) : error LNK2005: roundf already defined in libucrt.lib(round.obj)).
Regarding GTK, I just don't see any practical sense in opening the GTK window to draw Elements buttons there. Maybe it's justified, but then why GTK and not Qt, for example? I think it would be good if Elements simply drew into an abstract buffer or GL Context and received input through the interface.

@djowel

djowel commented Mar 29, 2025

Copy link
Copy Markdown
Member

Fixed the failure of tests under Ubuntu. It won't be possible to fix it quickly on Windows, it will take time, there is something wrong with the linking at the build stage (artist.lib(harfbuzz.cpp.obj) : error LNK2005: roundf already defined in libucrt.lib(round.obj)). Regarding GTK, I just don't see any practical sense in opening the GTK window to draw Elements buttons there. Maybe it's justified, but then why GTK and not Qt, for example? I think it would be good if Elements simply drew into an abstract buffer or GL Context and received input through the interface.

OK, agreed. GTK is not really necessary. That is a good point. But how about X11? Is that abandoned in this patch? (Pardon if it's a silly question. I haven't yet looked deeper)

@silovaa

silovaa commented Mar 29, 2025

Copy link
Copy Markdown
Contributor Author

Yes, the x11 is not there. X server is considered an outdated technology and it will soon be stopped being included in distributions by default (maybe in 10 years), there is a lot of debate about this. X11 is very different from wayland, its support can be enabled via cmake.

@djowel

djowel commented Mar 29, 2025

Copy link
Copy Markdown
Member

its support can be enabled via cmake.

What does this mean, exactly? I didn't see any config switches. What am I missing?

@silovaa

silovaa commented Mar 29, 2025

Copy link
Copy Markdown
Contributor Author

I'm sorry if I didn't put it right. X11 is not in the patch, I can add it if necessary. If you look at ubuntu, it has been using wayland by default for a long time, so Xorg support is not needed in new applications.

@djowel

djowel commented Mar 29, 2025

Copy link
Copy Markdown
Member

I'm sorry if I didn't put it right. X11 is not in the patch, I can add it if necessary. If you look at ubuntu, it has been using wayland by default for a long time, so Xorg support is not needed in new applications.

Right. I think X11 is still needed for backward compatibility. Please do. Some people might rely on it.

@silovaa

silovaa commented Mar 30, 2025

Copy link
Copy Markdown
Contributor Author

Ok. I'll get on it soon.

@djowel

djowel commented Mar 30, 2025

Copy link
Copy Markdown
Member

Ok. I'll get on it soon.

That will be awesome! I really appreciate the work you're doing here! Many thanks!

@djowel

djowel commented Sep 2, 2025

Copy link
Copy Markdown
Member

Should we just move forward and stop using X11?

@silovaa

silovaa commented Sep 6, 2025 via email

Copy link
Copy Markdown
Contributor Author

@djowel

djowel commented Jun 10, 2026

Copy link
Copy Markdown
Member

Hi Silo! Just like PR #29, your work here was a major inspiration for the rework in our develop branch. The discussion in this PR — Wayland vs X11, GTK vs a more abstract host — directly shaped the design decisions we made. We ended up implementing all three: Wayland, X11, and GTK3, each as a first-class host selectable via CMake flags, which is exactly the direction this conversation was heading.

The Windows linking issue (roundf / libucrt) and the HarfBuzz integration challenges you ran into are all resolved in the new build — vcpkg handles the dependency graph cleanly across all platforms.

Thank you for pushing this forward. Your contributions here were the seed of a lot of what landed in develop, and we hope you'll check it out!

@djowel

djowel commented Jun 10, 2026

Copy link
Copy Markdown
Member

Tell me what you think! We can discuss it over at Discord if you want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants