[swell-foop] backport upstream patch for touch, buildrequires vala
Adam Williamson
adamwill at fedoraproject.org
Thu Mar 27 20:57:19 UTC 2014
commit 1081ad3ad67cad8346b68733335df7bd8b7bc397
Author: Adam Williamson <awilliam at redhat.com>
Date: Thu Mar 27 13:57:15 2014 -0700
backport upstream patch for touch, buildrequires vala
...-screen-issue-where-taping-didnt-work-dep.patch | 71 ++++++++++++++++++++
swell-foop.spec | 10 +++-
2 files changed, 80 insertions(+), 1 deletions(-)
---
diff --git a/0001-Fixed-touch-screen-issue-where-taping-didnt-work-dep.patch b/0001-Fixed-touch-screen-issue-where-taping-didnt-work-dep.patch
new file mode 100644
index 0000000..e13db56
--- /dev/null
+++ b/0001-Fixed-touch-screen-issue-where-taping-didnt-work-dep.patch
@@ -0,0 +1,71 @@
+From 380341eef1290defa0670978ad4fad50dc70877c Mon Sep 17 00:00:00 2001
+From: Mario Wenzel <maweki at gmail.com>
+Date: Tue, 25 Mar 2014 23:10:07 +0100
+Subject: [PATCH] Fixed touch screen issue where taping didnt work, dependency
+ bump
+
+https://bugzilla.gnome.org/show_bug.cgi?id=724832
+---
+ configure.ac | 6 +++---
+ src/game-view.vala | 8 ++++----
+ 2 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index b0fe972..ad68060 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -17,15 +17,15 @@ dnl ###########################################################################
+
+ GLIB_REQUIRED=2.36.0
+ GTK_REQUIRED=3.10
+-CLUTTER_REQUIRED=1.0.0
+-CLUTTER_GTK_REQUIRED=0.91.6
++CLUTTER_REQUIRED=1.14.0
++CLUTTER_GTK_REQUIRED=1.5.0
+
+ PKG_CHECK_MODULES(SWELL_FOOP, [
+ gmodule-export-2.0
+ glib-2.0 >= $GLIB_REQUIRED
+ gtk+-3.0 >= $GTK_REQUIRED
+ clutter-1.0 >= $CLUTTER_REQUIRED
+- clutter-gtk-1.0 >= $CLUTTER_REQUIRED
++ clutter-gtk-1.0 >= $CLUTTER_GTK_REQUIRED
+ ])
+
+ AC_CHECK_LIB([m],[floor])
+diff --git a/src/game-view.vala b/src/game-view.vala
+index 0a392a3..b62b3cf 100644
+--- a/src/game-view.vala
++++ b/src/game-view.vala
+@@ -145,7 +145,9 @@ public class GameView : Clutter.Group
+
+ /* Respond to the user interactions */
+ tile.reactive = true;
+- tile.button_release_event.connect (remove_region_cb);
++ var tap = new Clutter.TapAction ();
++ tile.add_action (tap);
++ tap.tap.connect (remove_region_cb);
+ tile.enter_event.connect (tile_entered_cb);
+ tile.leave_event.connect (tile_left_cb);
+
+@@ -242,7 +244,7 @@ public class GameView : Clutter.Group
+ }
+
+ /* When the user click a tile, send the model to remove the connected tile. */
+- private bool remove_region_cb (Clutter.Actor actor, Clutter.ButtonEvent event)
++ private void remove_region_cb (Clutter.TapAction tap, Clutter.Actor actor)
+ {
+ var tile = (TileActor) actor;
+
+@@ -259,8 +261,6 @@ public class GameView : Clutter.Group
+ cursor_y = tile.tile.grid_y;
+
+ game.remove_connected_tiles (tile.tile);
+-
+- return false;
+ }
+
+ /* When the mouse leaves the application window, reset all tiles to the default brightness */
+--
+1.9.0
+
diff --git a/swell-foop.spec b/swell-foop.spec
index 3782b89..23d8eaf 100644
--- a/swell-foop.spec
+++ b/swell-foop.spec
@@ -1,11 +1,14 @@
Name: swell-foop
Version: 3.12.0
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: GNOME colored tiles puzzle game
License: GPLv2+ and GFDL
URL: https://wiki.gnome.org/Apps/Swell%20Foop
Source0: http://download.gnome.org/sources/swell-foop/3.12/swell-foop-%{version}.tar.xz
+# Upstream https://git.gnome.org/browse/swell-foop/commit/?id=380341eef1290defa0670978ad4fad50dc70877c
+# Fixes touchscreen interaction
+Patch0: 0001-Fixed-touch-screen-issue-where-taping-didnt-work-dep.patch
BuildRequires: clutter-gtk-devel
BuildRequires: desktop-file-utils
@@ -13,6 +16,7 @@ BuildRequires: gtk3-devel
BuildRequires: intltool
BuildRequires: itstool
BuildRequires: yelp-tools
+BuildRequires: vala
Obsoletes: gnome-games-swell-foop < 1:3.7.92-1
Obsoletes: gnome-games < 1:3.7.92-1
@@ -23,6 +27,7 @@ Clear the screen by removing groups of colored and shaped tiles
%prep
%setup -q
+%patch0 -p1
%build
%configure
@@ -70,6 +75,9 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &>/dev/null || :
%changelog
+* Thu Mar 27 2014 Adam Williamson <awilliam at redhat.com> - 3.12.0-2
+- backport upstream patch for touch input
+
* Mon Mar 24 2014 Richard Hughes <rhughes at redhat.com> - 3.12.0-1
- Update to 3.12.0
More information about the scm-commits
mailing list