summaryrefslogtreecommitdiff
path: root/extra/gtkhtml4
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-05-11 00:03:00 +0000
committerroot <root@rshg054.dnsready.net>2012-05-11 00:03:00 +0000
commit2ced64d6aa5881fa575de1861c464c432deee26f (patch)
tree55c4d54265bcc869257a2f1bedc5d75476878366 /extra/gtkhtml4
parent1adfdd111d570a6dfc66543a2858d9554c73e7a7 (diff)
Fri May 11 00:03:00 UTC 2012
Diffstat (limited to 'extra/gtkhtml4')
-rw-r--r--extra/gtkhtml4/PKGBUILD11
-rw-r--r--extra/gtkhtml4/fix-selection-behaviour-in-iframe.patch35
2 files changed, 42 insertions, 4 deletions
diff --git a/extra/gtkhtml4/PKGBUILD b/extra/gtkhtml4/PKGBUILD
index 12c5d4e62..f917c0682 100644
--- a/extra/gtkhtml4/PKGBUILD
+++ b/extra/gtkhtml4/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 156876 2012-04-23 09:08:07Z ibiru $
+# $Id: PKGBUILD 158752 2012-05-09 07:43:11Z jgc $
# Maintainer: Ionut Biru <ibiru@archlinux.org>
pkgname=gtkhtml4
_pkgbasename=gtkhtml
pkgver=4.4.1
-pkgrel=1
+pkgrel=2
pkgdesc="A lightweight HTML renderer/editor widget for GTK3"
arch=(i686 x86_64)
license=('GPL')
@@ -12,11 +12,14 @@ depends=('gtk3' 'enchant' 'iso-codes' 'gnome-icon-theme' 'libsoup')
makedepends=('intltool')
url="http://www.gnome.org"
options=('!libtool')
-source=(http://ftp.gnome.org/pub/gnome/sources/$_pkgbasename/${pkgver%.*}/$_pkgbasename-$pkgver.tar.xz)
-sha256sums=('2fb3286c5ab8b6349a694156f803e1162c5a234d30548eb0afdf82e139923236')
+source=(http://ftp.gnome.org/pub/gnome/sources/$_pkgbasename/${pkgver%.*}/$_pkgbasename-$pkgver.tar.xz
+ fix-selection-behaviour-in-iframe.patch)
+sha256sums=('2fb3286c5ab8b6349a694156f803e1162c5a234d30548eb0afdf82e139923236'
+ 'ed1d9a4515f9137aaa94511f421b610af04091c56573ff9b74ba104a2ca1b207')
build() {
cd "$_pkgbasename-$pkgver"
+ patch -Np1 -i "${srcdir}/fix-selection-behaviour-in-iframe.patch"
./configure --prefix=/usr --sysconfdir=/etc \
--libexecdir=/usr/lib/gtkhtml4 \
--localstatedir=/var --disable-static
diff --git a/extra/gtkhtml4/fix-selection-behaviour-in-iframe.patch b/extra/gtkhtml4/fix-selection-behaviour-in-iframe.patch
new file mode 100644
index 000000000..06bce4a0f
--- /dev/null
+++ b/extra/gtkhtml4/fix-selection-behaviour-in-iframe.patch
@@ -0,0 +1,35 @@
+From 9ec36544203d4c1b98aa843c2c3ff0a4f725da68 Mon Sep 17 00:00:00 2001
+From: Sam Thursfield <sam.thursfield@codethink.co.uk>
+Date: Thu, 03 May 2012 19:04:20 +0000
+Subject: Bug 672582 - Fix selection behavior inside <iframe>
+
+Since kinetic scrolling was introduced in Gtk+, GtkScrolledWindow
+has had its own GdkWindow. This means we need to use the allocation
+of the GtkScrolledWindow rather than its child GtkHTML widget when we
+want to translate pointer coordinates relative to the iframe, because
+a widget's GtkAllocation is relative to the parent GdkWindow.
+
+(cherry picked from commit 7b7b37745d2f46914be314e4d7aef7a575529345)
+---
+diff --git a/gtkhtml/gtkhtml.c b/gtkhtml/gtkhtml.c
+index 697b16e..6284855 100644
+--- a/gtkhtml/gtkhtml.c
++++ b/gtkhtml/gtkhtml.c
+@@ -1823,9 +1823,14 @@ shift_to_iframe_parent (GtkWidget *widget,
+ gint *y)
+ {
+ while (GTK_HTML (widget)->iframe_parent) {
++ GtkWidget *scrolled_window;
+ GtkAllocation allocation;
+
+- gtk_widget_get_allocation (widget, &allocation);
++ scrolled_window = gtk_widget_get_parent (widget);
++
++ g_return_val_if_fail (GTK_IS_SCROLLED_WINDOW (scrolled_window), widget);
++
++ gtk_widget_get_allocation (scrolled_window, &allocation);
+
+ if (x)
+ *x += allocation.x - GTK_HTML (widget)->engine->x_offset;
+--
+cgit v0.9.0.2