From a336c6a98ac1ea2e3675b847c5dcb17faef14381 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Thu, 24 Apr 2008 05:07:26 +0000 Subject: Fix a possible crash in the appearance capplet with invalid metacity themes (launchpad #199402) --- metacity-theme-crash.patch | 39 +++++++++++++++++++++++++++++++++++++++ metacity.spec | 10 +++++++++- 2 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 metacity-theme-crash.patch 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 - 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 - 2.22.0-2 - Add patch to fix focus of keep-above windows http://bugzilla.gnome.org/show_bug.cgi?id=519188 -- cgit