1
0
Fork 0

fix issue with GNU libc mangling %.10s format

2002-04-15  Havoc Pennington  <hp@pobox.com>

	* src/window.c (update_title): fix issue with GNU libc
	mangling %.10s format

	* metacity.spec: Fix up spec file

	* README: update README

	* configure.in (ALL_LINGUAS): require GTK 2.0.0
This commit is contained in:
Havoc Pennington 2002-04-16 03:23:21 +00:00 committed by Havoc Pennington
parent 7527670eef
commit afcd24b603
10 changed files with 1530 additions and 2500 deletions

View file

@ -1,3 +1,14 @@
2002-04-15 Havoc Pennington <hp@pobox.com>
* src/window.c (update_title): fix issue with GNU libc
mangling %.10s format
* metacity.spec: Fix up spec file
* README: update README
* configure.in (ALL_LINGUAS): require GTK 2.0.0
2002-04-15 Havoc Pennington <hp@redhat.com>
* src/display.c (meta_display_ping_window): reply immediately for

View file

@ -1,4 +1,4 @@
SUBDIRS=src po
EXTRA_DIST=HACKING theme-format.txt
EXTRA_DIST=HACKING theme-format.txt metacity.spec

113
README
View file

@ -9,13 +9,7 @@ your petty hangups about version numbers.
COMPILING METACITY
===
You need GTK+ 1.3.x (to become 2.0), at least version 1.3.13. At the
moment CVS HEAD works, but that can change.
There are SRPMs and sometimes RPMs on the ftp site, but you'd be
pretty lucky to get them to work for now, since they are often out of
sync with GTK. You might try with the GTK from ftp.gtk.org, and also
the GTK from http://people.redhat.com/hp/gnomehide/.
You need GTK+ 2.0, ideally the latest in the 2.0.x series.
REPORTING BUGS AND SUBMITTING PATCHES
===
@ -42,10 +36,16 @@ METACITY FEATURES
gconftool-2 --type=string --set /apps/metacity/general/theme Crux
gconftool-2 --type=string --set /apps/metacity/general/theme Gorilla
gconftool-2 --type=string --set /apps/metacity/general/theme Atlanta
gconftool-2 --type=string --set /apps/metacity/general/theme Bright
See theme-format.txt for docs on the theme format. Use
metacity-theme-viewer to preview themes.
- Change number of workspaces via gconf-editor or gconftool:
gconftool-2 --type=int --set /apps/metacity/general/num_workspaces 5
Can also change workspaces from GNOME 2 pager.
- Change focus mode:
gconftool-2 --type=string --set /apps/metacity/general/focus_mode mouse
gconftool-2 --type=string --set /apps/metacity/general/focus_mode sloppy
@ -56,6 +56,8 @@ METACITY FEATURES
Alt-1 to Alt-6 switch workspaces
Alt-Tab forward cycle window focus
Alt-Shift-Tab backward cycle focus
Alt-Ctrl-Tab forward cycle focus among panels
Alt-Ctrl-Shift-Tab backward cycle focus among panels
Alt-Escape focus previous window
Ctrl-Alt-Left Arrow previous workspace
Ctrl-Alt-Right Arrow next workspace
@ -107,23 +109,6 @@ METACITY FEATURES
be respawned. It theoretically restores sizes/positions/workspace
for session-aware applications.
- Here is an example of how you can configure GTK colors/fonts
for metacity windows only, in ~/.gtkrc-2.0:
style "metacity-style"
{
font_name = "Sans 16"
bg[NORMAL] = { 0.0, 0.0, 0.0 }
}
class "MetaFrames" style "metacity-style"
You get the idea. It is just your basic GTK+ rc file, the
window borders are a widget called MetaFrames.
Metacity-specific styles can also be included in any GTK+
theme.
- Metacity implements much of the new window manager spec from
freedesktop.org, and much of the ICCCM. But then there are
parts of each that it doesn't implement, just because I haven't
@ -134,7 +119,7 @@ METACITY FEATURES
- There are simple animations for actions such as minimization,
to help users see what is happening. Should probably
have a few more of these.
have a few more of these and make them nicer.
- if you have the proper X setup, set the GDK_USE_XFT=1
environment variable to get antialiased window titles.
@ -145,42 +130,25 @@ METACITY FEATURES
METACITY BUGS, NON-FEATURES, AND CAVEATS
===
- Metacity creates a big file in your home directory called
~/metacity.log with a bunch of debug spew.
- If you want keybindings which are not the ones mentioned above
as features, you have to edit keybindings.c and recompile.
- Some of the default keybindings (notable Alt+number) are total
crackrock.
crackrock. This is just because I like those keybindings and
things aren't configurable yet. Once bindings are configurable
the dumb defaults will go away.
- The only way to unminimize at the moment is to use the Alt+Tab
move-between-windows feature, or to run the GNOME 2 panel
and tasklist.
- Metacity uses the new window manager spec, but only random bits of
the old GNOME spec. It correctly advertises exactly which parts of
the GNOME spec it supports, but it does not support enough of it to
make the GNOME task list and desk guide happy, and they do not
support the new spec. I don't want anyone to spend time sending me
patches to support the old GNOME spec in Metacity; instead, send
patches to the task list and desk guide to support the new spec. As
far as I know, Metacity does support enough of the new spec to
allow a working tasklist and pager.
Upshot: GNOME 1.x task list and desk guide DO NOT WORK with
Metacity.
- You need an EWMH-spec compliant pager/tasklist to be able
to navigate graphically; this does NOT include GNOME 1.x,
but should include GNOME 2 and KDE 3.
- Metacity turns off its keybindings for Emacs, because I use
Alt-space in Emacs, and getting a window menu annoys me.
This is a broken feature. My planned fix is to use super/hyper
instead of Alt as the main keybinding shortcut, if super/hyper
exist, and then keyboards with a windows key can use that for
WM functions and Alt for application shortcuts.
We'd fall back to Alt if no other suitable modifier existed.
This is a broken feature that will go away when keybindings are
configurable.
- I haven't even read the ICCCM section about colormaps. So if you
have an 8-bit display you are basically screwed.
have an 8-bit display you are probably screwed.
- Metacity doesn't properly claim the window manager selection
as described in the ICCCM. But then, most other window managers
@ -198,13 +166,12 @@ METACITY BUGS, NON-FEATURES, AND CAVEATS
locale. I assume the window titles should be right-justified;
should the window controls also be flipped?
- Need keyboard shortcuts for focusing dock windows.
- Resize menu item doesn't do anything. It's intended to enter
resize-with-the-keyboard mode, similar to Move menu item.
- If you switch from sawfish to metacity without restarting X,
the panel often ends up buried behind the Nautilus desktop window.
- In GNOME 1.x, if you switch from sawfish to metacity without
restarting X, the panel often ends up buried behind the Nautilus
desktop window.
What happens is that the panel detects Sawfish has gone away, and
turns on override redirect mode because no GNOME-aware WM is
@ -221,13 +188,13 @@ METACITY BUGS, NON-FEATURES, AND CAVEATS
xstuff.c:xstuff_is_compliant_wm() in the panel to get started on
how the panel deals with this.)
- If you have "put panel below other windows" turned on
in panel Global Preferences, Miscellaneous tab, you need to change
- In GNOME 1.x, If you have "put panel below other windows" turned on
in panel Global Preferences, Miscellaneous tab, you need to change
this to "Put panel on top of other windows." That's because
Metacity uses semantic categories, not the legacy layer system
in the GNOME spec. It treats things in the legacy "dock" layer
as semantic type dock, but if you have the panel set to be
in another layer, Metacity will think it's a normal window.
Metacity uses semantic categories, not the legacy layer system in
the GNOME spec. It treats things in the legacy "dock" layer as
semantic type dock, but if you have the panel set to be in another
layer, Metacity will think it's a normal window.
You can diagnose this problem because Metacity will put panels in
the wrong place, and Alt+rightclick will let you perform operations
@ -274,13 +241,11 @@ A: If it makes sense to turn on unconditionally,
Q: Will Metacity be part of GNOME?
A: This is not the current plan, though of course I'm happy to see the
code used by anyone who's interested. Metacity may continue to suck
forever because I might get tired of working on it; or Metacity's
feature set might not make sense for GNOME. Who knows.
A: Many people are now asking for this, though it was not the original
plan - Metacity started out as sort of an experiment.
For now Metacity is my toy hobby project that I work on when I feel
like it.
A decision hasn't really been made but the issue will probably
be raised shortly after the GNOME 2 release.
Q: Is Metacity a Red Hat project?
@ -333,6 +298,20 @@ A: I could conceivably be convinced to use viewports _instead_ of
think it makes any sense to have both; it's just confusing. They
are functionally equivalent.
You may think this means that you won't have certain keybindings,
or something like that. This is a misconception. The only
_fundamental_ difference between viewports and workspaces is that
with viewports, windows can "overlap" and appear partially on
one and partially on another. All other differences that
traditionally exist in other window managers are accidental -
the features commonly associated with viewports can be implemented
for workspaces, and vice versa.
So I don't want to have two kinds of
workspace/desktop/viewport/whatever, but I'm willing to add
features traditionally associated with either kind if those
features make sense.
Q: Did you spend a lot of time on this?
A: Originally the answer was no. Sadly the answer is now yes.

View file

@ -2,7 +2,8 @@ AC_INIT(src/display.c)
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(metacity, 2.3.55)
# 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987
AM_INIT_AUTOMAKE(metacity, 2.3.89)
# Honor aclocal flags
ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
@ -84,9 +85,9 @@ ALL_LINGUAS="da es gl lv ms no pl pt ru sk sv tr uk"
AM_GLIB_GNU_GETTEXT
## here we get the flags we'll actually use
PKG_CHECK_MODULES(METACITY, gtk+-2.0 >= 1.3.13 gconf-2.0 >= 1.1.7)
PKG_CHECK_MODULES(METACITY_MESSAGE, gtk+-2.0 >= 1.3.13)
PKG_CHECK_MODULES(METACITY_WINDOW_DEMO, gtk+-2.0 >= 1.3.13)
PKG_CHECK_MODULES(METACITY, gtk+-2.0 >= 2.0.0 gconf-2.0 >= 1.1.9)
PKG_CHECK_MODULES(METACITY_MESSAGE, gtk+-2.0 >= 2.0.0)
PKG_CHECK_MODULES(METACITY_WINDOW_DEMO, gtk+-2.0 >= 2.0.0)
AC_PATH_XTRA

View file

@ -1,13 +1,14 @@
Summary: Metacity window manager
Name: metacity
Version: 2.3.34
Version: 2.3.89
Release: 1
URL: http://people.redhat.com/~hp/metacity/
Source0: %{name}-%{version}.tar.gz
License: GPL
Group: User Interface/Desktops
BuildRoot: %{_tmppath}/%{name}-root
BuildRequires: gtk2-devel >= 1.3.10
BuildRequires: gtk2-devel >= 2.0.0
BuildRequires: GConf-devel >= 1.1.9
%description
@ -30,12 +31,17 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%doc README AUTHORS COPYING NEWS
%{_bindir}/metacity
%{_bindir}/metacity-restart
%doc README AUTHORS COPYING NEWS HACKING theme-format.txt
%{_bindir}/*
%{_libexecdir}/*
%{_datadir}/gnome/wm-properties/metacity.desktop
%{_sysconfdir}/schemas/*.schemas
%{_datadir}/metacity
%changelog
* Mon Apr 15 2002 Havoc Pennington <hp@pobox.com>
- 2.3.89
* Tue Oct 30 2001 Havoc Pennington <hp@redhat.com>
- 2.3.34

775
po/da.po

File diff suppressed because it is too large Load diff

1020
po/no.po

File diff suppressed because it is too large Load diff

1071
po/pl.po

File diff suppressed because it is too large Load diff

1008
po/pt.po

File diff suppressed because it is too large Load diff

View file

@ -3740,8 +3740,11 @@ update_title (MetaWindow *window)
if (window->title == NULL)
window->title = g_strdup ("");
/* strndup is a hack since GNU libc has broken %.10s */
str = g_strndup (window->title, 10);
g_free (window->desc);
window->desc = g_strdup_printf ("0x%lx (%.10s)", window->xwindow, window->title);
window->desc = g_strdup_printf ("0x%lx (%s)", window->xwindow, str);
g_free (str);
if (window->frame)
meta_ui_set_frame_title (window->screen->ui,