mirror of https://github.com/GNOME/gimp.git
applied patch from Philip Lafleur that fixes color picking for XInput
2004-05-27 Sven Neumann <sven@gimp.org> * libgimpwidgets/gimppickbutton.c: applied patch from Philip Lafleur that fixes color picking for XInput devices (bug #143166).
This commit is contained in:
parent
a37780d572
commit
60776ef93f
|
@ -1,3 +1,8 @@
|
||||||
|
2004-05-27 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
|
* libgimpwidgets/gimppickbutton.c: applied patch from Philip
|
||||||
|
Lafleur that fixes color picking for XInput devices (bug #143166).
|
||||||
|
|
||||||
2004-05-27 Sven Neumann <sven@gimp.org>
|
2004-05-27 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
* app/display/gimpdisplayshell-draw.c
|
* app/display/gimpdisplayshell-draw.c
|
||||||
|
|
|
@ -342,8 +342,15 @@ gimp_pick_button_mouse_motion (GtkWidget *invisible,
|
||||||
GdkEventMotion *event,
|
GdkEventMotion *event,
|
||||||
GimpPickButton *button)
|
GimpPickButton *button)
|
||||||
{
|
{
|
||||||
|
gint x_root;
|
||||||
|
gint y_root;
|
||||||
|
|
||||||
|
gdk_window_get_origin (event->window, &x_root, &y_root);
|
||||||
|
x_root += event->x;
|
||||||
|
y_root += event->y;
|
||||||
|
|
||||||
gimp_pick_button_pick (gdk_event_get_screen ((GdkEvent *) event),
|
gimp_pick_button_pick (gdk_event_get_screen ((GdkEvent *) event),
|
||||||
event->x_root, event->y_root, button);
|
x_root, y_root, button);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -353,11 +360,18 @@ gimp_pick_button_mouse_release (GtkWidget *invisible,
|
||||||
GdkEventButton *event,
|
GdkEventButton *event,
|
||||||
GimpPickButton *button)
|
GimpPickButton *button)
|
||||||
{
|
{
|
||||||
|
gint x_root;
|
||||||
|
gint y_root;
|
||||||
|
|
||||||
if (event->button != 1)
|
if (event->button != 1)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
gdk_window_get_origin (event->window, &x_root, &y_root);
|
||||||
|
x_root += event->x;
|
||||||
|
y_root += event->y;
|
||||||
|
|
||||||
gimp_pick_button_pick (gdk_event_get_screen ((GdkEvent *) event),
|
gimp_pick_button_pick (gdk_event_get_screen ((GdkEvent *) event),
|
||||||
event->x_root, event->y_root, button);
|
x_root, y_root, button);
|
||||||
|
|
||||||
gimp_pick_button_shutdown (button);
|
gimp_pick_button_shutdown (button);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue