summaryrefslogtreecommitdiff
path: root/panels/display
diff options
context:
space:
mode:
authorBenjamin Berg <benjamin@sipsolutions.net>2012-09-16 17:09:45 -0400
committerMatthias Clasen <mclasen@redhat.com>2012-09-16 17:09:45 -0400
commita61f0654b98357283ef68bea6d827aabc0a2779e (patch)
tree9872ec4caee60e2247ce4f085f7cae2fc87ef920 /panels/display
parentbfca71076d654f91190b2349ad481aff9490c148 (diff)
downloadgnome-control-center-a61f0654b98357283ef68bea6d827aabc0a2779e.tar.gz
display: Fix coordinate calculations
https://bugzilla.gnome.org/show_bug.cgi?id=681475
Diffstat (limited to 'panels/display')
-rw-r--r--panels/display/scrollarea.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/panels/display/scrollarea.c b/panels/display/scrollarea.c
index d705f0273..995872da9 100644
--- a/panels/display/scrollarea.c
+++ b/panels/display/scrollarea.c
@@ -1194,17 +1194,10 @@ user_to_device (double *x, double *y,
gdouble ox, oy;
user_to_device_data* data = user_data;
- /* Required in case the user does transformations (eg. translates) */
+ /* The translations by the user */
cairo_user_to_device (data->cr, x, y);
- /* The device offset is different for a full redraw.
- * So we cannot make assumptions about it. */
- cairo_surface_get_device_offset(cairo_get_target(data->cr), &ox, &oy);
-
- *x -= ox;
- *y -= oy;
-
- /* The input_window does not of the allocation offset. */
+ /* The position of the widget on the window. */
*x -= data->allocation.x;
*y -= data->allocation.y;
}