@blinry@chaos.social
Next, I tried to write some multi-mouse client applications!
My first attempt was a Rust program written using the smithay_client_toolkit. Events callbacks come with a reference to the "pointer" that caused it. In the logs to the left, you can see that I can in fact differentiate the two mouse devices there. Very neat, and a perfectly fine proof of concept.
But this library is super low-level. I wanted something more convenient for actually trying to write some fun demos.
@blinry@chaos.social
Next, I thought: Oh I know, I'll write a GTK application! So I fumbled my way through setting one up in Rust, and on adding a custom "widget" that can receive motion events.
Problem is: I know next to nothing about GTK. Do I really need to do:
let wayland_seat: WaylandSeat = seat.downcast::<WaylandSeat>().unwrap();
let wl_seat_ptr = gdk_wayland_seat_get_wl_seat(wayland_seat.to_glib_none().0);
to differentiate the event's seat? At least, this worked as well! But it would really slow me down.