After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 581238 - Rename to mutter
Rename to mutter
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on: 581046
Blocks: 581240
 
 
Reported: 2009-05-04 00:34 UTC by Vincent Untz
Modified: 2009-06-16 18:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Mega-patch (469.77 KB, patch)
2009-05-04 00:34 UTC, Vincent Untz
reviewed Details | Review
My mass mutter rename patch for reference. (62.59 KB, patch)
2009-05-04 17:52 UTC, Jon Nettleton
none Details | Review
A more functional patch. (175.99 KB, patch)
2009-05-08 01:16 UTC, Jon Nettleton
reviewed Details | Review
This should incorporate most the changes (562.11 KB, patch)
2009-06-10 11:41 UTC, Jon Nettleton
reviewed Details | Review
Hopefully final patch with Metacity to Mutter rename (539.90 KB, patch)
2009-06-16 15:31 UTC, Jon Nettleton
none Details | Review
Final Rename Patch (539.77 KB, patch)
2009-06-16 17:36 UTC, Jon Nettleton
none Details | Review

Description Vincent Untz 2009-05-04 00:34:08 UTC
Here's a mega patch to rename everything from metacity to mutter, so it's possible to have both installed at the same time.

It is highly untested :-) It compiles fine, but I can't test on my machine so it might break in many interesting ways. (distcheck fails, but for something unrelated to this path, it seems)

FWIW, I also removed some stuff that, I think, shouldn't be duplicated from metacity or aren't really needed:
 + the creating themes doc
 + the themes
 + metacity-theme-viewer
 + metacity-window-demo
 + metacity-theme.dtd

There are also some mentions of metacity in the desktop files: this is so that the control center capplet can still use the metacity code to configure mutter.

Also, I renamed all the gconf keys. But it might actually make sense to keep the metacity ones for the keybindings, so they get shared by default.

Note: the patch depends on bug 581046 (by accident, I branched from there).
Comment 1 Vincent Untz 2009-05-04 00:34:47 UTC
Created attachment 133889 [details] [review]
Mega-patch
Comment 2 Vincent Untz 2009-05-04 17:06:48 UTC
FWIW, I tested it and it seems to work fine.
Comment 3 Jon Nettleton 2009-05-04 17:50:47 UTC
Vincent some things I have done in my patch that you should probably add if you are going to commit it.

1)  Change the theme code to fallback to the metacity-1 themedir if a mutter one doesn't exist.
2)  Cleanup the code around the MUTTER_CLUTTER_PLUGINDIR variables.
3)  really the MUTTER_PLUGINDIR should only be $(libdir)/mutter/plugins
4)  I am not sure we should remove the documentation for theming and such.  It is redundant if you have metacity installed on your system, but if you are building something that only has mutter as a window manager it would make sense to have that documentation available.
5)  the MUTTER_VERSION should not be 2.27, the is the META_VERSION, MUTTER is only at version 0.7.0

I agree with you about the gconf keys.
Comment 4 Jon Nettleton 2009-05-04 17:52:05 UTC
Created attachment 133939 [details] [review]
My mass mutter rename patch for reference.
Comment 5 Jon Nettleton 2009-05-08 01:16:25 UTC
Created attachment 134234 [details] [review]
A more functional patch.
Comment 6 Owen Taylor 2009-06-03 22:41:51 UTC
What I've done file-by-file below, is:

 Check what was done in each patch
  J: Jon
  V: Vincent
  JV: Both

 Comment about any changes that need to be made relative to *Jon's* patch
 to get things were they need to be.

Jon's patch is in general more complete; most of my comments vs. that are related to the plan to split data out of metacity into gnome-wm-data and share that.

=========
autogen.sh: 
 J Change metacity => mutter

configure.in: 
 JV module rename from metacity to mutter
 J change overall version from 2.27~0.7 to 0.7
 V change overall version from 2.27~0.7 to 2.27
 J Rename metacity_clutter_plugin_api_version to mutter_plugin_api_version
 J Change MUTTER_PLUGIN_DIR to just be $libdir/$PACKAGE/plugins" with no /clutter
 J Change metacity to mutter in help strings
 J Change --with-clutter to --enable-clutter
 J Change --with-introspection to --enable-introspection
 J Remove warning about unstable branch at the end of configure
 JV Rename metacity-message to mutter-message
 J Rename metacity-window-demo to mutter-*
 V Remove metacity-window-demo
 V Remove doc/creating_themes/ src/themes
 
 The versioning should be matched to gnome at 2.27
 I don't know why --with-clutter/introspection were changed to --enable;
  --with is right for external dependencies. (clutter should be made non-optional,
  but that's separated)
 I think it would be better to leave or comment out the unstable branch warning
  rather than just removing it.
 Removing doc/creating_themes and src/themes is right, since they will go to
  gnome-wm-data

doc/creating_themes:
 J Rename doc module to creating-mutter-themes
 J Update paths
 V Remove 
 
 Should be removed

doc/man:
 J Move metacity-message, metacity-theme-viewer, metacity-window-demo, metacity
   man pages to mutter-* [contents not changed]
 V Remove metacity-theme-viewer, metacity-window-demo man pages
 V Rename metacity-message and metacity man pages to mutter-* [contents not changed]
 
 Contents do have to be changed

doc/metacity-theme.dtd:
 J Rename to mutter-theme.dtd
 V Remove
 
 Should be removed
 
metacity.doap:
 JV Remove

src/50-metacity-desktop-key.xml.in src/50-metacity-desktop-key.xml.in:
 J Remove? (Maybe git add forgotten? seems to be referenced)
 V Rename to -mutter-
 
 Should be removed (go to gnome-wm-data)

src/Makefile.am:
 JV Rename libmetacity-private to libmutter-private
 JV Rename metacity to mutter
 J Rename metacity-theme-viewer to mutter-theme-viewer
 V Remove metacity-theme-viewer
 JV Rename metacity.schemas to mutter.schemas
 JV Rename metacity.desktop.in metacity-wm.desktop.in to mutter-*
 
 Note: Leave mutter-theme-viewer, since it won't be in gnome-wm-data
 
src/compositor/mutter/mutter-shaped-texture.c:
 J Accidental unrelated fix for width/height typo
 
 Shouldn't be part of this commit
 
src/compositor/mutter/mutter-module.c:
 JV Adapt to respective changes to METACITY_CLUTTER_PLUGIN_API_VERSION #define
 
src/compositor/mutter/plugins/Makefile.am src/wm-tester/Makefile.am:
 JV Adapt to Makefile variable changes
 
src/core/bell.[ch] src/core/constraints.[ch] src/core/delete.c 
   src/core/display-private.h src/core/display.c src/core/errors.c
   src/core/eventqueue.c src/core/frame-private.h src/core/frame.c
   src/core/group-private.h src/core/group.c src/core/iconcache.[ch]
   src/core/keybindings.c src/core/main.c src/core/place.[ch]
   src/core/prefs.c src/core/schema-bindings.c src/core/screen-private.h
   src/core/screen.c src/core/testboxes.c src/core/util.c
   src/core/window-private.h src/core/window.c src/core/workspace.c
   src/include/all-keybindings.h src/include/atomnames.h
   src/include/common.h src/include/errors.h src/include/main.h
   src/include/mutter-plugin.h src/include/prefs.h src/include/resizepopup.h
   src/include/tabpopup.h src/include/ui.h src/include/util.h
   src/cinclude/xprops.h  src/tools/mutter-message.c src/tools/mutter-window-demo.c
   src/ui/draw-workspace.c src/ui/fixedtip.[ch] src/ui/menu.[ch]
   src/ui/tabpopup.c src/ui/testgradient.c src/ui/ui.c

 J Change Metacity references in source code comments to Mutter
 
 No real preference as to whether these renames are done or not; they make
 merges a little harder, but keep things cleaner. Might as well leave them
 in.

src/core/main.c src/core/prefs.c src/core/screen.c src/core/util.c: 
 J Update debug output to reference mutter

src/core/display.c: 
 J Change leader window name from NET_WM_NAME Metacity to Mutter
 
src/core/display.c src/include/atomnames.h  src/tools/mutter-message.c:
 J Change metacity-specific atoms to MUTTER_* (on windows, in message protocol)
 
 Wasn't necessary, but OK
 
src/core/metacity-Xatomtype.h:
  J Rename to mutter-Xatomtype.h:

src/core/display.c src/core/effects.c src/core/main.c src/core/screen.c
 src/core/session.c  src/core/testasyncgetprop.c src/core/util.c src/ui/theme-viewer.c

 J Change envars
      METACITY_USE_STATIC_GRAVITY METACITY_DEBUG_BUTTON_GRABS, METACITY_DEBUG_EFFECTS
      METACITY_DISPLAY, METACITY_VERBOSE, METACITY_DEBUG, METACITY_SYNC
      METACITY_G_FATAL_WARNINGS METACITY_DEBUG_XINERAMA, METACITY_USE_LOGFILE
      METACITY_DEBUG_SM
   to MUTTER_*
   
 Maybe not necessary. OK.

src/core/main.c:
 J Change --version output to say "mutter" not --metacity
 J Change --replace help string to reference Mutter
 J Change group name for g_option_context_add_main_entries (ctx, options, "mutter");
 J Change error message for bad output from metacity to mutter
 JV CHnage bindtextdomain() call
 JV Adapt to METACITY_PKGLIBDIR => MUTTER_PKGLIBDIR change
 JV Adapt to METACITY_DATADIR => MUTTER_DATADIR change

src/core/prefs.c src/core/schema-bindings.c:
 J Move prefs from /apps/metacity to /apps/mutter
 
 Should not be changed; will be /apps/metacity in gnome-wm-data
 
src/core/session.c:
 J Adjust for rename of binary to metacity
 J Adjust session save location to have mutter/ rather than metacity/
 J Adjust session save file format to use mutter rather than metacity
   for tag names
 
src/core/util.c:
 J Rename logfile from metacity-%d-debug-log-XXXXXX to mutter-*
 J Change dialog box titles from Metacity to Mutter

src/include/mutter-plugin.h:
 JV Adapt to changes in version #defines
 
src/libmetacity-private.pc.in:
 JV Rename to libmutter-private.pc.in
 JV Change _Name Exec X-GNOME-WMName
 J Change X-GNOME-WMSettingsModule X-GnomeWMSettingsLibrary to mutter
 
 I don't think the WMSettings stuff should have been changed, but needs
 investigation of how it works in the control-center.

src/metacity-plugins.pc.in:
 J Removed? (Forgotten git add?)
 V Renamed to mutter-plugins.pc.in
 
 Should not have been removed

src/metacity-wm.desktop.in src/metacity.desktop.in:
 JV Renamed to mutter-* a
 JV updated contents
 
src/metacity.schemas.in.in:
 JV Renamed to mutter.schemas.in.in
 JV Moved keys from /apps/metacity to /apps/mutter
 JV Changed Metacity references in the descriptive text to Mutter
 JV Changed <owner/> from metacity to mutter
 
 Should be deleted. (There are two additions for gnome-shell-specific keybindings
 that we'll have to handle in some other fashion. Just going schema-less for
 the moment is likely OK, but good to file a bug.)

src/run-metacity.sh:
 J Renamed to run-mutter.sh
 J Adjust for envvar changes
 J Adjust for metacity-window-demo rename
 
src/themes:
 V Delete
 
 Should be deleted
 
src/themes/Makefile.am
 J Move installation subdir within theme from metacity-1/ to mutter/
 
src/tools/Makefile.am:
 JV Rename metacity-message to mutter-*
 J Rename metacity-window-demo, metacity-mag, metacity-grayscale to mutter-*
 V Delete metacity-window-demo, metacity-mag, metacity-grayscale
 JV Adjust for makefile variable renames

src/tools/metacity-grayscale.c src/tools/metacity-mag.c src/tools/metacity-message.c
 src/tools/mutter-window-demo.c
 J Rename to mutter-*

src/tools/mutter-message.c: 
 J Make error messages refer to Mutter
 
src/tools/mutter-window-demo.c:
 J Adjust for METACITY_ICON_DIR => MUTTER_ICON_DIR rename

src/ui/theme-parser.c:
 J Look both in the metacity-1 and mutter subdirs (Lots of cut-and-paste code)
 
 Themes will stay in metacity-1, no need to look in mutter subdir

src/ui/theme-parser.c: 
 JV Adjust for METACITY_DATADIR => MUTTER_DATADIR rename

test/tokentest/Makefile: 
 J Adjust for METACITY_DATADIR => MUTTER_DATADIR rename
 
src/ui/theme-viewer.c:
 J Adjust for METACITY_LOCALEDIR => MUTTER_LOCALEDIR rename
 V Remove
 
 Note: Should not be removed

test/metacity-test:
 J Rename to mutter-test
 J Adjust metacity references in comments and docstrings
 J Adjust help string
Comment 7 Jon Nettleton 2009-06-10 11:41:23 UTC
Created attachment 136268 [details] [review]
This should incorporate most the changes

I think I have incorporated all the necessary changes you outlined above.  The exception is that I did keep the schema file but removed the schema-bindings binary and automake stuff.  The schema file is basically static and includes the 3 sections that should be kept seperate.  There might be more that we want to spin off into mutter as different behavior from metacity might be desirable and the keys are not touched by gnome included applications.  I think that can all change as we move forward.
Comment 8 Owen Taylor 2009-06-12 15:56:51 UTC
Generally, looks very good. (Having a small schemas file with the mutter-specific keys looks good.) Saw just a few things comparing the new version against my notes:

* The split between meta_[major]_version and mutter_[major]_version with both being 2.27 doesn't seem that motivated.

* It looks like you still have the the --with => --enable change for introspection and clutter in configure.in

* In:

 xmldir       = @GNOME_KEYBINDINGS_KEYSDIR@
-xml_in_files = 50-metacity-desktop-key.xml.in 50-metacity-key.xml.in
-xml_DATA     = $(xml_in_files:.xml.in=.xml)

xmldir should be removed as well.

* It looks like the change I asked about:

> Change X-GNOME-WMSettingsModule X-GnomeWMSettingsLibrary to mutter
>
> I don't think the WMSettings stuff should have been changed, but needs
> investigation of how it works in the control-center.

is still being made. Did you look into this?
Comment 9 Jon Nettleton 2009-06-16 15:31:50 UTC
Created attachment 136735 [details] [review]
Hopefully final patch with Metacity to Mutter rename

I think this fixes everything.  I checked the .desktop files changes and everything seems to be working fine.  I am able to launch control-center and make changes to keybindings and themes.
Comment 10 Owen Taylor 2009-06-16 16:35:23 UTC
(In reply to comment #9)
> I think this fixes everything.  I checked the .desktop files changes and
> everything seems to be working fine. 

Can you provide more detail? As far as I know 
X-GNOME-WMSettingsLibrary is unused (it's commented "Back compat only"), but X-GNOME-WMSettingsModule is used by the control center.

As I read the code:

 * gdk_x11_screen_get_window_manager_name() is used to get the name of the currently running window manager. This I think is the NET_WM_NAME property set in meta_display_open() which you changed from Metacity to Mutter.
 * That string is used to compare with the desktop files in .gnome2/wm-properties and $datadir/gnome/wm-properties/ (where mutter-wm.desktop is installed), to find a matching "X-GNOME-WMName"
 * The "X-GNOME-WMSettingsModule" property identifies a library in $libdir/window-manager-settings
 * That library is loaded and used to hook for a) finding themes b) hooking up the controls in gnome-window-properties

gnome-control-center installs a libmetacity.so, it doesn't install a libmutter.so. So, it's not clear to me 

(Now, actually, for jhbuild, gnome-control-center won't find mutter-wm.desktop at all, so it doesn't matter what is in there. I don't think it will locate a wm-settings module at all as soon as as name of the window manager is changed from Metacity to Mutter.)
  
Comment 11 Jon Nettleton 2009-06-16 17:36:24 UTC
Created attachment 136750 [details] [review]
Final Rename Patch

I had a symlink in /usr/lib64/window-manager-settings that was making everything work properly.  This patch should have all the appropriate settings.
Comment 12 Owen Taylor 2009-06-16 18:31:57 UTC
I've gone ahead and pushed the latest version (with a commit comment based on some text from Jon)

Resolving!