Re: Motion events in a DrawingArea

2017-08-19 Thread Eric Cashon via gtk-perl-list
I just built the perl gtk3 module and when I ran the tests the add events and set events came up as failed. This is on Ubuntu16.04. I am new to perl so maybe this has already been resolved. Getting started with some tutorials from https://github.com/kevinphilp/Perl-gtk3-Tutorial and thing

Re: Motion events in a DrawingArea

2017-08-17 Thread Jeremy Volkening
On Thu, Aug 17, 2017 at 06:01:38PM +1000, Kevin Ryde via gtk-perl-list wrote: Daniel Kasak writes: $self->{drawing_area}->set_events( Gtk 2 is ->add_events() usually from INIT_INSTANCE to have extra events selected when realized, if that's still so. I also use add_events() rather than set_

Re: Motion events in a DrawingArea

2017-08-17 Thread Jeremy Volkening
On Wed, Aug 16, 2017 at 10:12:04PM +1000, Daniel Kasak wrote: Hi all. I'm trying to capture mouse events in a DrawingArea ( in Gtk3 ). I'm adapting code at http://www.perlmonks.org/?node_id=583578 ... but when Also, when I have used complex DrawingAreas in past projects, it was convenient to

Re: Motion events in a DrawingArea

2017-08-17 Thread Daniel Kasak
Thanks Torsten. I've gotten closer, and also reduced my app down to a minimal example - see below. So what's happening now is that my callback is being called, but *only* when I click+drag inside the drawing area. Is there a different signal that will fire for *just* mouse movements? In the exam

Re: Motion events in a DrawingArea

2017-08-17 Thread Daniel Kasak
gt; > Best wishes, > Max > > > Gesendet: Mittwoch, 16. August 2017 um 14:12 Uhr > Von: "Daniel Kasak" > An: "gtk-perl mailing list" > Betreff: Motion events in a DrawingArea > Hi all. > > I'm trying to capture mouse events in a DrawingArea

Re: Motion events in a DrawingArea

2017-08-17 Thread Kevin Ryde via gtk-perl-list
Daniel Kasak writes: > > $self->{drawing_area}->set_events( Gtk 2 is ->add_events() usually from INIT_INSTANCE to have extra events selected when realized, if that's still so. ___ gtk-perl-list mailing list gtk-perl-list@gnome.org https://mail.gnome.org

Re: Motion events in a DrawingArea

2017-08-16 Thread oldtechaa
You can just set up an anonymous signal handler like below: $window->signal_connect( 'realize' => sub { $window->set_events( [ 'button-press-mask', 'button-motion-mask', 'button-release-mask' ] );

Aw: Motion events in a DrawingArea

2017-08-16 Thread max . augsburg
rd to handle for event purposes...   Best wishes, Max     Gesendet: Mittwoch, 16. August 2017 um 14:12 Uhr Von: "Daniel Kasak" An: "gtk-perl mailing list" Betreff: Motion events in a DrawingArea Hi all. I'm trying to capture mouse events in a DrawingArea ( in Gtk

Motion events in a DrawingArea

2017-08-16 Thread Daniel Kasak
Hi all. I'm trying to capture mouse events in a DrawingArea ( in Gtk3 ). I'm adapting code at http://www.perlmonks.org/?node_id=583578 ... but when I go: $self->{drawing_area}->set_events( [ qw/ exposure-mask leave-notify-mask button-press-mask pointer-mo