summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <me@tobias.gr>2020-10-02 00:12:18 +0200
committerTobias Geerinckx-Rice <me@tobias.gr>2020-10-02 00:30:14 +0200
commite1fefb810bc561fe4f1ccfe155b36ba8b93bce2d (patch)
tree3ee37acae0a99166023f7405f62e873fa5d7a225 /gnu
parent7a0491ad0cab3e55fc505b5a7e04ab4ad6b3447f (diff)
gnu: grim: Fix output rotation interpretation with Sway 1.4.
* gnu/packages/image.scm (grim)[source]: Add patch. * gnu/packages/patches/grim-revert-output-rotation.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/local.mk1
-rw-r--r--gnu/packages/image.scm3
-rw-r--r--gnu/packages/patches/grim-revert-output-rotation.patch27
-rw-r--r--gnu/packages/wm.scm2
4 files changed, 32 insertions, 1 deletions
diff --git a/gnu/local.mk b/gnu/local.mk
index a278c835537..f2b7a5da841 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1085,6 +1085,7 @@ dist_patch_DATA = \
1085 %D%/packages/patches/gpsbabel-qstring.patch \ 1085 %D%/packages/patches/gpsbabel-qstring.patch \
1086 %D%/packages/patches/grantlee-merge-theme-dirs.patch \ 1086 %D%/packages/patches/grantlee-merge-theme-dirs.patch \
1087 %D%/packages/patches/grep-timing-sensitive-test.patch \ 1087 %D%/packages/patches/grep-timing-sensitive-test.patch \
1088 %D%/packages/patches/grim-revert-output-rotation.patch \
1088 %D%/packages/patches/grocsvs-dont-use-admiral.patch \ 1089 %D%/packages/patches/grocsvs-dont-use-admiral.patch \
1089 %D%/packages/patches/gromacs-tinyxml2.patch \ 1090 %D%/packages/patches/gromacs-tinyxml2.patch \
1090 %D%/packages/patches/groovy-add-exceptionutilsgenerator.patch \ 1091 %D%/packages/patches/groovy-add-exceptionutilsgenerator.patch \
diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index 8fbdd0b4ae3..ae0f831082e 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -1949,7 +1949,8 @@ identical visual appearance.")
1949 (commit (string-append "v" version)))) 1949 (commit (string-append "v" version))))
1950 (file-name (git-file-name name version)) 1950 (file-name (git-file-name name version))
1951 (sha256 1951 (sha256
1952 (base32 "0fjmjq0ws9rlblkcqxxw2lv7zvvyi618jqzlnz5z9zb477jwdfib")))) 1952 (base32 "0fjmjq0ws9rlblkcqxxw2lv7zvvyi618jqzlnz5z9zb477jwdfib"))
1953 (patches (search-patches "grim-revert-output-rotation.patch"))))
1953 (build-system meson-build-system) 1954 (build-system meson-build-system)
1954 (native-inputs `(("pkg-config" ,pkg-config) 1955 (native-inputs `(("pkg-config" ,pkg-config)
1955 ("scdoc" ,scdoc))) 1956 ("scdoc" ,scdoc)))
diff --git a/gnu/packages/patches/grim-revert-output-rotation.patch b/gnu/packages/patches/grim-revert-output-rotation.patch
new file mode 100644
index 00000000000..cbf0a86502a
--- /dev/null
+++ b/gnu/packages/patches/grim-revert-output-rotation.patch
@@ -0,0 +1,27 @@
1From 80b17ceaff90b81b28b44004d2aca4cc40f365be Mon Sep 17 00:00:00 2001
2From: Tobias Geerinckx-Rice <me@tobias.gr>
3Date: Fri, 2 Oct 2020 00:07:30 +0200
4Subject: [PATCH] Revert "Correct interpretation of output rotation"
5
6This reverts commit 8f9d60885ce2f9bd66cd93d3378dcb6866d4588a.
7It is incompatible with the current Sway version (1.4) in Guix.
8---
9 render.c | 2 +-
10 1 file changed, 1 insertion(+), 1 deletion(-)
11
12diff --git a/render.c b/render.c
13index 8f31e7e..a6b0b12 100644
14--- a/render.c
15+++ b/render.c
16@@ -104,7 +104,7 @@ cairo_surface_t *render(struct grim_state *state, struct grim_box *geometry,
17 cairo_matrix_translate(&matrix,
18 (double)output->geometry.width / 2,
19 (double)output->geometry.height / 2);
20- cairo_matrix_rotate(&matrix, get_output_rotation(output->transform));
21+ cairo_matrix_rotate(&matrix, -get_output_rotation(output->transform));
22 cairo_matrix_scale(&matrix,
23 (double)raw_output_width / output_width * output_flipped_x,
24 (double)raw_output_height / output_height * output_flipped_y);
25--
262.28.0
27
diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index 8c32fe426d1..40458f55ab1 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -1386,6 +1386,8 @@ modules for building a Wayland compositor.")
1386(define-public sway 1386(define-public sway
1387 (package 1387 (package
1388 (name "sway") 1388 (name "sway")
1389 ;; XXX When updating, check whether grim-revert-output-rotation.patch can
1390 ;; be dropped from the grim package.
1389 (version "1.4") 1391 (version "1.4")
1390 (source 1392 (source
1391 (origin 1393 (origin