[libreoffice] 01/02: backport gtk3 style-updated signal patch. his closes: #837356 and hopefully also closes: #836416 for real.

Rene Engelhard rene at moszumanska.debian.org
Fri Sep 16 22:57:07 UTC 2016


This is an automated email from the git hooks/post-receive script.

rene pushed a commit to branch master
in repository libreoffice.

commit 02795f16c4fcd48410843660850cfa6926519b54
Author: Rene Engelhard <rene at debian.org>
Date:   Fri Sep 16 15:05:25 2016 +0200

    backport gtk3 style-updated signal patch. his closes: #837356 and hopefully also closes: #836416 for real.
---
 changelog                                  |  4 ++
 patches/gtk3-use-style-updated-signal.diff | 94 ++++++++++++++++++++++++++++++
 patches/series                             |  1 +
 3 files changed, 99 insertions(+)

diff --git a/changelog b/changelog
index 24123e6..78d1c67 100644
--- a/changelog
+++ b/changelog
@@ -1,6 +1,10 @@
 libreoffice (1:5.2.1-3) UNRELEASED; urgency=medium
 
+  * debian/patches/gtk3-use-style-updated-signal.diff: backport from master;
+    use style-updated instead of style-set signal. This closes: #837356 and
+    hopefully also closes: #836416 for real.
   * debian/patches/xfce-fallback-list.diff: remove again, didn't help
+
   * debiain/control.in: _really_ remove font depends from libreoffice
 
  -- Rene Engelhard <rene at debian.org>  Wed, 14 Sep 2016 08:11:38 +0200
diff --git a/patches/gtk3-use-style-updated-signal.diff b/patches/gtk3-use-style-updated-signal.diff
new file mode 100644
index 0000000..d4d405a
--- /dev/null
+++ b/patches/gtk3-use-style-updated-signal.diff
@@ -0,0 +1,94 @@
+From ef7abe81df10cb8a8c04afbb1fbe700f94e73f04 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm at redhat.com>
+Date: Fri, 16 Sep 2016 11:19:52 +0100
+Subject: Resolves: rhbz#1373933 gtk 3.21 emits a lot more "style-set" signals
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+also deb#837356
+
+since gtk3 commit of...
+
+commit 0f116135f4a5033ce4e9dfa19f10624701fa615c
+Author: Matthias Clasen <mclasen at redhat.com>
+Date:   Fri May 6 10:12:14 2016 -0400
+
+    Avoid emitting ::style-set by name
+
+    GtkStyle is deprecated, but we still emit ::style-set quite
+    a bit, so lets at least not be slow while doing it.
+
+docs say...
+
+'GtkWidget::style-set has been deprecated since version 3.0 and should not be
+used in newly-written code.
+
+Use the “style-updated” signal'
+
+and this code just came over from gtk2 without any thought about it at the
+time, so change it over to the "style-updated" which makes everything happy
+again
+
+Change-Id: I9e920d2fb2d820ff1b1b5a9ecb228484df3d6146
+
+diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx
+index b9fafd6..0cdff6c 100644
+--- a/vcl/inc/unx/gtk/gtkframe.hxx
++++ b/vcl/inc/unx/gtk/gtkframe.hxx
+@@ -239,7 +239,11 @@ class GtkSalFrame : public SalFrame
+ 
+     // signals
+     static gboolean     signalButton( GtkWidget*, GdkEventButton*, gpointer );
+-    static void         signalStyleSet( GtkWidget*, GtkStyle* pPrevious, gpointer );
++#if GTK_CHECK_VERSION(3,0,0)
++    static void         signalStyleUpdated(GtkWidget*, gpointer);
++#else
++    static void         signalStyleSet(GtkWidget*, GtkStyle* pPrevious, gpointer);
++#endif
+ #if GTK_CHECK_VERSION(3,0,0)
+     static gboolean     signalDraw( GtkWidget*, cairo_t *cr, gpointer );
+     static void         sizeAllocated(GtkWidget*, GdkRectangle *pAllocation, gpointer frame);
+diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
+index 3a6eef7..49bce84 100644
+--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
++++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
+@@ -1009,7 +1009,7 @@ void GtkSalFrame::InitCommon()
+ 
+ 
+     // connect signals
+-    g_signal_connect( G_OBJECT(m_pWindow), "style-set", G_CALLBACK(signalStyleSet), this );
++    g_signal_connect( G_OBJECT(m_pWindow), "style-updated", G_CALLBACK(signalStyleUpdated), this );
+     gtk_widget_set_has_tooltip(pEventWidget, true);
+     m_aMouseSignalIds.push_back(g_signal_connect( G_OBJECT(pEventWidget), "query-tooltip", G_CALLBACK(signalTooltipQuery), this ));
+     m_aMouseSignalIds.push_back(g_signal_connect( G_OBJECT(pEventWidget), "button-press-event", G_CALLBACK(signalButton), this ));
+@@ -3101,22 +3101,13 @@ gboolean GtkSalFrame::signalDelete( GtkWidget*, GdkEvent*, gpointer frame )
+     return true;
+ }
+ 
+-void GtkSalFrame::signalStyleSet( GtkWidget*, GtkStyle* pPrevious, gpointer frame )
++void GtkSalFrame::signalStyleUpdated(GtkWidget*, gpointer frame)
+ {
+     GtkSalFrame* pThis = static_cast<GtkSalFrame*>(frame);
+ 
+-    // every frame gets an initial style set on creation
+-    // do not post these as the whole application tends to
+-    // redraw itself to adjust to the new style
+-    // where there IS no new style resulting in tremendous unnecessary flickering
+-    if( pPrevious != nullptr )
+-    {
+-        // signalStyleSet does NOT usually have the gdk lock
+-        // so post user event to safely dispatch the SalEvent::SettingsChanged
+-        // note: settings changed for multiple frames is avoided in winproc.cxx ImplHandleSettings
+-        GtkSalFrame::getDisplay()->SendInternalEvent( pThis, nullptr, SalEvent::SettingsChanged );
+-        GtkSalFrame::getDisplay()->SendInternalEvent( pThis, nullptr, SalEvent::FontChanged );
+-    }
++    // note: settings changed for multiple frames is avoided in winproc.cxx ImplHandleSettings
++    GtkSalFrame::getDisplay()->SendInternalEvent( pThis, nullptr, SalEvent::SettingsChanged );
++    GtkSalFrame::getDisplay()->SendInternalEvent( pThis, nullptr, SalEvent::FontChanged );
+ }
+ 
+ gboolean GtkSalFrame::signalWindowState( GtkWidget*, GdkEvent* pEvent, gpointer frame )
+-- 
+cgit v0.10.2
+
diff --git a/patches/series b/patches/series
index 8d6d406..92e98ee 100644
--- a/patches/series
+++ b/patches/series
@@ -30,3 +30,4 @@ rsc-no-error-about-unknown-switch.diff
 debian-branding.diff
 no-packagekit-per-default.diff
 sparc64.diff
+gtk3-use-style-updated-signal.diff

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-openoffice/libreoffice.git



More information about the Pkg-openoffice-commits mailing list