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.idle_notify: Update to version 2 #1618

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

PolyMeilex
Copy link
Member

@jjramsey
Copy link

I found a problem when trying to compile my own fork of Niri against this fork of Smithay:

error[E0599]: no variant named `GetInputIdleNotification` found for enum `wayland_protocols::ext::idle_notify::v1::server::ext_idle_notifier_v1::Request`
   --> /niri/.cargo/git/checkouts/smithay-59e1c6e9803bea8c/d7fa8ae/src/wayland/idle_notify/mod.rs:301:44
    |
301 |             ext_idle_notifier_v1::Request::GetInputIdleNotification { id, timeout, seat } => {
    |                                            ^^^^^^^^^^^^^^^^^^^^^^^^
    |
help: there is a variant with a similar name
    |
301 |             ext_idle_notifier_v1::Request::GetIdleNotification { id, timeout, seat } => {
    |                                            ~~~~~~~~~~~~~~~~~~~

   Compiling pango v0.20.4
   Compiling pangocairo v0.20.4
For more information about this error, try `rustc --explain E0599`.
error: could not compile `smithay` (lib) due to 1 previous error

(FWIW, I'm using a modified PKGBUILD of the niri-git AUR package to do the build of Niri, which I've done before.)

My rustc version is 1.83.0.

@PolyMeilex
Copy link
Member Author

This uses patched version of wayland-rs, so perhaps try to include this in niri cargo.toml:

[patch.crates-io]
wayland-egl = { git = "https://github.com/PolyMeilex/wayland-rs.git", branch = "ext-idle-notify-2" }
wayland-protocols = { git = "https://github.com/PolyMeilex/wayland-rs.git", branch = "ext-idle-notify-2" }
wayland-protocols-wlr = { git = "https://github.com/PolyMeilex/wayland-rs.git", branch = "ext-idle-notify-2" }
wayland-protocols-misc = { git = "https://github.com/PolyMeilex/wayland-rs.git", branch = "ext-idle-notify-2" }
wayland-server = { git = "https://github.com/PolyMeilex/wayland-rs.git", branch = "ext-idle-notify-2" }
wayland-cursor = { git = "https://github.com/PolyMeilex/wayland-rs.git", branch = "ext-idle-notify-2" }
wayland-client = { git = "https://github.com/PolyMeilex/wayland-rs.git", branch = "ext-idle-notify-2" }
wayland-sys = { git = "https://github.com/PolyMeilex/wayland-rs.git", branch = "ext-idle-notify-2" }
wayland-backend = { git = "https://github.com/PolyMeilex/wayland-rs.git", branch = "ext-idle-notify-2" }
wayland-scanner = { git = "https://github.com/PolyMeilex/wayland-rs.git", branch = "ext-idle-notify-2" }

@jjramsey
Copy link

Good news and bad news: I got Niri to compile and run, but my fork of Workrave doesn't behave any differently under Niri (e.g., it still does the wrong thing when using mpv to play a video). The fork of Workrave does do the right thing with Sway using my forks of wlroots, though.

@jjramsey
Copy link

Another bit of bad news. I compiled my fork of cosmic-comp against your fork of Smithay, and my fork of Workrave has the same issues on cosmic-comp as it does on Niri.

That would seem to rule out Niri being the problem.

@PolyMeilex
Copy link
Member Author

PolyMeilex commented Dec 31, 2024

My bad, forgot to bump the version, this line should have 2 instead of 1 as a first arg:
https://github.com/PolyMeilex/smithay/blob/d7fa8aeeb6f28fb17219361f828b74350baa9d21/src/wayland/idle_notify/mod.rs#L119

Like so:

let global = display.create_global::<D, ExtIdleNotifierV1, _>(2, ());

@jjramsey
Copy link

jjramsey commented Dec 31, 2024

That tracks with my own tests. When I turned tracing on in Workrave, I saw, "Falling back to version of ext-idle-notify-v1 protocol that does not support ignoring idle inhibitors" in the trace logs under both Cosmic and Niri.

If you could put the version bump into the ext-idle-notify-2 branch, that would be great.

ETA: I just tested both Niri and Cosmic with the version bumped manually in the Smithay source, and fixing the version did the trick.

@jjramsey
Copy link

jjramsey commented Jan 2, 2025

Like so:

let global = display.create_global::<D, ExtIdleNotifierV1, _>(2, ());

Do you plan to add a commit to your ext-idle-notify-2 branch with that version bump? That would insure that this merge request has all the desired changes needed for an updated ext-idle-notify protocol to work.

@PolyMeilex
Copy link
Member Author

Should be good now

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.

2 participants