diff options
Diffstat (limited to 'app-office/abiword/files/abiword-3.0.0-fix-redraw.patch')
-rw-r--r-- | app-office/abiword/files/abiword-3.0.0-fix-redraw.patch | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/app-office/abiword/files/abiword-3.0.0-fix-redraw.patch b/app-office/abiword/files/abiword-3.0.0-fix-redraw.patch new file mode 100644 index 000000000000..cad0a92d4143 --- /dev/null +++ b/app-office/abiword/files/abiword-3.0.0-fix-redraw.patch @@ -0,0 +1,56 @@ +From c260e8d107a8708d57a60fbc18ef71ffeb88fcf1 Mon Sep 17 00:00:00 2001 +From: Hubert Figuiere <hub@figuiere.net> +Date: Sat, 22 Feb 2014 18:42:56 +0000 +Subject: [PATCH] Bug 13582 - Fix redraw region in custom widget. + +Cherry-picked from trunk@33870 and reworked for 3.0.x + +git-svn-id: svn+ssh://svn.abisource.com/svnroot/abiword/branches/ABI-3-0-0-STABLE@33871 bcba8976-2d24-0410-9c9c-aab3bd5fdfd6 +--- + src/af/gr/gtk/gr_UnixCairoGraphics.cpp | 2 +- + src/af/xap/gtk/xap_UnixCustomWidget.cpp | 10 ++++++---- + 2 files changed, 7 insertions(+), 5 deletions(-) + +diff --git a/src/af/gr/gtk/gr_UnixCairoGraphics.cpp b/src/af/gr/gtk/gr_UnixCairoGraphics.cpp +index 4c8d23c..15d7a7d 100644 +--- a/src/af/gr/gtk/gr_UnixCairoGraphics.cpp ++++ b/src/af/gr/gtk/gr_UnixCairoGraphics.cpp +@@ -520,7 +520,7 @@ void GR_UnixCairoGraphics::_beginPaint() + { + UT_ASSERT(ev->type == GDK_EXPOSE || ev->type == GDK_DAMAGE); + if (ev->type == GDK_EXPOSE || ev->type == GDK_DAMAGE) +- UT_ASSERT(ev->expose.window == m_pWin); ++ UT_ASSERT(ev->expose.window == m_pWin || ev->expose.window == gdk_window_get_effective_parent (m_pWin)); + } + } + #endif +diff --git a/src/af/xap/gtk/xap_UnixCustomWidget.cpp b/src/af/xap/gtk/xap_UnixCustomWidget.cpp +index b0b7015..5150afe 100644 +--- a/src/af/xap/gtk/xap_UnixCustomWidget.cpp ++++ b/src/af/xap/gtk/xap_UnixCustomWidget.cpp +@@ -45,16 +45,18 @@ void XAP_UnixCustomWidget::_fe::expose(XAP_UnixCustomWidget *self, GdkEventExpos + #endif + { + #if GTK_CHECK_VERSION(3,0,0) +- GdkEventExpose *ev = reinterpret_cast<GdkEventExpose *>(gtk_get_current_event()); +-#endif ++ self->m_cr = cr; ++ double x1, y1, x2, y2; ++ cairo_clip_extents(cr, &x1, &y1, &x2, &y2); ++ ++ UT_Rect r(x1, y1, x2 - x1, y2 - y1); ++#else + UT_Rect r( + ev->area.x, + ev->area.y, + ev->area.width, + ev->area.height + ); +-#if GTK_CHECK_VERSION(3,0,0) +- self->m_cr = cr; + #endif + self->draw(&r); + } +-- +1.9.1 + |