mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
95 lines
4 KiB
Diff
95 lines
4 KiB
Diff
|
From ef7abe81df10cb8a8c04afbb1fbe700f94e73f04 Mon Sep 17 00:00:00 2001
|
||
|
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@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@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
|
||
|
|