gtk-rs / gtk3-rs

Rust bindings for GTK 3
https://gtk-rs.org
MIT License
508 stars 90 forks source link

Should `gdk::Event::is_pointer_emulated` really take a `&mut self`? #625

Closed jneem closed 3 years ago

jneem commented 3 years ago

The gdk::Event::is_pointer_emulated method takes a &mut self argument, but it sounds like maybe it should take a &self? I'd be happy to send a PR if this is indeed the case.

sdroege commented 3 years ago

Yes it shouldn't take a mutable reference. If you send a PR, please also check if any other event getters have the same problem. Thanks!

bilelmoussaoui commented 3 years ago

Seems to be something wrong on either the introspection data side of things or gir. See https://gitlab.gnome.org/World/Rust/libhandy-rs/-/issues/19

jneem commented 3 years ago

Hm, does that mean that I need to fix something in gir? Or is it ok just to modify gdk/src/event.rs?

bilelmoussaoui commented 3 years ago

Hm, does that mean that I need to fix something in gir? Or is it ok just to modify gdk/src/event.rs?

It's fine to fix it on gdk's side for now, but i would open an issue to investigate it either on gir's side or here in gtk3

sdroege commented 3 years ago

How is gir relevant here? It's manually bound, so a simple human mistake in the code :)

sdroege commented 3 years ago

See https://github.com/gtk-rs/gtk3-rs/pull/626