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

Wayland: multiseat, new protocols and other random fixes #1250

Merged
merged 6 commits into from
Jan 30, 2024

Conversation

alebastr
Copy link
Contributor

@alebastr alebastr commented Jan 10, 2024

A bunch of fixes for Wayland backend:

  • Complete multiseat support
  • ext-idle-notify-v1, required by wlroots >= 0.17
  • cursor-shape-v1 for compositor-rendered cursors to reduce headache with themes and scaling
  • Support for global.monitor = <name> (eDP-1, etc...)

Tested on Fedora 39 and FreeBSD 14. Haven't tried with older systems, but everything version-dependent should be properly guarded.
Cursor-shape and ext-idle-notify could be tested with a compositor already ported to the new wlroots (Sway master or v1.9 branches).

I'm 100% unsure about the X11 impl for monitor names. It's only been tested with XWayland, and frankly I'm not familiar with the Xlib.

Fixes: #1132
Likely also addresses #1214

@codecov-commenter
Copy link

codecov-commenter commented Jan 10, 2024

Codecov Report

Attention: 188 lines in your changes are missing coverage. Please review.

Comparison is base (d314806) 66.17% compared to head (728b302) 65.24%.

Files Patch % Lines
src/wayland/wl.c 0.00% 148 Missing ⚠️
src/x11/screen.c 0.00% 18 Missing ⚠️
.../wayland/protocols/cursor-shape-v1-client-header.h 0.00% 11 Missing ⚠️
...yland/protocols/ext-idle-notify-v1-client-header.h 0.00% 11 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1250      +/-   ##
==========================================
- Coverage   66.17%   65.24%   -0.93%     
==========================================
  Files          46       48       +2     
  Lines        7696     7847     +151     
==========================================
+ Hits         5093     5120      +27     
- Misses       2603     2727     +124     
Flag Coverage Δ
unittests 65.24% <13.36%> (-0.93%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@alebastr alebastr marked this pull request as draft January 10, 2024 11:35
@alebastr alebastr marked this pull request as ready for review January 11, 2024 05:00
@Narrat
Copy link

Narrat commented Jan 12, 2024

Tested the branch and at least the warning mentioned in #1214 seems to be gone.
But didn't had the impression it was working. But I need to test that further.

@alebastr
Copy link
Contributor Author

Tested the branch and at least the warning mentioned in #1214 seems to be gone. But didn't had the impression it was working. But I need to test that further.

Can you set a very short (like 10s short) idle_threshold, start dunst as WAYLAND_DEBUG=client dunst -verbosity debug and collect the output?

I've been testing various corner-cases with Sway 1.9 snapshot and everything has been working so far. labwc shouldn't have any significant differences in behavior with Sway.

@Narrat
Copy link

Narrat commented Jan 13, 2024

All good. Can confirm this PR does fix #1214
I hadn't noticed that I removed the setting from the config (and the default seems to be to not set a time)? Typical user error :D
Thank you for the work on the wayland related side of things

@fwsmit
Copy link
Member

fwsmit commented Jan 14, 2024

Thanks for this much needed wayland work! With a quick look, the X11 impl seems to be fine as well, but I'm not too familiar with the xlib either. If someone is able to test it on X11, that would be great.

Makefile Show resolved Hide resolved
src/wayland/protocols.c Outdated Show resolved Hide resolved
@fwsmit
Copy link
Member

fwsmit commented Jan 25, 2024

I've taken a look at all the code. I have some questions and minor things, but over all it looks good.

@fwsmit
Copy link
Member

fwsmit commented Jan 30, 2024

The wl.c file is getting a bit big and could use some refactoring to separate files. I'm not saying it should happen in this PR, but this PR does make it a little bit bigger as well.

@fwsmit
Copy link
Member

fwsmit commented Jan 30, 2024

Thanks for all the fixes and wayland features! Now dunst is up to date with the protocols again

@fwsmit
Copy link
Member

fwsmit commented Jan 30, 2024

I'll go and merge this PR. If you want to work on refactoring the wayaland code a bit, that would be cool. But don't feel obliged :)

@fwsmit fwsmit merged commit ed5bcb4 into dunst-project:master Jan 30, 2024
18 checks passed
@alebastr alebastr deleted the wayland-protocols-and-fixes branch January 31, 2024 02:07
@alebastr
Copy link
Contributor Author

The wl.c file is getting a bit big and could use some refactoring to separate files. I'm not saying it should happen in this PR, but this PR does make it a little bit bigger as well.

I'll take a look. An obvious idea is to split seat-related code to src/wayland/seat.c, but there's a couple of things to address before I'll be able to do that.

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.

Wayland: Monitor number makes it difficult to consistently choose the correct display
4 participants