From 486a458efd09b66283bc53e6ed7323a14cca57fca067e3f6d90a416ac3136a07 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Wed, 21 Sep 2016 17:28:05 +0000 Subject: [PATCH] Accepting request 429309 from GNOME:Next - Add mutter-screeenshot-coords.patch: yet another fix to take screenshots of a specific area. OBS-URL: https://build.opensuse.org/request/show/429309 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/mutter?expand=0&rev=209 --- mutter-screeenshot-coords.patch | 32 ++++++++++++++++++++++++++++++++ mutter.changes | 6 ++++++ mutter.spec | 3 +++ 3 files changed, 41 insertions(+) create mode 100644 mutter-screeenshot-coords.patch diff --git a/mutter-screeenshot-coords.patch b/mutter-screeenshot-coords.patch new file mode 100644 index 0000000..1f2910b --- /dev/null +++ b/mutter-screeenshot-coords.patch @@ -0,0 +1,32 @@ +From 31356cec7272d266206ff56669a2d86d689615fe Mon Sep 17 00:00:00 2001 +From: Rui Matos +Date: Wed, 21 Sep 2016 15:06:08 +0200 +Subject: [PATCH] clutter/stage: Fix framebuffer capture origin offset (again) + +Commit 5fbb4793017b1891f0de4720a9793e8cfc1c8483 was wrong too. What we +really want to do here is getting view relative coordinates given the +view's and the rectangle's global coordinates so we need to subtract +the view's origin from the rectangle's. + +https://bugzilla.gnome.org/show_bug.cgi?id=771502 +--- + clutter/clutter/clutter-stage.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/clutter/clutter/clutter-stage.c b/clutter/clutter/clutter-stage.c +index 1d2c0bc..21968b9 100644 +--- a/clutter/clutter/clutter-stage.c ++++ b/clutter/clutter/clutter-stage.c +@@ -4712,8 +4712,8 @@ capture_view (ClutterStage *stage, + clutter_stage_view_get_layout (view, &view_layout); + + cogl_framebuffer_read_pixels_into_bitmap (framebuffer, +- view_layout.x + rect->x, +- view_layout.y + rect->y, ++ rect->x - view_layout.x, ++ rect->y - view_layout.y, + COGL_READ_PIXELS_COLOR_BUFFER, + bitmap); + +-- +2.7.4 diff --git a/mutter.changes b/mutter.changes index e1fcd89..e5274f6 100644 --- a/mutter.changes +++ b/mutter.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Sep 21 13:20:08 UTC 2016 - dimstar@opensuse.org + +- Add mutter-screeenshot-coords.patch: yet another fix to take + screenshots of a specific area. + ------------------------------------------------------------------- Mon Sep 19 22:51:36 UTC 2016 - zaitor@opensuse.org diff --git a/mutter.spec b/mutter.spec index 0777824..47c7d6c 100644 --- a/mutter.spec +++ b/mutter.spec @@ -38,6 +38,8 @@ Patch1: mutter-bell.patch Patch2: relax-some-constraints-on-CSD-windows-in-sle-classic.patch # PATCH-FIX-UPSTREAM mutter-bsc984738-grab-display.patch bsc#984738 bgo#769387 hpj@suse.com -- Revert a upstream commit to avoid X11 race condition that results in wrong dialog sizes. Patch3: mutter-bsc984738-grab-display.patch +# PATCH-FIX-UPSTREAM mutter-screeenshot-coords.patch bgo#771502 dimstar@opensuse.org -- Yet another fix for area-screenshots +Patch4: mutter-screeenshot-coords.patch BuildRequires: fdupes BuildRequires: gobject-introspection-devel >= 0.9.5 BuildRequires: libSM-devel @@ -137,6 +139,7 @@ translation-update-upstream %patch2 -p1 %patch3 -p1 %endif +%patch4 -p1 %build %configure \