From 895e688a7b8248137b8e89b6992772af51842fda Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Wed, 29 Jul 2009 11:33:00 +0000 Subject: [PATCH] - Add patch to fix mutter --replace --- mutter-pluginmanager.patch | 78 ++++++++++++++++++++++++++++++++++++++ mutter.spec | 7 +++- 2 files changed, 84 insertions(+), 1 deletion(-) create mode 100644 mutter-pluginmanager.patch diff --git a/mutter-pluginmanager.patch b/mutter-pluginmanager.patch new file mode 100644 index 0000000..c24c7fa --- /dev/null +++ b/mutter-pluginmanager.patch @@ -0,0 +1,78 @@ +From d91d503eb25412432e8aa9b4863d469d5828a4b7 Mon Sep 17 00:00:00 2001 +From: Owen W. Taylor +Date: Wed, 22 Jul 2009 18:37:43 +0000 +Subject: Pass event to clutter when the plugin doesn't have xevent_filter + +With recent changes, Clutter no longer sets up the viewport correctly, +unless it receives ConfigureNotify events. If there is a plugin with +an xevent_filter function, then it's that plugins responsibility to pass +the event to Clutter if it doesn't want it. If there is no plugin, +or the plugin doesn't have an xevent_filter function, then we should +call clutter_x11_handle_event() ourselves. + +http://bugzilla.gnome.org/show_bug.cgi?id=589419 +--- +diff --git a/src/compositor/mutter-plugin-manager.c b/src/compositor/mutter-plugin-manager.c +index 98d3f19..9d8ae74 100644 +--- a/src/compositor/mutter-plugin-manager.c ++++ b/src/compositor/mutter-plugin-manager.c +@@ -30,6 +30,8 @@ + + #include + ++#include ++ + /* + * There is only one instace of each module per the process. + */ +@@ -585,12 +587,31 @@ mutter_plugin_manager_xevent_filter (MutterPluginManager *plugin_mgr, + XEvent *xev) + { + GList *l; ++ gboolean have_plugin_xevent_func; + + if (!plugin_mgr) + return FALSE; + + l = plugin_mgr->plugins; + ++ /* We need to make sure that clutter gets certain events, like ++ * ConfigureNotify on the stage window. If there is a plugin that ++ * provides an xevent_filter function, then it's the responsibility ++ * of that plugin to pass events to Clutter. Otherwise, we send the ++ * event directly to Clutter ourselves. ++ * ++ * What happens if there are two plugins with xevent_filter functions ++ * is undefined; in general, multiple competing plugins are something ++ * we don't support well or care much about. ++ * ++ * FIXME: Really, we should just always handle sending the event to ++ * clutter if a plugin doesn't report the event as handled by ++ * returning TRUE, but it doesn't seem worth breaking compatibility ++ * of the plugin interface right now to achieve this; the way it is ++ * now works fine in practice. ++ */ ++ have_plugin_xevent_func = FALSE; ++ + while (l) + { + MutterPlugin *plugin = l->data; +@@ -598,6 +619,7 @@ mutter_plugin_manager_xevent_filter (MutterPluginManager *plugin_mgr, + + if (klass->xevent_filter) + { ++ have_plugin_xevent_func = TRUE; + if (klass->xevent_filter (plugin, xev) == TRUE) + return TRUE; + } +@@ -605,5 +627,8 @@ mutter_plugin_manager_xevent_filter (MutterPluginManager *plugin_mgr, + l = l->next; + } + ++ if (!have_plugin_xevent_func) ++ return clutter_x11_handle_event (xev) != CLUTTER_X11_FILTER_CONTINUE; ++ + return FALSE; + } +-- +cgit v0.8.2 diff --git a/mutter.spec b/mutter.spec index 53fe989..303bd22 100644 --- a/mutter.spec +++ b/mutter.spec @@ -1,12 +1,13 @@ Name: mutter Version: 2.27.1 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Window and compositing manager based on Clutter Group: User Interface/Desktops License: GPLv2+ URL: http://git.gnome.org/cgit/mutter Source0: ftp://ftp.gnome.org/pub/gnome/sources/%{name}/2.27/%{name}-%{version}.tar.bz2 +Patch0: mutter-pluginmanager.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: clutter-devel @@ -61,6 +62,7 @@ utilities for testing Metacity/Mutter themes. %prep %setup -q +%patch0 -p1 -b .pluginmanager %build %configure --with-clutter --disable-static @@ -147,6 +149,9 @@ gconftool-2 --makefile-install-rule \ %doc %{_mandir}/man1/mutter-window-demo.1.gz %changelog +* Wed Jul 29 2009 Peter Robinson 2.27.1-4 +- Add patch to fix mutter --replace + * Sat Jul 25 2009 Fedora Release Engineering - 2.27.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild