use pointer coordinates from the passed event instead of calling

2008-10-20  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimpgradienteditor.c (view_events) 
(control_events):
	use pointer coordinates from the passed event instead of calling
	gtk_widget_get_pointer().


svn path=/trunk/; revision=27340
This commit is contained in:
Sven Neumann 2008-10-20 13:31:59 +00:00 committed by Sven Neumann
parent 236b1ba900
commit 8c6a7e8843
2 changed files with 16 additions and 16 deletions

View File

@ -1,10 +1,16 @@
2008-10-20 Sven Neumann <sven@sven>
2008-10-20 Sven Neumann <sven@gimp.org>
* app/widgets/gimpgradienteditor.c (view_events) (control_events):
use pointer coordinates from the passed event instead of calling
gtk_widget_get_pointer().
2008-10-20 Sven Neumann <sven@gimp.org>
* plug-ins/common/bump-map.c (dialog_preview_events): use pointer
coordinates from the passed event instead of calling
gtk_widget_get_pointer().
2008-10-20 Sven Neumann <sven@sven>
2008-10-20 Sven Neumann <sven@gimp.org>
* plug-ins/common/iwarp.c: set the OK and Reset button insensitive
until the user has defined a deformation to apply. Cleaned up

View File

@ -848,13 +848,10 @@ view_events (GtkWidget *widget,
case GDK_MOTION_NOTIFY:
{
GdkEventMotion *mevent = (GdkEventMotion *) event;
gint x, y;
gtk_widget_get_pointer (widget, &x, &y);
if (x != editor->view_last_x)
if (mevent->x != editor->view_last_x)
{
editor->view_last_x = x;
editor->view_last_x = mevent->x;
if (editor->view_button_down)
{
@ -862,11 +859,11 @@ view_events (GtkWidget *widget,
(mevent->state & GDK_CONTROL_MASK) ?
GIMP_COLOR_PICK_MODE_BACKGROUND :
GIMP_COLOR_PICK_MODE_FOREGROUND,
x);
mevent->x);
}
else
{
view_set_hint (editor, x);
view_set_hint (editor, mevent->x);
}
}
@ -1190,26 +1187,23 @@ control_events (GtkWidget *widget,
case GDK_MOTION_NOTIFY:
{
GdkEventMotion *mevent = (GdkEventMotion *) event;
gint x, y;
gtk_widget_get_pointer (editor->control, &x, &y);
if (x != editor->control_last_x)
if (mevent->x != editor->control_last_x)
{
editor->control_last_x = x;
editor->control_last_x = mevent->x;
if (GIMP_DATA_EDITOR (editor)->data_editable &&
editor->control_drag_mode != GRAD_DRAG_NONE)
{
if ((mevent->time - editor->control_click_time) >= GRAD_MOVE_TIME)
control_motion (editor, gradient, x);
control_motion (editor, gradient, mevent->x);
}
else
{
gimp_gradient_editor_update (editor);
control_do_hint (editor, x, y);
control_do_hint (editor, mevent->x, mevent->y);
}
}