summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@fedoraproject.org>2008-04-24 05:11:09 +0000
committerMatthias Clasen <mclasen@fedoraproject.org>2008-04-24 05:11:09 +0000
commit3895e7dd4cce6fccba9be21c3c7befe1ed366442 (patch)
treeecb8d7ed7914d514c6ff2050a0ac94df934986c0
parentccb6dfe9b64e348f4f60a8e15a8f042326334be2 (diff)
downloadmetacity-3895e7dd4cce6fccba9be21c3c7befe1ed366442.tar.gz
metacity-3895e7dd4cce6fccba9be21c3c7befe1ed366442.tar.xz
metacity-3895e7dd4cce6fccba9be21c3c7befe1ed366442.zip
Fix a possible crash in the appearance capplet with invalid metacity themesmetacity-2_22_0-3_fc9
(launchpad #199402)
-rw-r--r--metacity-theme-crash.patch39
-rw-r--r--metacity.spec10
2 files changed, 48 insertions, 1 deletions
diff --git a/metacity-theme-crash.patch b/metacity-theme-crash.patch
new file mode 100644
index 0000000..50c3b09
--- /dev/null
+++ b/metacity-theme-crash.patch
@@ -0,0 +1,39 @@
+Index: src/ui/preview-widget.c
+===================================================================
+--- src/ui/preview-widget.c (revision 3666)
++++ src/ui/preview-widget.c (working copy)
+@@ -478,6 +478,19 @@
+
+ flags = (META_PREVIEW (preview)->flags);
+
++ window_xregion = gdk_region_new ();
++
++ xrect.x = 0;
++ xrect.y = 0;
++ xrect.width = new_window_width;
++ xrect.height = new_window_height;
++
++ gdk_region_union_with_rect (window_xregion, &xrect);
++
++ if (preview->theme == NULL)
++ return window_xregion;
++
++ /* Otherwise, we do have a theme, so calculate the corners */
+ frame_style = meta_theme_get_frame_style (preview->theme,
+ META_FRAME_TYPE_NORMAL, flags);
+
+@@ -558,14 +571,6 @@
+ }
+ }
+
+- window_xregion = gdk_region_new ();
+-
+- xrect.x = 0;
+- xrect.y = 0;
+- xrect.width = new_window_width;
+- xrect.height = new_window_height;
+-
+- gdk_region_union_with_rect (window_xregion, &xrect);
+ gdk_region_subtract (window_xregion, corners_xregion);
+ gdk_region_destroy (corners_xregion);
+
diff --git a/metacity.spec b/metacity.spec
index 6733470..c0c76fd 100644
--- a/metacity.spec
+++ b/metacity.spec
@@ -1,7 +1,7 @@
Summary: Metacity window manager
Name: metacity
Version: 2.22.0
-Release: 2%{?dist}
+Release: 3%{?dist}
URL: http://download.gnome.org/sources/metacity/
Source0: http://download.gnome.org/sources/metacity/2.22/metacity-%{version}.tar.bz2
Patch0: default-theme.patch
@@ -11,6 +11,9 @@ Patch2: skip-taskbar-tab.patch
Patch3: metacity-2.21.13-dont-move-windows.patch
# http://bugzilla.gnome.org/show_bug.cgi?id=519188
Patch4: metacity-2.22.0-keepabove.patch
+# fixed in upstream svn
+Patch5: metacity-theme-crash.patch
+
License: GPLv2+
Group: User Interface/Desktops
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -68,6 +71,7 @@ API. This package exists purely for technical reasons.
%patch2 -p1 -b .skip-taskbar-tab
%patch3 -p0 -b .dont-move-windows
%patch4 -p0 -b .keepabove
+%patch5 -p0 -b .theme-crash
%build
rm -rf $RPM_BUILD_ROOT
@@ -154,6 +158,10 @@ fi
%{_mandir}/man1/metacity-window-demo.1.gz
%changelog
+* Thu Apr 24 2008 Matthias Clasen <mclasen@redhat.com> - 2.22.0-3
+- Fix a possible crash in the appearance capplet with
+ invalid metacity themes (launchpad #199402)
+
* Wed Mar 12 2008 Marco Pesenti Gritti <mpg@redhat.com> - 2.22.0-2
- Add patch to fix focus of keep-above windows
http://bugzilla.gnome.org/show_bug.cgi?id=519188