From d45ddbf27a7c3a524fc553c940961a74cef8e2a627d4688c4ab83205477776f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Lie?= Date: Wed, 26 Apr 2023 09:49:46 +0000 Subject: [PATCH] Accepting request 1082927 from home:manfred-h - Re-generate fix-new-cairo-select-tile.patch against the 3.38.3 sources - Add fix-new-cairo-select-tile.patch: Fix selecting a tile since cairo 1.17.8. Cairo 1.17.8 includes a fix for out of range coordinates which exposed a problem with the values used to translate the context in GameView.find_tile() (boo#1209827). https://gitlab.gnome.org/GNOME/gnome-mahjongg/-/merge_requests/35 OBS-URL: https://build.opensuse.org/request/show/1082927 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-mahjongg?expand=0&rev=59 --- fix-new-cairo-select-tile.patch | 35 +++++++++++++++++++++++++++++++++ gnome-mahjongg.changes | 15 ++++++++++++++ gnome-mahjongg.spec | 4 +++- 3 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 fix-new-cairo-select-tile.patch diff --git a/fix-new-cairo-select-tile.patch b/fix-new-cairo-select-tile.patch new file mode 100644 index 0000000..834c2e6 --- /dev/null +++ b/fix-new-cairo-select-tile.patch @@ -0,0 +1,35 @@ +From be2e46cc68a865669e462449dd5331016a49e36c Mon Sep 17 00:00:00 2001 +From: Chris Mayo +Date: Tue, 18 Apr 2023 19:46:57 +0100 +Subject: [PATCH] Fix selecting a tile since cairo 1.17.8 + +cairo 1.17.8 includes a fix for out of range coordinates [1] which +exposed a problem with the values used to translate the +context in GameView.find_tile(). + +[1] 47a21c6e3 ("Clamp path coordinates", 2022-05-15) +--- + src/game-view.vala | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff -rup a/src/game-view.vala b/src/game-view.vala +--- a/src/game-view.vala 2020-11-01 10:39:32.693650200 +0100 ++++ b/src/game-view.vala 2023-04-26 09:28:48.415329449 +0200 +@@ -287,7 +287,7 @@ public class GameView : Gtk.DrawingArea + return false; + + /* Get the tile under the square */ +- var tile = find_tile ((uint) event.x, (uint) event.y); ++ var tile = find_tile (event.x, event.y); + + /* If not a valid tile then ignore the event */ + if (tile == null || !game.tile_can_move (tile)) +@@ -325,7 +325,7 @@ public class GameView : Gtk.DrawingArea + return false; + } + +- private Tile? find_tile (uint x, uint y) ++ private Tile? find_tile (double x, double y) + { + /* Render a 1x1 image where the cursor is using a different color for each tile */ + var surface = new Cairo.ImageSurface (Cairo.Format.RGB24, 1, 1); diff --git a/gnome-mahjongg.changes b/gnome-mahjongg.changes index 84dd973..3563a77 100644 --- a/gnome-mahjongg.changes +++ b/gnome-mahjongg.changes @@ -1,3 +1,18 @@ +------------------------------------------------------------------- +Wed Apr 26 09:03:28 UTC 2023 - Manfred Hollstein + +- Re-generate fix-new-cairo-select-tile.patch against the 3.38.3 + sources + +------------------------------------------------------------------- +Sun Apr 23 20:04:39 UTC 2023 - Bjørn Lie + +- Add fix-new-cairo-select-tile.patch: Fix selecting a tile since + cairo 1.17.8. Cairo 1.17.8 includes a fix for out of range + coordinates which exposed a problem with the values used to + translate the context in GameView.find_tile() (boo#1209827). + https://gitlab.gnome.org/GNOME/gnome-mahjongg/-/merge_requests/35 + ------------------------------------------------------------------- Wed Feb 2 15:43:11 UTC 2022 - Bjørn Lie diff --git a/gnome-mahjongg.spec b/gnome-mahjongg.spec index 350713d..8060fab 100644 --- a/gnome-mahjongg.spec +++ b/gnome-mahjongg.spec @@ -1,7 +1,7 @@ # # spec file for package gnome-mahjongg # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -26,6 +26,8 @@ URL: https://live.gnome.org/GnomeMahongg Source0: https://download.gnome.org/sources/gnome-mahjongg/3.38/%{name}-%{version}.tar.xz # PATCH-FIX-UPSTREAM 26.patch -- Fix build with meson 0.60 and newer Patch0: https://gitlab.gnome.org/GNOME/gnome-mahjongg/-/merge_requests/26.patch +# PATCH-FIX-UPSTREAM fix-new-cairo-select-tile.patch -- Fix selecting a tile since cairo 1.17.8 +Patch1: fix-new-cairo-select-tile.patch BuildRequires: fdupes BuildRequires: hicolor-icon-theme