From 321428fee7b38deeefa2ad491efca8cfe795f8d8 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 4 Mar 2006 05:26:29 +0000 Subject: [PATCH] Adjust the handling of min values for the x and y axes of extended input MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 2006-03-04 Matthias Clasen * gdk/x11/gdkinput-x11 (gdk_input_translate_coordinates): Adjust the handling of min values for the x and y axes of extended input devices (#324562, #142536, Denis Auroux and Robert Ögren) --- ChangeLog | 5 +++++ ChangeLog.pre-2-10 | 5 +++++ gdk/x11/gdkinput-x11.c | 6 ++++-- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5a68551c1..2501733db 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2006-03-04 Matthias Clasen + * gdk/x11/gdkinput-x11 (gdk_input_translate_coordinates): + Adjust the handling of min values for the x and y axes of + extended input devices (#324562, #142536, Denis Auroux and + Robert Ögren) + * gtk/gtkexpander.c (gtk_expander_paint_focus): Position the focus rectangle correctly in RTL mode. (#333291, Benjamin Berg) diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 5a68551c1..2501733db 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,5 +1,10 @@ 2006-03-04 Matthias Clasen + * gdk/x11/gdkinput-x11 (gdk_input_translate_coordinates): + Adjust the handling of min values for the x and y axes of + extended input devices (#324562, #142536, Denis Auroux and + Robert Ögren) + * gtk/gtkexpander.c (gtk_expander_paint_focus): Position the focus rectangle correctly in RTL mode. (#333291, Benjamin Berg) diff --git a/gdk/x11/gdkinput-x11.c b/gdk/x11/gdkinput-x11.c index 64485aab8..8a7cf1451 100644 --- a/gdk/x11/gdkinput-x11.c +++ b/gdk/x11/gdkinput-x11.c @@ -511,12 +511,14 @@ gdk_input_translate_coordinates (GdkDevicePrivate *gdkdev, switch (gdkdev->info.axes[i].use) { case GDK_AXIS_X: - axis_out[i] = x_offset + x_scale * axis_data[x_axis]; + axis_out[i] = x_offset + x_scale * (axis_data[x_axis] - + gdkdev->axes[x_axis].min_value); if (x_out) *x_out = axis_out[i]; break; case GDK_AXIS_Y: - axis_out[i] = y_offset + y_scale * axis_data[y_axis]; + axis_out[i] = y_offset + y_scale * (axis_data[y_axis] - + gdkdev->axes[y_axis].min_value); if (y_out) *y_out = axis_out[i]; break;