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

Related to the deprecation of MainContext::channel in GTK on Linux. #985

Open
Zamoca42 opened this issue Sep 30, 2024 · 1 comment
Open

Comments

@Zamoca42
Copy link
Contributor

Is your feature request related to a problem? Please describe.

A warning is currently being issued that glib::MainContext::channel is deprecated in the Linux event loop-related code.

warning: use of deprecated associated function `gtk::glib::main_context_channel::<impl gtk::glib::MainContext>::channel`: Use an async channel, from async-channel for example, on the main context using spawn_future_local() instead
   --> src/platform_impl/linux/event_loop.rs:227:71
    |
227 |     let (window_requests_tx, window_requests_rx) = glib::MainContext::channel(Priority::default());
    |                                                                       ^^^^^^^
    |
    = note: `#[warn(deprecated)]` on by default

warning: use of deprecated associated function `gtk::glib::main_context_channel::<impl gtk::glib::MainContext>::channel`: Use an async channel, from async-channel for example, on the main context using spawn_future_local() instead
   --> src/platform_impl/linux/event_loop.rs:241:55
    |
241 |       let (device_tx, device_rx) = glib::MainContext::channel(glib::Priority::default());
    |                                                       ^^^^^^^

Describe the solution you'd like

We can update the currently used MainContext::channel to async_channel in event_loop.rs on Linux.

Additional context

See: https://gtk-rs.org/gtk4-rs/stable/latest/book/main_event_loop.html or https://discourse.gnome.org/t/help-required-to-migrate-from-dropped-maincontext-channel-api/20922

@amrbashir
Copy link
Member

we are not using gtk4, and we don't plan to anytime soon so I think we can ignore this for the time being.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants