forked from pool/gnome-mahjongg
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
This commit is contained in:
parent
03e0636eff
commit
d45ddbf27a
35
fix-new-cairo-select-tile.patch
Normal file
35
fix-new-cairo-select-tile.patch
Normal file
@ -0,0 +1,35 @@
|
||||
From be2e46cc68a865669e462449dd5331016a49e36c Mon Sep 17 00:00:00 2001
|
||||
From: Chris Mayo <aklhfex@gmail.com>
|
||||
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);
|
@ -1,3 +1,18 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 26 09:03:28 UTC 2023 - Manfred Hollstein <manfred.h@gmx.net>
|
||||
|
||||
- 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 <bjorn.lie@gmail.com>
|
||||
|
||||
- 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 <bjorn.lie@gmail.com>
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user