summaryrefslogtreecommitdiff
path: root/extra/metacity
diff options
context:
space:
mode:
authorParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
committerParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
commit415856bdd4f48ab4f2732996f0bae58595092bbe (patch)
treeede2018b591f6dfb477fe9341ba17b9bc000fab9 /extra/metacity
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'extra/metacity')
-rw-r--r--extra/metacity/PKGBUILD37
-rw-r--r--extra/metacity/metacity-restartstyle.patch139
-rw-r--r--extra/metacity/metacity.install17
3 files changed, 193 insertions, 0 deletions
diff --git a/extra/metacity/PKGBUILD b/extra/metacity/PKGBUILD
new file mode 100644
index 000000000..8a9f0bd26
--- /dev/null
+++ b/extra/metacity/PKGBUILD
@@ -0,0 +1,37 @@
+# $Id: PKGBUILD 116879 2011-03-25 23:00:58Z ibiru $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=metacity
+pkgver=2.30.3
+pkgrel=2
+pkgdesc="A window manager for GNOME2"
+arch=(i686 x86_64)
+license=('GPL')
+depends=('startup-notification' 'gconf' 'zenity' 'libcanberra' 'libgtop' 'libwnck')
+makedepends=('intltool' 'pkgconfig' 'gnome-doc-utils')
+url="http://www.gnome.org"
+groups=('gnome')
+options=('!libtool' '!emptydirs')
+install=metacity.install
+source=(http://ftp.gnome.org/pub/gnome/sources/${pkgname}/2.30/${pkgname}-${pkgver}.tar.bz2
+ metacity-restartstyle.patch)
+sha256sums=('08f887018fa5e447cf184d03bae3fe2c05fdb7583bed6768e3b4d66392fc18dd'
+ '3a7e484ec2eb97e7b7f1baaa33e5d925e67a35c84e49c5abe6c32cf2c25f16eb')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ patch -Np1 -i "${srcdir}/metacity-restartstyle.patch"
+ ./configure --prefix=/usr --sysconfdir=/etc \
+ --libexecdir=/usr/lib/metacity \
+ --localstatedir=/var --disable-static
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR="${pkgdir}" install
+
+ install -m755 -d "${pkgdir}/usr/share/gconf/schemas"
+ gconf-merge-schema "${pkgdir}/usr/share/gconf/schemas/${pkgname}.schemas" --domain metacity ${pkgdir}/etc/gconf/schemas/*.schemas
+ rm -f ${pkgdir}/etc/gconf/schemas/*.schemas
+}
diff --git a/extra/metacity/metacity-restartstyle.patch b/extra/metacity/metacity-restartstyle.patch
new file mode 100644
index 000000000..54dd79e02
--- /dev/null
+++ b/extra/metacity/metacity-restartstyle.patch
@@ -0,0 +1,139 @@
+From a3de65d5d1861f755ced7cad291fbbd4f1b8ef51 Mon Sep 17 00:00:00 2001
+From: Owen W. Taylor <otaylor@fishsoup.net>
+Date: Sat, 22 Aug 2009 15:00:57 -0400
+Subject: [PATCH] Should set RestartStyleHint to RestartIfRunning when replaced
+
+This reverts most of commit abbd057eb967e6ab462ffe305f41b2b04d417b25;
+
+ - It's fine to call meta_session_shutdown() after the display
+ is closed, since it's talking over the ICE connection
+ - We should not call warn_about_lame_clients_and_finish_interact()
+ unless we are interacting with the window manager in a session
+ save.
+
+However, the part of abbd057 that fixed accessing freed memory was
+fixing a real problem; this patches does the same thing in a simpler
+way by fixing an obvious type in meta_display_close() where it was
+NULL'ing out the local variable 'display' rather than the global
+variable 'the_display' and adding keeping the check in meta_finalize()
+that was added in abbd057.
+
+The order of calling meta_session_shutdown() and
+calling meta_display_close() is reverted back to the old order to
+make it clear that it's OK if the display way already closed previously.
+
+http://bugzilla.gnome.org/show_bug.cgi?id=588119
+---
+ src/core/display-private.h | 2 +-
+ src/core/display.c | 16 ++++------------
+ src/core/main.c | 5 ++---
+ src/core/session.c | 8 --------
+ 4 files changed, 7 insertions(+), 24 deletions(-)
+
+diff --git a/src/core/display-private.h b/src/core/display-private.h
+index 19287f3..9c8ebc6 100644
+--- a/src/core/display-private.h
++++ b/src/core/display-private.h
+@@ -329,7 +329,7 @@ MetaScreen* meta_display_screen_for_xwindow (MetaDisplay *display,
+ void meta_display_grab (MetaDisplay *display);
+ void meta_display_ungrab (MetaDisplay *display);
+
+-void meta_display_unmanage_screen (MetaDisplay **display,
++void meta_display_unmanage_screen (MetaDisplay *display,
+ MetaScreen *screen,
+ guint32 timestamp);
+
+diff --git a/src/core/display.c b/src/core/display.c
+index 55c374a..8e35a35 100644
+--- a/src/core/display.c
++++ b/src/core/display.c
+@@ -926,7 +926,7 @@ meta_display_close (MetaDisplay *display,
+ meta_compositor_destroy (display->compositor);
+
+ g_free (display);
+- display = NULL;
++ the_display = NULL;
+
+ meta_quit (META_EXIT_SUCCESS);
+ }
+@@ -4762,13 +4762,10 @@ process_selection_clear (MetaDisplay *display,
+ meta_verbose ("Got selection clear for screen %d on display %s\n",
+ screen->number, display->name);
+
+- meta_display_unmanage_screen (&display,
++ meta_display_unmanage_screen (display,
+ screen,
+ event->xselectionclear.time);
+
+- if (!display)
+- the_display = NULL;
+-
+ /* display and screen may both be invalid memory... */
+
+ return;
+@@ -4790,12 +4787,10 @@ process_selection_clear (MetaDisplay *display,
+ }
+
+ void
+-meta_display_unmanage_screen (MetaDisplay **displayp,
++meta_display_unmanage_screen (MetaDisplay *display,
+ MetaScreen *screen,
+ guint32 timestamp)
+ {
+- MetaDisplay *display = *displayp;
+-
+ meta_verbose ("Unmanaging screen %d on display %s\n",
+ screen->number, display->name);
+
+@@ -4805,10 +4800,7 @@ meta_display_unmanage_screen (MetaDisplay **displayp,
+ display->screens = g_slist_remove (display->screens, screen);
+
+ if (display->screens == NULL)
+- {
+- meta_display_close (display, timestamp);
+- *displayp = NULL;
+- }
++ meta_display_close (display, timestamp);
+ }
+
+ void
+diff --git a/src/core/main.c b/src/core/main.c
+index a36a396..44d317e 100644
+--- a/src/core/main.c
++++ b/src/core/main.c
+@@ -361,12 +361,11 @@ static void
+ meta_finalize (void)
+ {
+ MetaDisplay *display = meta_get_display();
+-
+- meta_session_shutdown ();
+-
+ if (display)
+ meta_display_close (display,
+ CurrentTime); /* I doubt correct timestamps matter here */
++
++ meta_session_shutdown ();
+ }
+
+ static void
+diff --git a/src/core/session.c b/src/core/session.c
+index 7e3b389..0d69350 100644
+--- a/src/core/session.c
++++ b/src/core/session.c
+@@ -376,14 +376,6 @@ meta_session_shutdown (void)
+ SmProp *props[1];
+ char hint = SmRestartIfRunning;
+
+- if (!meta_get_display ())
+- {
+- meta_verbose ("Cannot close session because there is no display");
+- return;
+- }
+-
+- warn_about_lame_clients_and_finish_interact (FALSE);
+-
+ if (session_connection == NULL)
+ return;
+
+--
+1.6.4 \ No newline at end of file
diff --git a/extra/metacity/metacity.install b/extra/metacity/metacity.install
new file mode 100644
index 000000000..2eb1e5094
--- /dev/null
+++ b/extra/metacity/metacity.install
@@ -0,0 +1,17 @@
+pkgname=metacity
+
+post_install() {
+ usr/sbin/gconfpkg --install ${pkgname}
+}
+
+pre_upgrade() {
+ pre_remove $1
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ usr/sbin/gconfpkg --uninstall ${pkgname}
+}