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

wip: devdraw: wayland support #550

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Conversation

hdonnay
Copy link

@hdonnay hdonnay commented Apr 18, 2022

Absolutum obsoletum

I'm currently using this day-to-day, but there's a few things I need to do before I think this is ready:

  • Implement two-edge resizes (e.g. click lower-right corner allows you to resize in both dimensions)
  • There's flickering when resizing
  • Pretty sure there's some races around reading and writing to the big window struct
  • Need to take a style pass
  • Documentation
  • src/cmd/snarfer
  • Need to figure out how much Linux application-specific stuff is acceptable in the repo (e.g. XDG desktop files?)

Some notes on what this is doing:

  • devdraw was unconditionally calling the "native" free for Memimage *, so this changes that
  • the 9l script gains special casing around wayland because the real name of the libraries (wayland-client and wayland-cursor) don't play nice with the AUTOLIB macro.
  • Adds a WSYSTYPE for wayland and makes that work in the relevant places

Some notable features:

  • Pointer warping works! (The running X11 devdraw under XWayland+GNOME doesn't work currently, but this may be a GNOME bug)
  • Cursor swapping works

Without this, it's possible for a Memimage* from a custom allocmemimage
to get passed to libdraw's implementation of freememimage.

Signed-off-by: Hank Donnay <hdonnay@gmail.com>
Absolutum obsoletum

Signed-off-by: Hank Donnay <hdonnay@gmail.com>
@gdiazlo
Copy link
Contributor

gdiazlo commented Jun 7, 2022

I am unable to get it working on my system (fedora 36/ nvidia gpu):

% /usr/local/plan9/bin/acme
app_id: /usr/local/plan9/bin/acme
[destroyed object]: error 1: invalid width, height or stride (1600x1200, 6400)

should it work with nvidia or this is expected?

@hdonnay
Copy link
Author

hdonnay commented Jun 7, 2022

ah, I think that's a HiDPI bug. I'll look into it when I get a chance.

@DeedleFake
Copy link

I wanted an easier way to build and install this, so I went and modified the plan9port-git AUR package and created plan9port-wayland-git.

@OctopusET
Copy link

This won't work for wlroot based compositor such as sway. Because they only support version 2 of xdg-shell

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.

None yet

4 participants