-
Notifications
You must be signed in to change notification settings - Fork 350
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: Support xdg-shell as a fallback #1433
base: master
Are you sure you want to change the base?
Conversation
a1bae20
to
e293572
Compare
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #1433 +/- ##
==========================================
- Coverage 65.32% 64.57% -0.75%
==========================================
Files 50 51 +1
Lines 8763 8864 +101
Branches 1034 1046 +12
==========================================
Hits 5724 5724
- Misses 3039 3140 +101
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Update the xdg-shell client protocol to the one included in wayland-protocols 1.39 . This prevent the following error when using the xdg-shell protocol: interface 'xdg_toplevel' has no event 3 It was updated using the relevant wayland-scanner commands from the wayland-protocols make target in a Debian Buster container against the xdg-shell.xml file included in version 1.39. Upstream-Status: Submitted [dunst-project#1433]
Support the xdg-shell wayland protocol as a fallback in case the wlr-layer-shell-unstable-v1 protocol is not present. This allows running dunst on wayland compositors not supporting the layer shell protocol. Note that the xdg-shell protocol doesn't allow dunst to specify where it should be displayed on the screen. Therefore it is only chosen, when the layer-shell protocol is not available. Upstream-Status: Submitted [dunst-project#1433]
The
As the code generated with my While this caused an older wayland-scanner executable being used (1.16 from Debian buster) for the code generation, it uses the xdg_shell protocol file from the current wayland-protocols 1.39 release. |
Update the xdg-shell client protocol to the one included in wayland-protocols 1.39 . This prevent the following error when using the xdg-shell protocol: interface 'xdg_toplevel' has no event 3 It was updated using the relevant wayland-scanner commands from the wayland-protocols make target in a Debian Buster container against the xdg-shell.xml file included in version 1.39. Upstream-Status: Submitted [dunst-project#1433]
Support the xdg-shell wayland protocol as a fallback in case the wlr-layer-shell-unstable-v1 protocol is not present. This allows running dunst on wayland compositors not supporting the layer shell protocol. Note that the xdg-shell protocol doesn't allow dunst to specify where it should be displayed on the screen. Therefore it is only chosen, when the layer-shell protocol is not available. Upstream-Status: Submitted [dunst-project#1433]
I made the initial Wayland version of dunst (mostly copy pasted from the Mako notification daemon). I dont have time right now to look at it, but i can take a look at it in a week. |
Looking at the packages depending on the Arch Linux wayland-protocols package, the common way seems to depend on the But it requires to check for the wayland-protocols version and dynamically set macros to support potentially missing fields (see wl-clipboard as an example) |
I'm not sure if supporting GNOME is a worthy reason to complicate the code. GNOME has its own notification daemon as an integral part of the shell, and it actually works better than anything third-party.
This could be solved without touching the protocol files by binding to Requesting version 5 also breaks dunst with older compositors (anything before wlroots 0.18):
I suggest doing something like this: ctx.xdg_shell = wl_registry_bind(registry, name,
- &xdg_wm_base_interface, 5);
+ &xdg_wm_base_interface, MIN(version, 3));
xdg_wm_base_add_listener(ctx.xdg_shell, &xdg_wm_base_listener, NULL); and removing the protocol change commit. Some changes in wl.c look suspicious, but I haven't touched the dunst code for almost a year. I'll try to find time for a closer look within a week. |
Support the xdg-shell wayland protocol as a fallback in case the wlr-layer-shell-unstable-v1 protocol is not present. This allows running dunst on wayland compositors not supporting the layer shell protocol. Note that the xdg-shell protocol doesn't allow dunst to specify where it should be displayed on the screen. Therefore it is only chosen, when the layer-shell protocol is not available.
e293572
to
840ccfd
Compare
The main use case is weston with the ivi-shell, which allows to programmatically control the window layout. Without an external window positioning system, it is not really useful for a day to day use (resulting from the fact that the xdg-shell doesn't provide the means to set the global window positions). But it might be useful in case of development, where you're just interested in testing some input, D-Bus or rendering changes (e.g. avoid having to spawn a nested compositor on a GNOME/Weston desktop).
oh, thanks. I was thinking "latest is greatest" when deciding what to use for the version and didn't realize that you want to use the lowest version number required for your application. As I also don't seem to use anything from version 2 or 3, I've now fixed it to version 1 for the broadest range of compability (and removed the protocol change commit). |
Support the xdg-shell wayland protocol as a fallback in case the wlr-layer-shell-unstable-v1 protocol is not present. This allows running dunst on wayland compositors not supporting the layer shell protocol.
Note that the xdg-shell protocol doesn't allow dunst to specify where it should be displayed on the screen. Therefore it is only chosen, when the layer-shell protocol is not available.
Currently this allows dunst to also run on the Gnome shell (using a different session D-Bus) and weston.