Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGonzalo Odiard <godiard@gmail.com>2012-12-05 20:12:00 (GMT)
committer Gonzalo Odiard <godiard@gmail.com>2012-12-05 20:12:00 (GMT)
commit685b62945c5e58424a1c4b81d4d54119f44e76df (patch)
treea5596c70bdcbe092594d31314e3233a909e9416f
parentc84870f29f54a6d087510d2aa6c0323349a05126 (diff)
olpc10 rpm version
Include avoid-maliit-crash.patch (OLPC #12311) and abiword-change-keyboard-focus-logic.diff to improve scrolling with osk
-rw-r--r--abiword-change-keyboard-focus-logic.diff111
-rw-r--r--abiword.spec8
-rw-r--r--avoid-maliit-crash.patch13
3 files changed, 131 insertions, 1 deletions
diff --git a/abiword-change-keyboard-focus-logic.diff b/abiword-change-keyboard-focus-logic.diff
new file mode 100644
index 0000000..d8aa991
--- /dev/null
+++ b/abiword-change-keyboard-focus-logic.diff
@@ -0,0 +1,111 @@
+diff --git a/src/af/ev/gtk/ev_UnixMouse.cpp b/src/af/ev/gtk/ev_UnixMouse.cpp
+index 8c1d4ed..8e88793 100644
+--- a/src/af/ev/gtk/ev_UnixMouse.cpp
++++ b/src/af/ev/gtk/ev_UnixMouse.cpp
+@@ -40,7 +40,8 @@ EV_UnixMouse::EV_UnixMouse(EV_EditEventMapper * pEEM)
+ m_bLastTouchValid(FALSE),
+ m_bTouchOngoing(FALSE),
+ m_bScrollDragOngoing(FALSE),
+- m_pThresholdTimer(NULL)
++ m_pThresholdTimer(NULL),
++ m_pEventWidget(NULL)
+ {
+ }
+
+@@ -120,6 +121,7 @@ void EV_UnixMouse::mouseUp(AV_View* pView, GdkEventButton* e)
+ {
+ case EV_EEMR_COMPLETE:
+ UT_ASSERT(pEM);
++ gtk_widget_grab_focus (gtk_get_event_widget ((GdkEvent *) e));
+ invokeMouseMethod(pView, pEM, static_cast<UT_sint32>(pView->getGraphics()->tluD(e->x)), static_cast<UT_sint32>(pView->getGraphics()->tluD(e->y)));
+ signal(emc|mop|emb|ems, static_cast<UT_sint32>(pView->getGraphics()->tluD(e->x)), static_cast<UT_sint32>(pView->getGraphics()->tluD(e->y)));
+ return;
+@@ -180,6 +182,9 @@ void EV_UnixMouse::stopScroll (UT_Worker* pWorker)
+ UT_ASSERT(0);
+ return;
+ }
++
++ if (pMouse->m_pEventWidget)
++ gtk_widget_grab_focus (pMouse->m_pEventWidget);
+ }
+
+ void EV_UnixMouse::mouseClick(AV_View* pView, GdkEventButton* e)
+@@ -207,6 +212,7 @@ void EV_UnixMouse::mouseClick(AV_View* pView, GdkEventButton* e)
+ m_iTouchY = (gint) e->y;
+ m_iLastTouchX = (int) e->x;
+ m_iLastTouchY = (int) e->y;
++ m_pEventWidget = gtk_get_event_widget ((GdkEvent *) e);
+
+ if (m_pThresholdTimer)
+ m_pThresholdTimer->stop();
+@@ -271,6 +277,7 @@ void EV_UnixMouse::mouseClick(AV_View* pView, GdkEventButton* e)
+ {
+ case EV_EEMR_COMPLETE:
+ UT_ASSERT(pEM);
++ gtk_widget_grab_focus (gtk_get_event_widget ((GdkEvent *) e));
+ invokeMouseMethod(pView,pEM,static_cast<UT_sint32>(pView->getGraphics()->tluD(e->x)),static_cast<UT_sint32>(pView->getGraphics()->tluD(e->y)));
+ signal(emc|mop|emb|state, static_cast<UT_sint32>(pView->getGraphics()->tluD(e->x)),static_cast<UT_sint32>(pView->getGraphics()->tluD(e->y)));
+
+diff --git a/src/af/ev/gtk/ev_UnixMouse.h b/src/af/ev/gtk/ev_UnixMouse.h
+index 1aac31f..7eb21ff 100644
+--- a/src/af/ev/gtk/ev_UnixMouse.h
++++ b/src/af/ev/gtk/ev_UnixMouse.h
+@@ -23,6 +23,7 @@
+ #define EV_UNIXMOUSE_H
+
+ #include <gdk/gdk.h>
++#include <gtk/gtk.h>
+
+ #include "ut_types.h"
+ #include "ut_timer.h"
+@@ -58,6 +59,7 @@ protected:
+ bool m_bScrollDragOngoing;
+ AV_View * m_pScrolledView;
+ UT_Timer * m_pThresholdTimer;
++ GtkWidget * m_pEventWidget;
+ };
+
+ #endif // EV_UNIXMOUSE_H
+diff --git a/src/af/xap/gtk/xap_UnixFrameImpl.cpp b/src/af/xap/gtk/xap_UnixFrameImpl.cpp
+index edde978..c85bd25 100644
+--- a/src/af/xap/gtk/xap_UnixFrameImpl.cpp
++++ b/src/af/xap/gtk/xap_UnixFrameImpl.cpp
+@@ -1530,11 +1530,6 @@ void XAP_UnixFrameImpl::_createTopLevelWindow(void)
+ g_signal_connect(G_OBJECT(m_wTopLevelWindow), "size_allocate",
+ G_CALLBACK(_fe::sizeAllocate), NULL);
+
+- g_signal_connect(G_OBJECT(m_wTopLevelWindow), "focus_in_event",
+- G_CALLBACK(_fe::focusIn), NULL);
+- g_signal_connect(G_OBJECT(m_wTopLevelWindow), "focus_out_event",
+- G_CALLBACK(_fe::focusOut), NULL);
+-
+ DragInfo * dragInfo = s_getDragInfo();
+
+ gtk_drag_dest_set (m_wTopLevelWindow,
+@@ -1574,11 +1569,6 @@ void XAP_UnixFrameImpl::_createTopLevelWindow(void)
+ g_signal_connect(G_OBJECT(m_wTopLevelWindow), "destroy",
+ G_CALLBACK(_fe::destroy), NULL);
+
+- g_signal_connect(G_OBJECT(m_wTopLevelWindow), "focus_in_event",
+- G_CALLBACK(_fe::focus_in_event), NULL);
+- g_signal_connect(G_OBJECT(m_wTopLevelWindow), "focus_out_event",
+- G_CALLBACK(_fe::focus_out_event), NULL);
+-
+ // create a VBox inside it.
+
+ m_wVBox = gtk_box_new(GTK_ORIENTATION_VERTICAL,0);
+diff --git a/src/wp/ap/gtk/ap_UnixFrameImpl.cpp b/src/wp/ap/gtk/ap_UnixFrameImpl.cpp
+index b5266ac..4f1def1 100644
+--- a/src/wp/ap/gtk/ap_UnixFrameImpl.cpp
++++ b/src/wp/ap/gtk/ap_UnixFrameImpl.cpp
+@@ -249,10 +249,6 @@ GtkWidget * AP_UnixFrameImpl::_createDocumentWindow()
+ g_signal_connect(G_OBJECT(m_dArea), "configure_event",
+ G_CALLBACK(XAP_UnixFrameImpl::_fe::configure_event), NULL);
+
+- // focus and XIM related
+- g_signal_connect(G_OBJECT(m_dArea), "enter_notify_event", G_CALLBACK(ap_focus_in_event), this);
+- g_signal_connect(G_OBJECT(m_dArea), "leave_notify_event", G_CALLBACK(ap_focus_out_event), this);
+-
+ //
+ // Need this to fix screen flicker for abiwidget on focus in/out
+ //
diff --git a/abiword.spec b/abiword.spec
index 17bc8b8..863a461 100644
--- a/abiword.spec
+++ b/abiword.spec
@@ -5,7 +5,7 @@
Summary: The AbiWord word processor
Name: abiword
Version: %{majorversion}.%{minorversion}.%{microversion}
-Release: 1.git20121011%{?dist}.olpc9
+Release: 1.git20121011%{?dist}.olpc
Epoch: 1
Group: Applications/Editors
License: GPLv2+
@@ -38,10 +38,14 @@ Patch4: introspection-fixes.patch
Patch5: memory-allocator-confusion.patch
Patch6: abi-introspection.diff
+# Avoid crash with maliit - SL#4037 - OLPC #12311
+Patch10: avoid-maliit-crash.patch
+
# OLPC patch to add touch text handles
Patch99: abi-selection-handles.diff
Patch100: abiword-set-both-handles-below-baseline.diff
Patch101: abiword-touch-scrolling.diff
+Patch102: abiword-change-keyboard-focus-logic.diff
BuildRequires: autoconf, libtool
BuildRequires: desktop-file-utils
@@ -90,10 +94,12 @@ Includes and definitions for developing with libabiword.
%patch4 -p1
%patch5 -p1
%patch6 -p1
+%patch10 -p1
%patch99 -p1
%patch100 -p1
%patch101 -p1
+%patch102 -p1
# setup abiword documentation
%setup -q -T -b 1 -n abiword-docs-%{version}
diff --git a/avoid-maliit-crash.patch b/avoid-maliit-crash.patch
new file mode 100644
index 0000000..f76accf
--- /dev/null
+++ b/avoid-maliit-crash.patch
@@ -0,0 +1,13 @@
+diff -ur abiword-20121011.ori/src/af/xap/gtk/xap_UnixFrameImpl.cpp abiword-20121011/src/af/xap/gtk/xap_UnixFrameImpl.cpp
+--- abiword-20121011.ori/src/af/xap/gtk/xap_UnixFrameImpl.cpp 2012-10-16 14:31:21.010000248 +0000
++++ abiword-20121011/src/af/xap/gtk/xap_UnixFrameImpl.cpp 2012-10-16 14:33:40.270000253 +0000
+@@ -1754,6 +1754,9 @@
+
+ PT_DocPosition begin_p, end_p, here;
+
++ if (!pView)
++ return FALSE;
++
+ begin_p = pView->mapDocPosSimple (FV_DOCPOS_BOB);
+ end_p = pView->mapDocPosSimple (FV_DOCPOS_EOB);
+ here = pView->getInsPoint ();