[oxygen-gtk3] fix firefox-gtk3 crash (#1065099, kde#331020)

Alexey Kurov nucleo at fedoraproject.org
Thu Feb 27 09:54:38 UTC 2014


commit d67a410c814126e7bc09b0832bfd49fc5a889adf
Author: nucleo <nucleo at fedoraproject.org>
Date:   Thu Feb 27 11:55:27 2014 +0200

    fix firefox-gtk3 crash (#1065099, kde#331020)

 oxygen-gtk3-firefox.patch |   53 +++++++++++++++++++++++++++++++++++++++++++++
 oxygen-gtk3.spec          |    8 ++++++-
 2 files changed, 60 insertions(+), 1 deletions(-)
---
diff --git a/oxygen-gtk3-firefox.patch b/oxygen-gtk3-firefox.patch
new file mode 100644
index 0000000..3dbfef3
--- /dev/null
+++ b/oxygen-gtk3-firefox.patch
@@ -0,0 +1,53 @@
+commit 30d2bad2bc18bc7859ee2316b7548704fed00b0e
+Author: Hugo Pereira Da Costa <hugo.pereira at free.fr>
+Date:   Wed Feb 12 10:35:32 2014 +0100
+
+    Only register menubar to animation engine if the widget is actually valid.
+    CCBUG: 331020
+
+diff --git a/src/oxygenthemingengine.cpp b/src/oxygenthemingengine.cpp
+index bb06fd8..8cc59a9 100644
+--- a/src/oxygenthemingengine.cpp
++++ b/src/oxygenthemingengine.cpp
+@@ -1027,23 +1027,30 @@ namespace Oxygen
+             if( Gtk::gtk_widget_path_has_type( path, GTK_TYPE_FRAME ) )
+             { Style::instance().renderGroupBoxBackground( context, widget, x, y, w, h, Blend ); }
+ 
+-            MenuBarStateEngine& engine( Style::instance().animations().menuBarStateEngine() );
+-            engine.registerWidget(widget);
+-
+-            // draw animated or fade-out rect
+-            if( engine.animatedRectangleIsValid( widget ) )
++            if( widget )
+             {
+ 
+-                const GdkRectangle& rect( engine.animatedRectangle( widget ) );
+-                Style::instance().renderMenuItemRect( context, 0L, engine.widget( widget, AnimationCurrent ), rect.x, rect.y+MenuItem_Margin, rect.width, rect.height-2*MenuItem_Margin, Hover|Blend );
++                // animation
++                MenuBarStateEngine& engine( Style::instance().animations().menuBarStateEngine() );
++                engine.registerWidget(widget);
++
++                // draw animated or fade-out rect
++                if( engine.animatedRectangleIsValid( widget ) )
++                {
++
++                    const GdkRectangle& rect( engine.animatedRectangle( widget ) );
++                    Style::instance().renderMenuItemRect( context, 0L, engine.widget( widget, AnimationCurrent ), rect.x, rect.y+MenuItem_Margin, rect.width, rect.height-2*MenuItem_Margin, Hover|Blend );
+ 
+-            } else if( engine.isAnimated( widget, AnimationPrevious ) ) {
++                } else if( engine.isAnimated( widget, AnimationPrevious ) ) {
+ 
+-                const AnimationData data( engine.animationData( widget, AnimationPrevious ) );
+-                const GdkRectangle& rect( engine.rectangle( widget, AnimationPrevious ) );
+-                Style::instance().renderMenuItemRect( context, 0L, engine.widget( widget, AnimationPrevious ), rect.x, rect.y+MenuItem_Margin, rect.width, rect.height-2*MenuItem_Margin, Hover|Blend, data );
++                    const AnimationData data( engine.animationData( widget, AnimationPrevious ) );
++                    const GdkRectangle& rect( engine.rectangle( widget, AnimationPrevious ) );
++                    Style::instance().renderMenuItemRect( context, 0L, engine.widget( widget, AnimationPrevious ), rect.x, rect.y+MenuItem_Margin, rect.width, rect.height-2*MenuItem_Margin, Hover|Blend, data );
++
++                }
+ 
+             }
++
+             return;
+ 
+         } else if( gtk_theming_engine_has_class( engine, GTK_STYLE_CLASS_MENU ) ) {
diff --git a/oxygen-gtk3.spec b/oxygen-gtk3.spec
index 1acd885..f438690 100644
--- a/oxygen-gtk3.spec
+++ b/oxygen-gtk3.spec
@@ -2,7 +2,7 @@
 Name:		oxygen-gtk3
 Epoch:		1
 Version:	1.3.3
-Release:	2%{?dist}
+Release:	3%{?dist}
 Summary:	Oxygen GTK+3 theme
 
 Group:		User Interface/Desktops
@@ -11,6 +11,8 @@ URL:		https://projects.kde.org/projects/playground/artwork/oxygen-gtk
 Source0:	ftp://ftp.kde.org/pub/kde/stable/oxygen-gtk3/%{version}/src/%{name}-%{version}.tar.bz2
 # http://commits.kde.org/oxygen-gtk/3e83da8b3967a6ae60c5c207496cc5b5192d65e9
 Patch0:		oxygen-gtk3-kde#330596.patch
+# http://commits.kde.org/oxygen-gtk/30d2bad2bc18bc7859ee2316b7548704fed00b0e
+Patch1:		oxygen-gtk3-firefox.patch
 
 BuildRequires:	cmake
 BuildRequires:	gtk3-devel
@@ -32,6 +34,7 @@ otherwise breaks every time some setting is changed in KDE.
 %prep
 %setup -q
 %patch0 -p1 -b .kde#330596
+%patch1 -p1 -b .firefox
 
 %build
 
@@ -63,6 +66,9 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Thu Feb 27 2014 Alexey Kurov <nucleo at fedoraproject.org> - 1:1.3.3-3
+- fix firefox-gtk3 crash (#1065099, kde#331020)
+
 * Sat Feb  1 2014 Alexey Kurov <nucleo at fedoraproject.org> - 1:1.3.3-2
 - fix folder toolbar in file chooser dialog (#1059795, kde#330596)
 


More information about the scm-commits mailing list