On 12/12/2018 21:42, Jeff wrote:
I've subclassed Goo::Canvas2 to add panning and zooming via the mouse. It works well, apart from the fact that panning tends to "bounce" if the the user tries to pan too fast.
If anyone is interested, I was able to work around this problem by using the root window coordinates, rather than those returned by the event, as panning is only interested in the relative mouse movement since the last event: my $display = Gtk3::Gdk::Display::get_default; my $manager = $display->get_device_manager; my $device = $manager->get_client_pointer; my ( $screen, $x, $y ) = $device->get_position; Regards Jeff
Attachment:
signature.asc
Description: OpenPGP digital signature