tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
abiword: use remote patch
Jan Tojnar
8 years ago
f3e79be4
c97ea968
+5
-162
2 changed files
expand all
collapse all
unified
split
pkgs
applications
office
abiword
default.nix
patches
fix-13791.patch
+5
-1
pkgs/applications/office/abiword/default.nix
···
15
enableParallelBuilding = true;
16
17
patches = [
18
-
./patches/fix-13791.patch
0
0
0
0
19
];
20
21
buildInputs =
···
15
enableParallelBuilding = true;
16
17
patches = [
18
+
# https://bugzilla.abisource.com/show_bug.cgi?id=13791
19
+
(fetchurl {
20
+
url = https://bugzilla.abisource.com/attachment.cgi?id=5860;
21
+
sha256 = "02p8kz02xm1197zcpzjs010mna9hxsbq5lwgxr8b7qhh9yxja7al";
22
+
})
23
];
24
25
buildInputs =
-161
pkgs/applications/office/abiword/patches/fix-13791.patch
···
1
-
From 46388f407c893123d9b3824a7570b050fc3b049b Mon Sep 17 00:00:00 2001
2
-
From: James Cameron <quozl@laptop.org>
3
-
Date: Thu, 17 Aug 2017 15:05:39 +1000
4
-
Subject: [PATCH] Fix flickering
5
-
MIME-Version: 1.0
6
-
Content-Type: text/plain; charset=UTF-8
7
-
Content-Transfer-Encoding: 8bit
8
-
9
-
- in GR_Caret::s_blink_timeout, avoid repeated calls by stopping the
10
-
timer, it will be restarted when needed,
11
-
12
-
- in GR_Caret::s_enable, avoid extra unnecessary _blink calls when blink
13
-
is enabled, as they serve no purpose,
14
-
15
-
- in XAP_UnixFrameImpl::_fe::expose, use the Cairo clip rectangle
16
-
instead of the expose event area, thanks to Hubert Figuière in
17
-
865c1dda7e13deff04573ffc42028b71fee07f9c,
18
-
19
-
- in XAP_UnixFrameImpl::_fe::expose, do not return FALSE, as other
20
-
handlers will need to handle the draw event,
21
-
22
-
- in GR_UnixCairoGraphics::flush, fix excessive draw events;
23
-
gtk_widget_queue_draw only marks the widget as needing redrawing,
24
-
which causes a draw event for each call to flush, therefore every
25
-
caret blink, so use gdk_flush instead,
26
-
27
-
Fixes AbiSource #13791.
28
-
Fixes Debian #851052.
29
-
Fixes Fedora #1287835.
30
-
Fixes Ubuntu LP: #1574278.
31
-
Fixes Sugar Labs #4915.
32
-
33
-
Signed-off-by: James Cameron <quozl@laptop.org>
34
-
---
35
-
src/af/gr/gtk/gr_UnixCairoGraphics.cpp | 4 +---
36
-
src/af/gr/xp/gr_Caret.cpp | 13 ++++---------
37
-
src/af/xap/gtk/xap_UnixFrameImpl.cpp | 27 ++++++++++++++++++---------
38
-
src/af/xap/gtk/xap_UnixFrameImpl.h | 2 +-
39
-
4 files changed, 24 insertions(+), 22 deletions(-)
40
-
41
-
diff --git a/src/af/gr/gtk/gr_UnixCairoGraphics.cpp b/src/af/gr/gtk/gr_UnixCairoGraphics.cpp
42
-
index 509bd37..7c3c06f 100644
43
-
--- a/src/af/gr/gtk/gr_UnixCairoGraphics.cpp
44
-
+++ b/src/af/gr/gtk/gr_UnixCairoGraphics.cpp
45
-
@@ -577,9 +577,7 @@ void GR_UnixCairoGraphics::_endPaint()
46
-
47
-
void GR_UnixCairoGraphics::flush(void)
48
-
{
49
-
- if (m_Widget) {
50
-
- gtk_widget_queue_draw(m_Widget);
51
-
- }
52
-
+ gdk_flush();
53
-
}
54
-
55
-
bool GR_UnixCairoGraphics::queryProperties(GR_Graphics::Properties gp) const
56
-
diff --git a/src/af/gr/xp/gr_Caret.cpp b/src/af/gr/xp/gr_Caret.cpp
57
-
index 5d5d116..a8aa451 100644
58
-
--- a/src/af/gr/xp/gr_Caret.cpp
59
-
+++ b/src/af/gr/xp/gr_Caret.cpp
60
-
@@ -155,22 +155,17 @@ void GR_Caret::s_enable(UT_Worker * _w)
61
-
{
62
-
GR_Caret * c = static_cast<GR_Caret *>(_w->getInstanceData());
63
-
64
-
+ c->m_enabler->stop();
65
-
c->m_worker->stop();
66
-
- c->_blink(true);
67
-
- if (!c->m_bCursorIsOn)
68
-
- c->_blink(true); // blink again
69
-
- else
70
-
- {
71
-
- c->_blink(true); // ?? - MARCM
72
-
- c->_blink(true);
73
-
- }
74
-
c->m_worker->start();
75
-
- c->m_enabler->stop();
76
-
+ c->_blink(true);
77
-
}
78
-
79
-
void GR_Caret::s_blink_timeout(UT_Worker * _w)
80
-
{
81
-
GR_Caret * c = static_cast<GR_Caret *>(_w->getInstanceData());
82
-
+
83
-
+ c->m_blinkTimeout->stop();
84
-
if (c->isEnabled())
85
-
c->disable();
86
-
}
87
-
diff --git a/src/af/xap/gtk/xap_UnixFrameImpl.cpp b/src/af/xap/gtk/xap_UnixFrameImpl.cpp
88
-
index 780000e..e81961a 100644
89
-
--- a/src/af/xap/gtk/xap_UnixFrameImpl.cpp
90
-
+++ b/src/af/xap/gtk/xap_UnixFrameImpl.cpp
91
-
@@ -1208,15 +1208,23 @@ gint XAP_UnixFrameImpl::_fe::delete_event(GtkWidget * w, GdkEvent * /*event*/, g
92
-
}
93
-
94
-
#if GTK_CHECK_VERSION(3,0,0)
95
-
-gint XAP_UnixFrameImpl::_fe::draw(GtkWidget * w, cairo_t * cr)
96
-
+gboolean XAP_UnixFrameImpl::_fe::draw(GtkWidget * w, cairo_t * cr)
97
-
#else
98
-
gint XAP_UnixFrameImpl::_fe::expose(GtkWidget * w, GdkEventExpose* pExposeEvent)
99
-
#endif
100
-
{
101
-
XAP_UnixFrameImpl * pUnixFrameImpl = static_cast<XAP_UnixFrameImpl *>(g_object_get_data(G_OBJECT(w), "user_data"));
102
-
FV_View * pView = static_cast<FV_View *>(pUnixFrameImpl->getFrame()->getCurrentView());
103
-
+ double x, y, width, height;
104
-
#if GTK_CHECK_VERSION(3,0,0)
105
-
- GdkEventExpose *pExposeEvent = reinterpret_cast<GdkEventExpose *>(gtk_get_current_event());
106
-
+ cairo_clip_extents (cr, &x, &y, &width, &height);
107
-
+ width -= x;
108
-
+ height -= y;
109
-
+#else
110
-
+ x = pExposeEvent->area.x;
111
-
+ y = pExposeEvent->area.y;
112
-
+ width = pExposeEvent->area.width;
113
-
+ height = pExposeEvent->area.height;
114
-
#endif
115
-
/* Jean: commenting out next lines since the zoom update code does draw only
116
-
* part of what needs to be updated. */
117
-
@@ -1230,20 +1238,21 @@ gint XAP_UnixFrameImpl::_fe::expose(GtkWidget * w, GdkEventExpose* pExposeEvent)
118
-
UT_Rect rClip;
119
-
if (pGr->getPaintCount () > 0)
120
-
return TRUE;
121
-
- 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));
122
-
- rClip.left = pGr->tlu(pExposeEvent->area.x);
123
-
- rClip.top = pGr->tlu(pExposeEvent->area.y);
124
-
- rClip.width = pGr->tlu(pExposeEvent->area.width)+1;
125
-
- rClip.height = pGr->tlu(pExposeEvent->area.height)+1;
126
-
-#if GTK_CHECK_VERSION(3,0,0)
127
-
+ rClip.left = pGr->tlu(x);
128
-
+ rClip.top = pGr->tlu(y);
129
-
+ #if GTK_CHECK_VERSION(3,0,0)
130
-
+ rClip.width = pGr->tlu(width);
131
-
+ rClip.height = pGr->tlu(height);
132
-
static_cast<GR_CairoGraphics *>(pGr)->setCairo(cr);
133
-
pView->draw(&rClip);
134
-
static_cast<GR_CairoGraphics *>(pGr)->setCairo(NULL);
135
-
#else
136
-
+ rClip.width = pGr->tlu(width)+1;
137
-
+ rClip.height = pGr->tlu(height)+1;
138
-
pView->draw(&rClip);
139
-
#endif
140
-
}
141
-
- return FALSE;
142
-
+ return TRUE;
143
-
}
144
-
145
-
static bool bScrollWait = false;
146
-
diff --git a/src/af/xap/gtk/xap_UnixFrameImpl.h b/src/af/xap/gtk/xap_UnixFrameImpl.h
147
-
index 30ee5d8..26fbb2e 100644
148
-
--- a/src/af/xap/gtk/xap_UnixFrameImpl.h
149
-
+++ b/src/af/xap/gtk/xap_UnixFrameImpl.h
150
-
@@ -152,7 +152,7 @@ protected:
151
-
static gint key_release_event(GtkWidget* w, GdkEventKey* e);
152
-
static gint delete_event(GtkWidget * w, GdkEvent * /*event*/, gpointer /*data*/);
153
-
#if GTK_CHECK_VERSION(3,0,0)
154
-
- static gint draw(GtkWidget * w, cairo_t * cr);
155
-
+ static gboolean draw(GtkWidget * w, cairo_t * cr);
156
-
#else
157
-
static gint expose(GtkWidget * w, GdkEventExpose* pExposeEvent);
158
-
#endif
159
-
--
160
-
2.11.0
161
-
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0