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

support wayland windowing system on linux #46

Open
neurlang opened this issue Feb 10, 2024 · 5 comments
Open

support wayland windowing system on linux #46

neurlang opened this issue Feb 10, 2024 · 5 comments

Comments

@neurlang
Copy link

I've forked the browser and added support for the modern wayland linux-based windowing system.
It now ships as the go-wayland-browser demo of my wayland repository.

What works:

  • buttons, icons
  • keyboard input including unicode
  • scrolling

What doesn't work yet:

  • popup menus, i intend to add these
  • input methods (virtual keyboards for CJK and emojis etc)
  • overlays - i don't know what it is

Differences:

  • there is no glfw anymore, so untested on windows os (however it might work using the windows compatibility in my lib)
  • no open gl dependency anymore, drawing via pure shm on cpu only (shared memory)
  • no shaders lol
  • compiles without cgo, so can use additional static analysis tools like go build race detector

The changes are confined to the mustard package. The changes to the browser package are minimal.

@neurlang
Copy link
Author

Screenshot from 2024-02-10 15-33-24

@neurlang
Copy link
Author

fixed colors, fixed popup menu (overlays) to appear (in the wrong corner for now)

what doesn't work:

  • key repeat

Screenshot from 2024-02-11 14-41-29

@neurlang
Copy link
Author

what works:

  • can access debug mode and tree mode

Screenshot from 2024-02-11 20-35-27

@danfragoso
Copy link
Owner

Thank you for doing this @neurlang! I really appreciate you taking the time to do it, I'll update the repo to mention that this fork is available for Wayland, if you want to, we can work together on merging it to repo

@neurlang
Copy link
Author

Yeah, definitely it can be merged (when mature). My fork of the mustard package can be added to your mustard package to be activated the build tag wayland. We did this in the past in the vulkan repo and it worked.

This means that anyone will be able to compile the browser with the wayland mustard using:

go build -tags wayland

Whereas the old glfw mustard will still work like this:

go build

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

No branches or pull requests

2 participants