Skip to content

Wayland: suport GTK/CSS cursor names#1276

Merged
bynect merged 1 commit intodunst-project:masterfrom
alebastr:wayland-cursor-name
Feb 29, 2024
Merged

Wayland: suport GTK/CSS cursor names#1276
bynect merged 1 commit intodunst-project:masterfrom
alebastr:wayland-cursor-name

Conversation

@alebastr
Copy link
Copy Markdown
Contributor

@alebastr alebastr commented Feb 4, 2024

Adwaita, the default icon theme for many distributions, decided to stop providing legacy Xcursor icons in favor of the GTK/CSS names1. This requires us to probe for "default" instead of the "left_ptr", as the latter is no longer available in Adwaita.
Keep the fallback to "left_ptr" for more conservative themes.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Feb 4, 2024

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

Codecov Report

❌ Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 64.46%. Comparing base (9a437ab) to head (ccc8540).
⚠️ Report is 354 commits behind head on master.

Files with missing lines Patch % Lines
src/wayland/wl.c 0.00% 4 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1276      +/-   ##
==========================================
- Coverage   64.48%   64.46%   -0.02%     
==========================================
  Files          48       48              
  Lines        7918     7920       +2     
==========================================
  Hits         5106     5106              
- Misses       2812     2814       +2     
Flag Coverage Δ
unittests 64.46% <0.00%> (-0.02%) ⬇️

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.

Adwaita, the default icon theme for many distributions, decided to stop
providing legacy Xcursor icons in favor of the GTK/CSS names[1].
This requires us to probe for "default" instead of the "left_ptr", as
the latter is no longer available in Adwaita.
Keep the fallback to "left_ptr" for more conservative themes.

[1]: https://gitlab.gnome.org/GNOME/adwaita-icon-theme/-/commit/74e9b79471236320d2af4925d6c5bb7df22380ce
@bynect
Copy link
Copy Markdown
Contributor

bynect commented Feb 29, 2024

I was wondering if it isn't better to first check for left_ptr and use default as a fallback. Because I was searching around and SDL checks first for left_ptr.

@alebastr
Copy link
Copy Markdown
Contributor Author

Doesn't really matter, left_ptr and default should be equivalent in all the themes that have both (that's any cursor theme updated within the past decade).

I've seen both orders in major projects, and some projects don't even have a fallback to left_ptr.

@bynect
Copy link
Copy Markdown
Contributor

bynect commented Feb 29, 2024

Thanks for the information, I'll merge the pr 👍🏻

Also, sorry to bother you but I am not really familiar with the wayland output. Do you know if/how to support for transparent colors in wayland? Is it already working?

@bynect bynect merged commit 4a393d6 into dunst-project:master Feb 29, 2024
@alebastr
Copy link
Copy Markdown
Contributor Author

Also, sorry to bother you but I am not really familiar with the wayland output. Do you know if/how to support for transparent colors in wayland? Is it already working?

It works if you specify the colors in RGBA format. E.g. notify-send -h string:bgcolor:#0000007f ...

@alebastr alebastr deleted the wayland-cursor-name branch February 29, 2024 10:56
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.

3 participants