danfragoso / thdwb

🌭 The hotdog web browser and browser engine 🌭

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

support wayland windowing system on linux

neurlang opened this issue · comments

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.

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

what works:

  • can access debug mode and tree mode

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

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

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