Commit Graph

9 Commits

Author SHA1 Message Date
Michael Natterer c7b9728cc8 app: make handling of coordinates more robust against broken input drivers
Initialize the axes[] array with zeros and change pressure curve
mapping to not try to "interpolate" shit like NaN and crash.
2012-09-05 11:36:44 +02:00
Michael Natterer 867da8f293 app: add gimp_context_get_foreground,background_pixel()
which takes a Babl format to convert from/to.
Include <gegl.h> in a million places.
2012-05-02 17:50:41 +02:00
Michael Natterer 01f92a3b48 app: get rid of server grabs for almost all canvas interaction
Because it's generally the right thing to do, and server grabs broke
badly with input devices / client side windows.

gimpdisplayshell-grab.c: change logic to only server-grab if an event
is passed to the pointer grab/ungrab functions, but always use
gtk_grab_add/remove() which is sufficient in most cases.

gimpdisplayshell-tool-events.c: have the grab functions grab the
server only for space-bar scrolling and do all tool interaction,
including ruler clicks, with gtk_grab_add/remove(). Refactor things
a bit to also use the grab API for button-2 scrolling.

gimpdeviceinfo-coords.c: transform the event's coords to the canvas'
coordinate system, they might come from a ruler now.

This fixes the following bugs:

Bug 645315 - gimp_display_shell_pointer_grab: gdk_pointer_grab failed...
Bug 644351 - Gimp misses some strokes especially when drawing fast
Bug 645747 - Gimp is now unusable on xfce4
2011-12-09 20:20:02 +01:00
Michael Natterer 1bff2c8df2 app: sprinkle const qualifiers in the tool event callback functions 2011-05-31 23:18:11 +02:00
Michael Natterer 92f130fbc3 app: also run device history coords through the axis mapping curve function 2011-02-06 13:26:25 +01:00
Michael Natterer 5caee48645 app: run all input axes through gimp_device_info_map_axis()
and let that function alone worry about whether there actually is a
curve for that axis.
2010-12-20 20:00:47 +01:00
Michael Natterer 2a92f57577 app: actually use the device's pressure curve to map the pressure axis
unfortunately i have no way of testing this, so please test...
2010-02-16 13:27:46 +01:00
Michael Natterer 828e4d8452 app: some formatting before real changes happen 2010-02-16 13:05:17 +01:00
Michael Natterer 5af05cce0b app: move the entire get-coords API from GimpDisplayShell to GimpDeviceInfo
because GimpDeviceInfo will soon apply curves to the axes. Also change
everything to speak in terms of GimpDeviceInfo instead of GdkDevice.
2010-02-16 13:00:46 +01:00