diff -Nru gnome-control-center-3.4.2/debian/changelog gnome-control-center-3.4.2/debian/changelog --- gnome-control-center-3.4.2/debian/changelog 2012-10-09 11:04:01.000000000 -0400 +++ gnome-control-center-3.4.2/debian/changelog 2012-12-14 18:44:46.000000000 -0500 @@ -1,3 +1,11 @@ +gnome-control-center (1:3.4.2-0ubuntu19+bug1043769.1) quantal; urgency=low + + * debian/patches/git-display-Fix-mouse-events-not-working-in-preview.patch + debian/patches/git-display-Fix-coordinate-calculations.patch + - fix selecting and moving display images (LP: #1043769) + + -- a7x Fri, 14 Dec 2012 17:13:39 -0500 + gnome-control-center (1:3.4.2-0ubuntu19) quantal; urgency=low * debian/patches/clutter_init.patch: diff -Nru gnome-control-center-3.4.2/debian/patches/git-display-Fix-coordinate-calculations.patch gnome-control-center-3.4.2/debian/patches/git-display-Fix-coordinate-calculations.patch --- gnome-control-center-3.4.2/debian/patches/git-display-Fix-coordinate-calculations.patch 1969-12-31 19:00:00.000000000 -0500 +++ gnome-control-center-3.4.2/debian/patches/git-display-Fix-coordinate-calculations.patch 2012-12-14 18:40:49.000000000 -0500 @@ -0,0 +1,37 @@ +From a61f0654b98357283ef68bea6d827aabc0a2779e Mon Sep 17 00:00:00 2001 +From: Benjamin Berg +Date: Sun, 16 Sep 2012 17:09:45 -0400 +Subject: [PATCH 2/2] display: Fix coordinate calculations + +https://bugzilla.gnome.org/show_bug.cgi?id=681475 +--- + panels/display/scrollarea.c | 11 ++--------- + 1 file changed, 2 insertions(+), 9 deletions(-) + +diff --git a/panels/display/scrollarea.c b/panels/display/scrollarea.c +index d705f02..995872d 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; + } +-- +1.8.0 + diff -Nru gnome-control-center-3.4.2/debian/patches/git-display-Fix-mouse-events-not-working-in-preview.patch gnome-control-center-3.4.2/debian/patches/git-display-Fix-mouse-events-not-working-in-preview.patch --- gnome-control-center-3.4.2/debian/patches/git-display-Fix-mouse-events-not-working-in-preview.patch 1969-12-31 19:00:00.000000000 -0500 +++ gnome-control-center-3.4.2/debian/patches/git-display-Fix-mouse-events-not-working-in-preview.patch 2012-12-14 18:40:49.000000000 -0500 @@ -0,0 +1,82 @@ +From c1857b0f9c80434890679ace83865db5d2565fa6 Mon Sep 17 00:00:00 2001 +From: Benjamin Berg +Date: Wed, 8 Aug 2012 21:49:00 +0200 +Subject: [PATCH 1/2] display: Fix mouse events not working in preview + +We need to save event areas with the correct transformation. + +The following things need to be take into account: + * Current cairo matrix (translations) + * Widget allocation because it is painting on the parents widgets window + * Cairo device offset, which GTK+ sets (but not for a full window redraw) + +https://bugzilla.gnome.org/show_bug.cgi?id=681475 +--- + panels/display/scrollarea.c | 34 +++++++++++++++++++++++++++------- + 1 file changed, 27 insertions(+), 7 deletions(-) + +diff --git a/panels/display/scrollarea.c b/panels/display/scrollarea.c +index 6946c64..d705f02 100644 +--- a/panels/display/scrollarea.c ++++ b/panels/display/scrollarea.c +@@ -1182,16 +1182,31 @@ foo_scroll_area_set_min_size (FooScrollArea *scroll_area, + gtk_widget_queue_resize (GTK_WIDGET (scroll_area)); + } + ++typedef struct { ++ cairo_t *cr; ++ GtkAllocation allocation; ++} user_to_device_data; ++ + static void + user_to_device (double *x, double *y, +- gpointer data) ++ gpointer user_data) + { +-#if 0 +- cairo_t *cr = data; ++ gdouble ox, oy; ++ user_to_device_data* data = user_data; + +- /* FIXME: not set transform in first place? */ +- cairo_user_to_device (cr, x, y); +-#endif ++ /* Required in case the user does transformations (eg. translates) */ ++ 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. */ ++ *x -= data->allocation.x; ++ *y -= data->allocation.y; + } + + static InputPath * +@@ -1201,13 +1216,18 @@ make_path (FooScrollArea *area, + FooScrollAreaEventFunc func, + gpointer data) + { ++ user_to_device_data conversion_data; ++ + InputPath *path = g_new0 (InputPath, 1); + ++ conversion_data.cr = cr; ++ gtk_widget_get_allocation(GTK_WIDGET (area), &conversion_data.allocation); ++ + path->is_stroke = is_stroke; + path->fill_rule = cairo_get_fill_rule (cr); + path->line_width = cairo_get_line_width (cr); + path->path = cairo_copy_path (cr); +- path_foreach_point (path->path, user_to_device, cr); ++ path_foreach_point (path->path, user_to_device, &conversion_data); + path->func = func; + path->data = data; + path->next = area->priv->current_input->paths; +-- +1.8.0 + diff -Nru gnome-control-center-3.4.2/debian/patches/series gnome-control-center-3.4.2/debian/patches/series --- gnome-control-center-3.4.2/debian/patches/series 2012-10-09 11:04:01.000000000 -0400 +++ gnome-control-center-3.4.2/debian/patches/series 2012-12-14 18:42:04.000000000 -0500 @@ -45,3 +45,5 @@ power_cancellable_fixes.patch git_fix_big_editable_labels.patch git_unmute_sound_event.patch +git-display-Fix-mouse-events-not-working-in-preview.patch +git-display-Fix-coordinate-calculations.patch