segfault using extension events in Gtk2's

Hello There.

I am trying to modify muppet's excellent 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

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


results in segfault when issuing


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 <>  

View this message in context:
Sent from the Gtk+ - Perl mailing list archive at

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