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

core: reimplement Wayland support #1267

Merged
merged 4 commits into from
Sep 11, 2024
Merged

core: reimplement Wayland support #1267

merged 4 commits into from
Sep 11, 2024

Conversation

joshua-holmes
Copy link
Contributor

@joshua-holmes joshua-holmes commented Sep 10, 2024

Utilized previous Wayland implementation as a base, but made the following changes:

  • used separate structs for Linux and Wayland/X11, then placed properties in more-or-less the correct place. e.g. properties that belong to Wayland are in Wayland.zig. Properties that belong to any Linux implementation belong in Linux.zig. I did not do this perfectly, but it can be iterated on later (especially after X11 is implemented).
  • plugged Wayland into the new event loop
  • namespaced all of the listener code (registry_listener for example) because all the listeners consist of one or more functions, and an actual listener with is an instance of a struct that holds pointers to those functions. The functions aren't used anywhere else, so it made sense to me to package the listener struct and it's functions together under one namespace. Each listener has it's own namespace.
  • grouped the xkb modifier indices into their own struct because it looked cleaner to have them grouped, and they are always used together anyway
  • removed pieces of the old Wayland implementation that I was fairly confident were not necessary, e.g. calling wl_proxy_set_tag looked unnecessary because wl.tag was never set (which means maybe null was getting passed in?) and it doesn't look to me like that tag was never used anywhere else to reference the surface.
libwaylandclient.wl_proxy_set_tag(@ptrCast(wl.surface), @ptrCast(&wl.tag));
  • [ x] By selecting this checkbox, I agree to license my contributions to this project under the license(s) described in the LICENSE file, and I have the right to do so or have received permission to do so by an employer or client I am producing work for whom has this right.

@joshua-holmes joshua-holmes marked this pull request as ready for review September 11, 2024 06:49
@slimsag slimsag changed the title Reimplement Wayland core: reimplement Wayland support Sep 11, 2024
@slimsag slimsag merged commit 8eb2da1 into hexops:main Sep 11, 2024
3 checks passed
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.

2 participants