hi Felix, On Thu, Jan 25, 2007 at 04:46:12PM +0100, Felix E. Klee wrote: > Exactly: I don't want to move the cursor outside of the Window. > [...] > Concerning the Gimp looking at the GTK+ documentation is probably more > straight forward than looking at the Gimp's source code.
Both gtk and pygtk come with a 'scribble-xinput' example. This is a good place to start. Here is some python code I use in MyPaint: def init_input(): "make those pressure sensitive devices working" pressure_devices = [] for device in gdk.devices_list(): if device.source in [gdk.SOURCE_PEN, gdk.SOURCE_ERASER]: pressure_devices.append(device) if pressure_devices: print 'Setting "screen mode" for pressure_sensitive devices:' for device in pressure_devices: print device.name device.set_mode(gdk.MODE_SCREEN) else: print 'No pressure sensitive devices found.' If you use "window mode" instead of screen mode you will probably get what you want. bye, Martin ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Linuxwacom-discuss mailing list Linuxwacom-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxwacom-discuss