Skip to content

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

Merged
fwsmit merged 6 commits into
dunst-project:masterfrom
alebastr:wayland-protocols-and-fixes
Jan 30, 2024
Merged

Wayland: multiseat, new protocols and other random fixes#1250
fwsmit merged 6 commits into
dunst-project:masterfrom
alebastr:wayland-protocols-and-fixes

Conversation

@alebastr

@alebastr alebastr commented Jan 10, 2024

Copy link
Copy Markdown
Contributor

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

@alebastr alebastr force-pushed the wayland-protocols-and-fixes branch from ec669ce to ee3b934 Compare January 10, 2024 11:31
@codecov-commenter

codecov-commenter commented Jan 10, 2024

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 13.36406% with 188 lines in your changes missing coverage. Please review.
✅ Project coverage is 64.56%. Comparing base (2fcea84) to head (ea9e2fb).
⚠️ Report is 443 commits behind head on master.

Files with missing lines 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   65.45%   64.56%   -0.89%     
==========================================
  Files          46       48       +2     
  Lines        7749     7900     +151     
==========================================
+ Hits         5072     5101      +29     
- Misses       2677     2799     +122     
Flag Coverage Δ
unittests 64.56% <13.36%> (-0.89%) ⬇️

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@alebastr alebastr marked this pull request as draft January 10, 2024 11:35
@alebastr alebastr force-pushed the wayland-protocols-and-fixes branch from 92fd4c2 to e0a95a8 Compare January 11, 2024 04:58
@alebastr alebastr marked this pull request as ready for review January 11, 2024 05:00
@Narrat

Narrat commented Jan 12, 2024

Copy link
Copy Markdown

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
Copy Markdown
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.

@alebastr alebastr force-pushed the wayland-protocols-and-fixes branch from e0a95a8 to 728b302 Compare January 13, 2024 14:23
@Narrat

Narrat commented Jan 13, 2024

Copy link
Copy Markdown

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

fwsmit commented Jan 14, 2024

Copy link
Copy Markdown
Member

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.

Comment thread Makefile
Comment thread src/wayland/wl.c
Comment thread src/wayland/wl.c
Comment thread src/wayland/protocols.c Outdated
@fwsmit

fwsmit commented Jan 25, 2024

Copy link
Copy Markdown
Member

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

@alebastr alebastr force-pushed the wayland-protocols-and-fixes branch from 728b302 to ea9e2fb Compare January 25, 2024 14:35
Comment thread src/wayland/wl.c
@fwsmit

fwsmit commented Jan 30, 2024

Copy link
Copy Markdown
Member

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

fwsmit commented Jan 30, 2024

Copy link
Copy Markdown
Member

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

@fwsmit

fwsmit commented Jan 30, 2024

Copy link
Copy Markdown
Member

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
@alebastr alebastr deleted the wayland-protocols-and-fixes branch January 31, 2024 02:07
@alebastr

Copy link
Copy Markdown
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