segfault using extension events in Gtk2's scribble.pl



Hello There.

I am trying to modify muppet's excellent scribble.pl program (a simple
drawing program using Gtk2) to detect which input (touchpad/pen/eraser)
generates mouse event. Ultimately, I would like to draw differents things
depending on whether I use a touchpad or a stylus.

My understanding is that I need to activate the inputs generating the
"extended events", as well as indicate that I want to receive such extended
events.

I've attached my code at the end of this message. Besides adding debug lines
to print out which input is generating events, I've only added lines a few
lines that take care of the activation of the inputs (these seem to work
well). However, using

$drawing_area->set_extension_events("cursor");

results in segfault when issuing

$window->show;

later on.

Note that I successfully compile and execute the C code scribble-xinput.c
that does exactly what I want (though not in perl ;-). The C and perl code
have the same structure (at least from what I gather), so I know it should
work somehow, but I can't figure it out.

Any help greatly appreciated.

scribble.txt <http://gtk.10911.n7.nabble.com/file/n85892/scribble.txt>  



--
View this message in context: 
http://gtk.10911.n7.nabble.com/segfault-using-extension-events-in-Gtk2-s-scribble-pl-tp85892.html
Sent from the Gtk+ - Perl mailing list archive at Nabble.com.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]