Index: PKGBUILD =================================================================== --- PKGBUILD (revision 327751) +++ PKGBUILD (working copy) @@ -11,7 +11,7 @@ license=('GPL') url='https://www.abisource.com' depends=('fribidi' 'wv' 'goffice' 'librsvg' 'enchant' 'desktop-file-utils' - 'redland' 'libical' 'gtk-update-icon-cache' 'loudmouth' 'libwpg' 'libwps' 'libwmf' 'link-grammar' + 'redland' 'libical' 'gtk-update-icon-cache' 'loudmouth' 'libwpg' 'libwps' 'libwmf' 'link-grammar' 'gtkmathview' 'aiksaurus' 'libxslt' 'libsoup' 'libots' 'libgsf' 'psiconv') makedepends=('pkgconfig' 'asio' 'boost' 'gobject-introspection' 'libwpd' 'libwps' 'python2-gobject' 'python-gobject') conflicts=('abiword-plugins') @@ -25,6 +25,7 @@ python-override.patch bug13815.patch enchant-2.1.patch + fix-flickering.patch libical-deprecated.patch) sha256sums=('afbfd458fd02989d8b0c6362ba8a4c14686d89666f54cfdb5501bd2090cf3522' '77b52a3722096cec3bfbe4fff3802f51b6c9e0ff7aaa30028c29825fd4e6a65f' @@ -34,6 +35,7 @@ 'dba1e3265cd42589f17b41fea1a39c8aa4b83c7203b9d5944b578d0ff9c858be' '05f2544a177d6f58424af9045c26e82aca64938d0daf00f43f6b99a2abf64496' '444dc2aadea3c80310a509b690097541573f6d2652c573d04da66a0f385fcfb2' + '6ea7adbb7fd27e96af6b37b27b911cf99e6482209b1929acf71239ac04a8bd48' 'fe6eec4129777117bbfd5fa12d02208e430c8a3b96a54dcf8574ce800f240489') prepare() { @@ -55,6 +57,9 @@ # Replace deprecated enchant functions patch -Np1 -i ../enchant-2.1.patch + # fix flickering FS#59169 + patch -Np0 -i ../fix-flickering.patch + # Replace deprecated libical functions patch -Np1 -i ../libical-deprecated.patch Index: fix-flickering.patch =================================================================== --- fix-flickering.patch (nonexistent) +++ fix-flickering.patch (working copy) @@ -0,0 +1,475 @@ +------------------------------------------------------------------------ +r35110 | hub | 2015-09-24 22:38:38 -0400 (Thu, 24 Sep 2015) | 1 line + +Fix potential NULL pointer dereference + +Index: src/text/ptbl/xp/pd_Document.cpp +=================================================================== +--- src/text/ptbl/xp/pd_Document.cpp (revision 35109) ++++ src/text/ptbl/xp/pd_Document.cpp (revision 35110) +@@ -2450,7 +2450,7 @@ + { + UT_sint32 i = 0; + UT_DEBUGMSG(("pagesize docprop received \n")); +- const gchar * szP = pProps[i]; ++ const gchar * szP = pProps ? pProps[i] : NULL; + while(szP != NULL) + { + UT_DEBUGMSG(("property %s value %s \n",pProps[i],pProps[i+1])); +@@ -2463,7 +2463,7 @@ + { + UT_sint32 i = 0; + UT_DEBUGMSG(("metadata docprop received \n")); +- const gchar * szName = pProps[i]; ++ const gchar * szName = pProps ? pProps[i] : NULL; + while(szName != NULL) + { + szValue = pProps[i+1]; +@@ -4533,8 +4533,6 @@ + + // we need to loop through subsequent revisions, + // working out the their cumulative effect +- i = 1; +- + for(i = 1; i <= iMyMaxId; i++) + { + pRev = pRevisions->getRevisionWithId(i,iMinId); +Index: src/af/gr/xp/gr_CairoGraphics.cpp +=================================================================== +--- src/af/gr/xp/gr_CairoGraphics.cpp (revision 35109) ++++ src/af/gr/xp/gr_CairoGraphics.cpp (revision 35110) +@@ -2556,6 +2556,10 @@ + _setProps(); + UT_ASSERT(pImg); + ++ if (!pImg) { ++ return; ++ } ++ + double idx = _tdudX(xDest); + double idy = _tdudY(yDest); + +Index: src/af/gr/xp/gr_Painter.cpp +=================================================================== +--- src/af/gr/xp/gr_Painter.cpp (revision 35109) ++++ src/af/gr/xp/gr_Painter.cpp (revision 35110) +@@ -32,10 +32,12 @@ + { + UT_ASSERT (m_pGr); + +- if (m_bCaretsDisabled) +- m_pGr->disableAllCarets(); +- +- m_pGr->beginPaint (); ++ if (m_pGr) { ++ if (m_bCaretsDisabled) { ++ m_pGr->disableAllCarets(); ++ } ++ m_pGr->beginPaint (); ++ } + } + + GR_Painter::~GR_Painter () +Index: src/af/xap/gtk/xap_UnixDlg_FileOpenSaveAs.cpp +=================================================================== +--- src/af/xap/gtk/xap_UnixDlg_FileOpenSaveAs.cpp (revision 35109) ++++ src/af/xap/gtk/xap_UnixDlg_FileOpenSaveAs.cpp (revision 35110) +@@ -152,9 +152,11 @@ + gpointer ptr) + #endif + { +- XAP_UnixDialog_FileOpenSaveAs * dlg = static_cast (ptr); ++ XAP_UnixDialog_FileOpenSaveAs * dlg = static_cast (ptr); + UT_ASSERT(dlg); +- dlg->previewPicture(); ++ if (dlg) { ++ dlg->previewPicture(); ++ } + return FALSE; + } + +@@ -161,7 +163,10 @@ + static void s_filetypechanged(GtkWidget * w, gpointer p) + { + XAP_UnixDialog_FileOpenSaveAs * dlg = static_cast(p); +- dlg->fileTypeChanged(w); ++ UT_ASSERT(dlg); ++ if (dlg) { ++ dlg->fileTypeChanged(w); ++ } + } + + static gint +Index: src/af/xap/xp/xap_CustomWidget.cpp +=================================================================== +--- src/af/xap/xp/xap_CustomWidget.cpp (revision 35109) ++++ src/af/xap/xp/xap_CustomWidget.cpp (revision 35110) +@@ -33,11 +33,14 @@ + { + GR_Graphics *gr = getGraphics(); + UT_ASSERT(gr); ++ if (!gr) { ++ return; ++ } + +- if (clip == NULL) ++ if (clip == NULL) { + queueDraw(); +- else +- { ++ } ++ else { + UT_Rect r( + gr->tdu(clip->left), + gr->tdu(clip->top), +Index: src/af/xap/xp/spell_manager.cpp +=================================================================== +--- src/af/xap/xp/spell_manager.cpp (revision 35109) ++++ src/af/xap/xp/spell_manager.cpp (revision 35110) +@@ -196,8 +196,10 @@ + { + UT_GenericVector *pVec = m_map.enumerate(); + UT_ASSERT(pVec); +- UT_VECTOR_PURGEALL (SpellCheckerClass *, (*pVec)); +- DELETEP(pVec); ++ if (pVec) { ++ UT_VECTOR_PURGEALL (SpellCheckerClass *, (*pVec)); ++ DELETEP(pVec); ++ } + } + + /*! +Index: src/af/util/unix/ut_unixTimer.cpp +=================================================================== +--- src/af/util/unix/ut_unixTimer.cpp (revision 35109) ++++ src/af/util/unix/ut_unixTimer.cpp (revision 35110) +@@ -66,10 +66,11 @@ + UT_ASSERT(pTimer); + + xxx_UT_DEBUGMSG(("ut_unixTimer.cpp: timer fired\n")); +- +- pTimer->fire(); +- +- return true; ++ if (pTimer) { ++ pTimer->fire(); ++ return true; ++ } ++ return 0; + } + + UT_sint32 UT_UNIXTimer::set(UT_uint32 iMilliseconds) +Index: src/af/util/xp/ut_vector.h +=================================================================== +--- src/af/util/xp/ut_vector.h (revision 35109) ++++ src/af/util/xp/ut_vector.h (revision 35110) +@@ -372,7 +372,9 @@ + { + UT_ASSERT_HARMLESS(m_iCount > 0); + UT_ASSERT_HARMLESS(m_pEntries); +- ++ if (!m_pEntries) { ++ return T(); ++ } + return m_pEntries[0]; + } + +@@ -452,6 +454,10 @@ + { + clear(); + ++ if (!pVec) { ++ return false; ++ } ++ + for (UT_sint32 i=0; i < pVec->m_iCount; i++) + { + UT_sint32 err; +@@ -461,7 +467,7 @@ + return (err ? true : false); + } + +- return 0; ++ return false; + } + + template + +------------------------------------------------------------------------ +r35466 | msevior | 2018-06-25 19:32:32 -0400 (Mon, 25 Jun 2018) | 3 lines + +Commit fix for flicker and caret problems. This was caused by the m_pG->flush call at the end of gr_Caret.cpp::_blink() method. + + + +Index: src/af/gr/gtk/gr_UnixCairoGraphics.cpp +=================================================================== +--- src/af/gr/gtk/gr_UnixCairoGraphics.cpp (revision 35465) ++++ src/af/gr/gtk/gr_UnixCairoGraphics.cpp (revision 35466) +@@ -380,6 +380,7 @@ + { + UT_sint32 oldDY = tdu(getPrevYOffset()); + UT_sint32 oldDX = tdu(getPrevXOffset()); ++ + UT_sint32 newY = getPrevYOffset() + dy; + UT_sint32 newX = getPrevXOffset() + dx; + UT_sint32 ddx = -(tdu(newX) - oldDX); +Index: src/af/gr/xp/gr_Caret.cpp +=================================================================== +--- src/af/gr/xp/gr_Caret.cpp (revision 35465) ++++ src/af/gr/xp/gr_Caret.cpp (revision 35466) +@@ -31,6 +31,11 @@ + #include "gr_Graphics.h" + #include "gr_Painter.h" + #include "ut_debugmsg.h" ++#include ++#include ++#include ++#include ++ + static const UT_uint32 CURSOR_DELAY_TIME = 10; // milliseconds + + #ifdef TOOLKIT_GTK_ALL +@@ -57,6 +62,11 @@ + m_yPoint2(0), + m_pClr(NULL), + m_pG(pG), ++ m_iWindowWidth(0), ++ m_iWindowHeight(0), ++ m_worker(NULL), ++ m_enabler(NULL), ++ m_blinkTimeout(NULL), + m_nDisableCount(1), + m_bCursorBlink(true), + m_bCursorIsOn(false), +@@ -71,7 +81,9 @@ + m_bRemote(false), + m_clrRemote(0,0,0), + m_sID(""), +- m_iCaretNumber(0) ++ m_iCaretNumber(0), ++ m_iLastDrawTime(0), ++ m_iRetry(0) + { + UT_WorkerFactory::ConstructMode outMode = UT_WorkerFactory::NONE; + m_worker = static_cast(UT_WorkerFactory::static_constructor +@@ -98,6 +110,11 @@ + m_yPoint2(0), + m_pClr(NULL), + m_pG(pG), ++ m_iWindowWidth(0), ++ m_iWindowHeight(0), ++ m_worker(NULL), ++ m_enabler(NULL), ++ m_blinkTimeout(NULL), + m_nDisableCount(1), + m_bCursorBlink(true), + m_bCursorIsOn(false), +@@ -112,7 +129,9 @@ + m_bRemote(true), + m_clrRemote(0,0,0), + m_sID(sId), +- m_iCaretNumber(0) ++ m_iCaretNumber(0), ++ m_iLastDrawTime(0), ++ m_iRetry(0) + { + UT_WorkerFactory::ConstructMode outMode = UT_WorkerFactory::NONE; + m_worker = static_cast(UT_WorkerFactory::static_constructor +@@ -146,9 +165,11 @@ + void GR_Caret::s_work(UT_Worker * _w) + { + GR_Caret * c = static_cast(_w->getInstanceData()); +- ++ UT_DEBUGMSG((" Caret timer called Disable Count = %d \n",c->m_nDisableCount)); + if (c->m_nDisableCount == 0) ++ { + c->_blink(false); ++ } + } + + /** One-time enabler. */ +@@ -171,9 +192,12 @@ + + void GR_Caret::s_blink_timeout(UT_Worker * _w) + { ++ return; ++ /* + GR_Caret * c = static_cast(_w->getInstanceData()); + if (c->isEnabled()) + c->disable(); ++ */ + } + + UT_uint32 GR_Caret::_getCursorBlinkTime() const +@@ -271,13 +295,17 @@ + + // If the caret is already enabled, just return + if (m_nDisableCount == 0) ++ { ++ xxx_UT_DEBUGMSG(("Don't emable disable Count is already zero \n")); + return; +- ++ } + // Check to see if we still have pending disables. + --m_nDisableCount; +- if (m_nDisableCount) ++ if (m_nDisableCount != 0) ++ { ++ xxx_UT_DEBUGMSG(("Don't emable, disable Count has not reached zero \n")); + return; +- ++ } + // stop pending enables; in 10 ms, really enable blinking. + m_enabler->stop(); + m_enabler->start(); +@@ -327,11 +355,12 @@ + { + if(m_bRecursiveDraw) + { +- xxx_UT_DEBUGMSG(("Doing recursive Erase! - abort \n")); ++ xxx_UT_DEBUGMSG(("Doing recursive Just Erase! - abort \n")); + return; + } + if (m_bCursorIsOn && (((xPoint -m_pG->tlu(2)-1) <= m_xPoint) && (xPoint >= (m_xPoint-m_pG->tlu(2))-1)) && ((yPoint - m_pG->tlu(1)) <= m_yPoint) && (yPoint >= (m_yPoint - m_pG->tlu(1)))) + { ++ xxx_UT_DEBUGMSG(("Doing Just Erase! now \n")); + m_pG->restoreRectangle(m_iCaretNumber*3+0); + if(m_bSplitCaret) + { +@@ -339,7 +368,7 @@ + m_pG->restoreRectangle(m_iCaretNumber*3+2); + m_bSplitCaret = false; + } +- m_bCursorIsOn = !m_bCursorIsOn; ++ m_bCursorIsOn = false; + m_nDisableCount = 1; + } + } +@@ -359,7 +388,27 @@ + } + if (!m_bPositionSet) + return; ++ struct timespec spec; + ++ clock_gettime(CLOCK_REALTIME, &spec); ++ ++ UT_sint32 s = spec.tv_sec; ++ long ms = round(spec.tv_nsec / 1.0e6); // Convert nanoseconds to milliseconds ++ long this_time = 1000*s + ms; ++ long time_between = this_time - m_iLastDrawTime; ++ m_iLastDrawTime = this_time; ++ if(time_between < 100) ++ { ++ m_iRetry++; ++ if(!m_bCursorIsOn) ++ { ++ return; ++ } ++ } ++ else ++ { ++ m_iRetry = 0; ++ } + m_bRecursiveDraw = true; + GR_Painter painter (m_pG, false); + m_bRecursiveDraw = false; +@@ -383,6 +432,7 @@ + + if (m_bCursorIsOn) + { ++ xxx_UT_DEBUGMSG(("Clear Caret reTry %d \n",m_iRetry)); + m_pG->restoreRectangle(m_iCaretNumber*3+0); + + if(m_bSplitCaret) +@@ -391,6 +441,7 @@ + m_pG->restoreRectangle(m_iCaretNumber*3+2); + m_bSplitCaret = false; + } ++ m_bCursorIsOn = false; + } + else + { +@@ -416,7 +467,9 @@ + m_yPoint+m_pG->tlu(1), + m_pG->tlu(5), + m_iPointHeight+m_pG->tlu(2)); ++ m_bRecursiveDraw = false; + m_pG->allCarets()->JustErase(m_xPoint,m_yPoint); ++ m_bRecursiveDraw = true; + m_pG->saveRectangle(r0,m_iCaretNumber*3+0); + + if((m_xPoint != m_xPoint2) || (m_yPoint != m_yPoint2)) +@@ -449,7 +502,7 @@ + if(m_bCaret1OnScreen) + { + // draw the primary caret +- xxx_UT_DEBUGMSG(("blink cursor turned on \n")); ++ xxx_UT_DEBUGMSG(("Draw Caret reTry %d \n",m_iRetry)); + + UT_sint32 x1 = m_xPoint + iDelta * m_pG->tlu(1); + UT_sint32 x2 = m_xPoint; +@@ -466,6 +519,7 @@ + m_yPoint + m_pG->tlu(1), + x2, + m_yPoint + m_iPointHeight + m_pG->tlu(1)); ++ m_bCursorIsOn = true; + } + + if(m_bSplitCaret) +@@ -502,6 +556,7 @@ + m_xPoint + m_pG->tlu(2), + m_yPoint + m_pG->tlu(2)); + } ++ m_bCursorIsOn = true; + } + + // Now we deal with the secondary caret needed on ltr-rtl boundary +@@ -560,6 +615,7 @@ + m_xPoint2 /*- m_pG->tlu(1)*/, + m_yPoint2 + m_pG->tlu(2)); + } ++ m_bCursorIsOn = true; + } + + } +@@ -566,11 +622,11 @@ + + } + +- m_bCursorIsOn = !m_bCursorIsOn; + m_pG->setColor(oldColor); + m_bRecursiveDraw = false; + } +- m_pG->flush(); ++ if(bExplicit && !m_bCursorIsOn) ++ m_pG->flush(); + } + + /*! +Index: src/af/gr/xp/gr_Caret.h +=================================================================== +--- src/af/gr/xp/gr_Caret.h (revision 35465) ++++ src/af/gr/xp/gr_Caret.h (revision 35466) +@@ -121,6 +121,8 @@ + UT_RGBColor m_clrRemote; + std::string m_sID; + UT_sint32 m_iCaretNumber; ++ long m_iLastDrawTime; ++ UT_sint32 m_iRetry; + }; + + class ABI_EXPORT GR_CaretDisabler +Index: src/af/util/unix/ut_unixTimer.cpp +=================================================================== +--- src/af/util/unix/ut_unixTimer.cpp (revision 35465) ++++ src/af/util/unix/ut_unixTimer.cpp (revision 35466) +@@ -68,7 +68,7 @@ + xxx_UT_DEBUGMSG(("ut_unixTimer.cpp: timer fired\n")); + if (pTimer) { + pTimer->fire(); +- return true; ++ return TRUE; + } + return 0; + }