summaryrefslogtreecommitdiff
path: root/libre/abiword
diff options
context:
space:
mode:
Diffstat (limited to 'libre/abiword')
-rw-r--r--libre/abiword/PKGBUILD13
-rw-r--r--libre/abiword/fix-flickering.patch109
2 files changed, 119 insertions, 3 deletions
diff --git a/libre/abiword/PKGBUILD b/libre/abiword/PKGBUILD
index de34b2ec4..d96e2498a 100644
--- a/libre/abiword/PKGBUILD
+++ b/libre/abiword/PKGBUILD
@@ -8,7 +8,7 @@
pkgname=abiword
pkgver=3.0.2
-pkgrel=7.parabola1
+pkgrel=8.parabola1
arch=(i686 x86_64 armv7h)
pkgdesc="Fully-featured word processor, without Google search engine and nonfree fonts support"
@@ -32,7 +32,8 @@ source=(https://www.abisource.com/downloads/$pkgname/$pkgver/source/$pkgname-$pk
bug13815.patch
enchant-2.1.patch
libical-deprecated.patch
- liberation-fonts.patch)
+ liberation-fonts.patch
+ fix-flickering.patch)
sha256sums=('afbfd458fd02989d8b0c6362ba8a4c14686d89666f54cfdb5501bd2090cf3522'
'77b52a3722096cec3bfbe4fff3802f51b6c9e0ff7aaa30028c29825fd4e6a65f'
'f1375b2ab7af2959717cba0259ba546c8e75ef849e84263bdc253019e849cb2a'
@@ -42,7 +43,8 @@ sha256sums=('afbfd458fd02989d8b0c6362ba8a4c14686d89666f54cfdb5501bd2090cf3522'
'05f2544a177d6f58424af9045c26e82aca64938d0daf00f43f6b99a2abf64496'
'444dc2aadea3c80310a509b690097541573f6d2652c573d04da66a0f385fcfb2'
'fe6eec4129777117bbfd5fa12d02208e430c8a3b96a54dcf8574ce800f240489'
- '8a0b6e444e937924743f95c747cbe395a30fb8677a010e60c973b9039e258079')
+ '8a0b6e444e937924743f95c747cbe395a30fb8677a010e60c973b9039e258079'
+ '4497da364256340ccd9a60c2fc858a6999f1b2ebc2dad5e6d297e7ab9cabccef')
prepare() {
cd $pkgname-$pkgver
@@ -69,6 +71,11 @@ prepare() {
# Replace deprecated libical functions
patch -Np1 -i $srcdir/libical-deprecated.patch
+ # Fix incessant flickering
+ # https://bugzilla.abisource.com/show_bug.cgi?id=13791
+ # https://sources.debian.org/patches/abiword/3.0.2-6/
+ patch -Np1 -i $srcdir/fix-flickering.patch
+
# Install missing m4 file
install -m644 $srcdir/aiksaurus-plugin.m4 plugins/aiksaurus/plugin.m4
install -m644 $srcdir/command-plugin.m4 plugins/command/plugin.m4
diff --git a/libre/abiword/fix-flickering.patch b/libre/abiword/fix-flickering.patch
new file mode 100644
index 000000000..70dcb154f
--- /dev/null
+++ b/libre/abiword/fix-flickering.patch
@@ -0,0 +1,109 @@
+Description: Fix flickering
+ - in GR_Caret::s_blink_timeout, avoid repeated calls by stopping the
+ timer, it will be restarted when needed,
+ .
+ - in GR_Caret::s_enable, avoid extra unnecessary _blink calls when blink
+ is enabled, as they serve no purpose,
+ .
+ - in XAP_UnixFrameImpl::_fe::expose, use the Cairo clip rectangle
+ instead of the expose event area, thanks to Hubert Figuière in
+ 865c1dda7e13deff04573ffc42028b71fee07f9c,
+ .
+ - in XAP_UnixFrameImpl::_fe::expose, do not return FALSE, as other
+ handlers will need to handle the draw event,
+ .
+ - in GR_UnixCairoGraphics::flush, fix excessive draw events;
+ gtk_widget_queue_draw only marks the widget as needing redrawing,
+ which causes a draw event for each call to flush, therefore every
+ caret blink, so use gdk_flush instead,
+Author: James Cameron <quozl@laptop.org>
+Origin: other
+Bug: https://bugzilla.abisource.com/show_bug.cgi?id=13791
+Bug-SugarLabs: https://bugs.sugarlabs.org/ticket/4915
+Bug-Ubuntu: https://pad.lv/1574278
+Last-Update: 2017-09-24
+--- a/src/af/gr/gtk/gr_UnixCairoGraphics.cpp
++++ b/src/af/gr/gtk/gr_UnixCairoGraphics.cpp
+@@ -577,9 +577,7 @@ void GR_UnixCairoGraphics::_endPaint()
+
+ void GR_UnixCairoGraphics::flush(void)
+ {
+- if (m_Widget) {
+- gtk_widget_queue_draw(m_Widget);
+- }
++ gdk_flush();
+ }
+
+ bool GR_UnixCairoGraphics::queryProperties(GR_Graphics::Properties gp) const
+--- a/src/af/gr/xp/gr_Caret.cpp
++++ b/src/af/gr/xp/gr_Caret.cpp
+@@ -155,22 +155,17 @@ void GR_Caret::s_enable(UT_Worker * _w)
+ {
+ GR_Caret * c = static_cast<GR_Caret *>(_w->getInstanceData());
+
++ c->m_enabler->stop();
+ c->m_worker->stop();
+- c->_blink(true);
+- if (!c->m_bCursorIsOn)
+- c->_blink(true); // blink again
+- else
+- {
+- c->_blink(true); // ?? - MARCM
+- c->_blink(true);
+- }
+ c->m_worker->start();
+- c->m_enabler->stop();
++ c->_blink(true);
+ }
+
+ void GR_Caret::s_blink_timeout(UT_Worker * _w)
+ {
+ GR_Caret * c = static_cast<GR_Caret *>(_w->getInstanceData());
++
++ c->m_blinkTimeout->stop();
+ if (c->isEnabled())
+ c->disable();
+ }
+--- a/src/af/xap/gtk/xap_UnixFrameImpl.cpp
++++ b/src/af/xap/gtk/xap_UnixFrameImpl.cpp
+@@ -1215,8 +1215,16 @@ gboolean XAP_UnixFrameImpl::_fe::expose(
+ {
+ XAP_UnixFrameImpl * pUnixFrameImpl = static_cast<XAP_UnixFrameImpl *>(g_object_get_data(G_OBJECT(w), "user_data"));
+ FV_View * pView = static_cast<FV_View *>(pUnixFrameImpl->getFrame()->getCurrentView());
++ double x, y, width, height;
+ #if GTK_CHECK_VERSION(3,0,0)
+- GdkEventExpose *pExposeEvent = reinterpret_cast<GdkEventExpose *>(gtk_get_current_event());
++ cairo_clip_extents (cr, &x, &y, &width, &height);
++ width -= x;
++ height -= y;
++#else
++ x = pExposeEvent->area.x;
++ y = pExposeEvent->area.y;
++ width = pExposeEvent->area.width;
++ height = pExposeEvent->area.height;
+ #endif
+ /* Jean: commenting out next lines since the zoom update code does draw only
+ * part of what needs to be updated. */
+@@ -1230,16 +1238,17 @@ gboolean XAP_UnixFrameImpl::_fe::expose(
+ UT_Rect rClip;
+ if (pGr->getPaintCount () > 0)
+ return TRUE;
+- xxx_UT_DEBUGMSG(("Expose area: x %d y %d width %d height %d \n",pExposeEvent->area.x,pExposeEvent->area.y,pExposeEvent->area.width,pExposeEvent->area.height));
+- rClip.left = pGr->tlu(pExposeEvent->area.x);
+- rClip.top = pGr->tlu(pExposeEvent->area.y);
+- rClip.width = pGr->tlu(pExposeEvent->area.width)+1;
+- rClip.height = pGr->tlu(pExposeEvent->area.height)+1;
++ rClip.left = pGr->tlu(x);
++ rClip.top = pGr->tlu(y);
+ #if GTK_CHECK_VERSION(3,0,0)
++ rClip.width = pGr->tlu(width);
++ rClip.height = pGr->tlu(height);
+ static_cast<GR_CairoGraphics *>(pGr)->setCairo(cr);
+ pView->draw(&rClip);
+ static_cast<GR_CairoGraphics *>(pGr)->setCairo(NULL);
+ #else
++ rClip.width = pGr->tlu(width)+1;
++ rClip.height = pGr->tlu(height)+1;
+ pView->draw(&rClip);
+ #endif
+ }