guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

03/05: gnu: grim: Fix output rotation interpretation with Sway 1.4.


From: guix-commits
Subject: 03/05: gnu: grim: Fix output rotation interpretation with Sway 1.4.
Date: Thu, 1 Oct 2020 18:31:09 -0400 (EDT)

nckx pushed a commit to branch master
in repository guix.

commit e1fefb810bc561fe4f1ccfe155b36ba8b93bce2d
Author: Tobias Geerinckx-Rice <me@tobias.gr>
AuthorDate: Fri Oct 2 00:12:18 2020 +0200

    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.
---
 gnu/local.mk                                       |  1 +
 gnu/packages/image.scm                             |  3 ++-
 .../patches/grim-revert-output-rotation.patch      | 27 ++++++++++++++++++++++
 gnu/packages/wm.scm                                |  2 ++
 4 files changed, 32 insertions(+), 1 deletion(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index a278c83..f2b7a5d 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1085,6 +1085,7 @@ dist_patch_DATA =                                         
\
   %D%/packages/patches/gpsbabel-qstring.patch                  \
   %D%/packages/patches/grantlee-merge-theme-dirs.patch         \
   %D%/packages/patches/grep-timing-sensitive-test.patch                \
+  %D%/packages/patches/grim-revert-output-rotation.patch       \
   %D%/packages/patches/grocsvs-dont-use-admiral.patch          \
   %D%/packages/patches/gromacs-tinyxml2.patch                  \
   %D%/packages/patches/groovy-add-exceptionutilsgenerator.patch        \
diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index 8fbdd0b..ae0f831 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -1949,7 +1949,8 @@ identical visual appearance.")
            (commit (string-append "v" version))))
      (file-name (git-file-name name version))
      (sha256
-      (base32 "0fjmjq0ws9rlblkcqxxw2lv7zvvyi618jqzlnz5z9zb477jwdfib"))))
+      (base32 "0fjmjq0ws9rlblkcqxxw2lv7zvvyi618jqzlnz5z9zb477jwdfib"))
+     (patches (search-patches "grim-revert-output-rotation.patch"))))
    (build-system meson-build-system)
    (native-inputs `(("pkg-config" ,pkg-config)
                     ("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 0000000..cbf0a86
--- /dev/null
+++ b/gnu/packages/patches/grim-revert-output-rotation.patch
@@ -0,0 +1,27 @@
+From 80b17ceaff90b81b28b44004d2aca4cc40f365be Mon Sep 17 00:00:00 2001
+From: Tobias Geerinckx-Rice <me@tobias.gr>
+Date: Fri, 2 Oct 2020 00:07:30 +0200
+Subject: [PATCH] Revert "Correct interpretation of output rotation"
+
+This reverts commit 8f9d60885ce2f9bd66cd93d3378dcb6866d4588a.
+It is incompatible with the current Sway version (1.4) in Guix.
+---
+ render.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/render.c b/render.c
+index 8f31e7e..a6b0b12 100644
+--- a/render.c
++++ b/render.c
+@@ -104,7 +104,7 @@ cairo_surface_t *render(struct grim_state *state, struct 
grim_box *geometry,
+               cairo_matrix_translate(&matrix,
+                       (double)output->geometry.width / 2,
+                       (double)output->geometry.height / 2);
+-              cairo_matrix_rotate(&matrix, 
get_output_rotation(output->transform));
++              cairo_matrix_rotate(&matrix, 
-get_output_rotation(output->transform));
+               cairo_matrix_scale(&matrix,
+                       (double)raw_output_width / output_width * 
output_flipped_x,
+                       (double)raw_output_height / output_height * 
output_flipped_y);
+-- 
+2.28.0
+
diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index 8c32fe4..40458f5 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -1386,6 +1386,8 @@ modules for building a Wayland compositor.")
 (define-public sway
   (package
     (name "sway")
+    ;; XXX When updating, check whether grim-revert-output-rotation.patch can
+    ;; be dropped from the grim package.
     (version "1.4")
     (source
      (origin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]