From cfd6fb0a8ea93145597aef68cb443fc380325821 Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Thu, 12 Feb 2004 13:12:56 +0000 Subject: [PATCH] ignore double clicks so we don't grab the pointer away from the curves 2004-02-12 Michael Natterer * app/widgets/gimphistogramview.c (gimp_histogram_view_button_press): ignore double clicks so we don't grab the pointer away from the curves dialog. Fixes bug #132356. * app/tools/gimpcurvestool.c (curves_graph_events): ignore button press and release events from all buttons except the first one. --- ChangeLog | 9 +++++++++ app/tools/gimpcurvestool.c | 8 ++++++++ app/widgets/gimphistogramview.c | 2 +- 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 6b31a72df7..96dfd89352 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2004-02-12 Michael Natterer + + * app/widgets/gimphistogramview.c (gimp_histogram_view_button_press): + ignore double clicks so we don't grab the pointer away from the + curves dialog. Fixes bug #132356. + + * app/tools/gimpcurvestool.c (curves_graph_events): ignore button + press and release events from all buttons except the first one. + 2004-02-12 Michael Natterer Make sure that non-indexed images never have a colormap. diff --git a/app/tools/gimpcurvestool.c b/app/tools/gimpcurvestool.c index 59fe8d3ef4..57600be515 100644 --- a/app/tools/gimpcurvestool.c +++ b/app/tools/gimpcurvestool.c @@ -922,6 +922,9 @@ curves_graph_events (GtkWidget *widget, case GDK_BUTTON_PRESS: bevent = (GdkEventButton *) event; + if (bevent->button != 1) + return TRUE; + new_cursor = GDK_TCROSS; switch (c_tool->curves->curve_type[c_tool->channel]) @@ -963,6 +966,11 @@ curves_graph_events (GtkWidget *widget, return TRUE; case GDK_BUTTON_RELEASE: + bevent = (GdkEventButton *) event; + + if (bevent->button != 1) + return TRUE; + new_cursor = GDK_FLEUR; c_tool->grab_point = -1; diff --git a/app/widgets/gimphistogramview.c b/app/widgets/gimphistogramview.c index f3f6212056..4bedff1ac9 100644 --- a/app/widgets/gimphistogramview.c +++ b/app/widgets/gimphistogramview.c @@ -386,7 +386,7 @@ gimp_histogram_view_button_press (GtkWidget *widget, { GimpHistogramView *view = GIMP_HISTOGRAM_VIEW (widget); - if (bevent->button == 1) + if (bevent->type == GDK_BUTTON_PRESS && bevent->button == 1) { gint width;