Compare commits

...

69 Commits

Author SHA1 Message Date
Havoc Pennington
a70fc3259f 2.4.8 2002-12-09 19:43:20 +00:00
Pablo Gonzalo del Campo
094df1295c Updated Spanish translation.
2002-12-09  Pablo Gonzalo del Campo <pablodc@bigfoot.com>

	* es.po: Updated Spanish translation.
2002-12-09 14:54:57 +00:00
Miloslav Trmac
8db78742c3 Update Czech translation 2002-12-09 14:29:34 +00:00
Havoc Pennington
9c337d0a8f updates
2002-12-08  Havoc Pennington  <hp@pobox.com>

	* README: updates

	* src/window.c (MAX_RESIZES_PER_SECOND): change to 20 instead of
	30, just as an experiment.
	(MOVE_THRESHOLD): change 15 to 20
	(RESIZE_THRESHOLD): change 15 to 20

	* src/util.c (ensure_logfile): kill this function when verbose
	mode is disabled.
2002-12-09 02:53:16 +00:00
Havoc Pennington
e0c8b245ef new functions to resize to fill screen
2002-12-08  Havoc Pennington  <hp@pobox.com>

	* src/window.c (meta_window_fill_vertical)
	(meta_window_fill_horizontal): new functions to resize to
	fill screen

	* src/keybindings.c: add vert, horiz maximize

	* src/prefs.c: had vert, horiz maximize

	* src/metacity.schemas.in: shorten some overlong short
	descriptions that make the keybindings capplet look ugly.
	Add maximize_vertically, maximize_horizontally keys.
2002-12-08 21:09:05 +00:00
Havoc Pennington
8d314aead8 make this always return FALSE for now, to avoid bug reports.
2002-12-08  Havoc Pennington  <hp@pobox.com>

	* src/prefs.c (meta_prefs_get_application_based): make this always
	return FALSE for now, to avoid bug reports.

	* src/util.c (ensure_logfile): put "opened log file" message on
	stderr so it will normally land in ~/.xsession-errors

	* configure.in: remove extra AC_ARG_PROGRAM

	* src/display.c (event_callback): handle the toggle-verbose message

	* src/tools/metacity-message.c: add a toggle-verbose message, been
	meaning to do this for a while.

	* src/util.c (meta_set_verbose): if verbose mode is enabled and we
	don't support it, then exit.

	* src/prefs.c: allow building without gconf (currently means some
	prefs are no-ops)

	* src/util.c, src/util.h: support defining macros to
	kill all verbose output entirely. (Removes the code and strings
	associated with it)

	* configure.in: don't get METACITY_PROPS_LIBS if not building the
	config dialog.
	(HAVE_GCONF): allow building sans gconf, if you are size-sensitive
	and not using gnome.
	(WITH_VERBOSE_MODE): add ability to disable all the verbose debug
	spew strings, to shrink the binary.
	(--disable-sm): allow SM support to be forced on or off
	(--disable-startup-notification): allow forcing this on or off
2002-12-08 19:17:17 +00:00
Havoc Pennington
15d28dfd97 also treat empty string as "unset" in this function.
2002-12-08  Havoc Pennington  <hp@pobox.com>

	* src/prefs.c (update_workspace_name): also treat empty string as
	"unset" in this function.
2002-12-08 14:59:14 +00:00
Hidetoshi Tajima
48b00403b6 fixed typos. 2002-12-06 05:12:33 +00:00
Hidetoshi Tajima
d78fab02eb never use a window with input = FALSE take_focus = FALSE in the normal and
* src/window.h (META_WINDOW_IN_NORMAL_TAB_CHAIN,
	META_WINDOW_IN_DOCK_TAB_CHAIN) : never use a window with input =
	FALSE take_focus = FALSE in the normal and doc tab chains #90409
2002-12-06 05:07:01 +00:00
Hidetoshi Tajima
d275e4bbc2 move a window to the current space on the MapRequest when it's not on the
* src/display.c (event_callback): move a window to the current
	space on the MapRequest when it's not on the space yet. #100390
2002-12-05 21:59:14 +00:00
Pablo Gonzalo del Campo
d26ad2c490 Updated Spanish translation.
2002-12-04  Pablo Gonzalo del Campo <pablodc@bigfoot.com>

	* es.po: Updated Spanish translation.
2002-12-04 14:24:19 +00:00
Havoc Pennington
cef58f676d rearrange this function a bit, so that we return CONTROL_TITLE for
2002-12-01  Havoc Pennington  <hp@pobox.com>

	* src/frames.c (get_control): rearrange this function a bit, so
	that we return CONTROL_TITLE for anything above the bottom of the
	titlebar, in the fallback case where no other control was found.
	Also, don't return RESIZE_N for title rect above the top resize
	size, unless the window is resizable.
	(meta_frames_button_press_event): only start a move when clicking
	control TITLE, not control NONE. This way you don't start moving
	a nonresizable window if you click its edges.
2002-12-02 01:34:27 +00:00
Havoc Pennington
214bcceaea conditionalize building the config dialog
2002-12-01  Havoc Pennington  <hp@pobox.com>

	* src/tools/Makefile.am: conditionalize building the config dialog

	* configure.in (BUILD_CONFIG_DIALOG): add --enable-config-dialog
	option to turn on the "window focus" dialog. This is part of
	deprecating this dialog.
2002-12-01 20:48:10 +00:00
Havoc Pennington
5e1439f89e lengthen to 15 seconds
2002-11-30  Havoc Pennington  <hp@pobox.com>

	* src/screen.c (STARTUP_TIMEOUT): lengthen to 15 seconds

	* src/util.c (utf8_fputs): hmm, return a value

	* src/screen.c (meta_screen_apply_startup_properties): new
	function to apply initial workspace based on startup sequence.

	* src/window.c (meta_window_new): load _NET_STARTUP_ID
	(meta_window_get_startup_id): new function

	* src/window-props.c (meta_display_init_window_prop_hooks): add
	hooks for _NET_STARTUP_ID

	* src/display.c (event_callback): send property events to
	groups.

	* src/xprops.c (meta_prop_get_values): make a type of INVALID
	mean to ignore that property (don't fetch its value).

	* src/group.c (meta_group_property_notify): new function

	* src/screen.c (set_supported_hint): support _NET_STARTUP_ID

	* src/display.c (meta_display_open): add _NET_STARTUP_ID to atoms
	we initialize

	* src/group-private.h: private header shared between
	group-props.c, group.c

	* src/group-props.h, src/group-props.c: new files to contain
	functions for retrieving group properties

	* src/window.c (meta_window_same_application): change this a bit
	to work with new definition of group

	* src/group.c (meta_window_get_group): always create a group for
	every window, using the window's own ID as group leader if
	required.

	* src/window.c (update_wm_hints): handle changes to group leader

	* src/group.c (meta_window_group_leader_changed): new function

	* src/display.h (struct _MetaDisplay): _NET_WM_WINDOW_TYPE_SPLASH,
	not SPLASHSCREEN. Reported by Gregory Merchan and Matthias Clasen.

	* src/screen.c (startup_sequence_timeout): when timing out a
	startup sequence, send a remove message, don't just time it out
	locally.
2002-12-01 03:58:04 +00:00
Calum Benson
eb40c5c2cf Removed alpha layers from the pixmaps that don't need them.
Fixes #98389, results in 10-15% speedup on most machines.
2002-11-26 17:55:34 +00:00
Glynn Foster
ba3cf950ba and especially you. 2002-11-26 12:22:39 +00:00
Glynn Foster
d26eb15bff and you 2002-11-26 12:21:59 +00:00
Glynn Foster
aed65de051 'ush. 2002-11-26 12:21:01 +00:00
Glynn Foster
bf767e8420 2.4.5
2002-11-26  Glynn Foster  <glynn.foster@sun.com>

	* configure.in: 2.4.5
2002-11-26 12:19:00 +00:00
Kjartan Maraas
ad65fda1a8 Updated Norwegian (bokmål) translation.
2002-11-25  Kjartan Maraas  <kmaraas@gnome.org>

	* no.po: Updated Norwegian (bokmål) translation.
2002-11-25 20:14:58 +00:00
Yanko Kaneti
170d3ed121 Convert all to UTF-8.
2002-11-25  Yanko Kaneti  <yaneti@declera.com>

	* *.po: Convert all to UTF-8.
2002-11-25 12:55:28 +00:00
Kostas Papadimas
7f1dfffab3 Updated the Greek translation 2002-11-24 08:46:34 +00:00
Dan Mills
40e3058408 remove theme-format.txt, it's now in doc/.
2002-11-23  Dan Mills  <thunder@ximian.com>

	* Makefile.am: remove theme-format.txt, it's now in doc/.
2002-11-23 21:41:25 +00:00
Kostas Papadimas
3e05c7c6c6 Updated the Greek translation 2002-11-23 13:14:56 +00:00
Havoc Pennington
fd135d0869 patch from Hidetoshi Tajima to move a window's transients when moving the
2002-11-22  Havoc Pennington  <hp@pobox.com>

	* src/window.c (meta_window_change_workspace): patch from
	Hidetoshi Tajima to move a window's transients when moving
	the window between workspaces. #98900

2002-11-21  Havoc Pennington  <hp@pobox.com>

	* src/display.c (meta_display_open): init ret_to to
	RevertToPointerRoot out of sheer paranoia; don't want no
	RevertToNone in my code!
2002-11-22 06:00:18 +00:00
Havoc Pennington
5452a0ecac delete (meta_window_new): add getting initial workspace to the batch
2002-11-21  Havoc Pennington  <hp@pobox.com>

	* src/window.c (update_initial_workspace): delete
	(meta_window_new): add getting initial workspace to the batch
	property get call

	* src/window-props.c (meta_display_init_window_prop_hooks): add
	net_wm_desktop and win_workspace support
2002-11-21 05:02:38 +00:00
Havoc Pennington
6557627d8f remove unused variable
2002-11-20  Havoc Pennington  <hp@pobox.com>

	* src/window-props.c (set_icon_title): remove unused variable

	* src/screen.c (meta_screen_new): read an existing
	_NET_CURRENT_DESKTOP and restore it if set. Makes a restart even
	less visible.

	* src/workspace.c (set_active_space_hint): don't set the hint
	during the process of unmanaging a screen
2002-11-21 04:48:53 +00:00
Havoc Pennington
cfa2e165ba put doc/Makefile in configure.in 2002-11-20 04:57:47 +00:00
Havoc Pennington
e9999aa93c add DTD for themes from Ross Burton
2002-11-20  Havoc Pennington  <hp@pobox.com>

	* doc/metacity-theme.dtd: add DTD for themes from Ross Burton

	* doc/Makefile.am: doc subdir

	* doc/theme-format.txt: move to doc subdir
2002-11-20 04:57:25 +00:00
Havoc Pennington
b8788e9c0d Should really fix #98303
2002-11-19  Havoc Pennington  <hp@pobox.com>

	Should really fix #98303

	* src/prefs.c (meta_prefs_change_workspace_name): add
	bad hack to treat empty string the same as null

	* src/menu.c (get_workspace_name_with_accel): allocate one more
	than the length of "name" so we have room for a nul byte (and
	don't malloc(0) on empty strings). Also some formatting cleanups.
2002-11-20 04:54:01 +00:00
Havoc Pennington
60293ee189 do a recalc_window_features after setting new wm_state in order to update
2002-11-19  Havoc Pennington  <hp@pobox.com>

	* src/window.c (meta_window_client_message): do a
	recalc_window_features after setting new wm_state in order
	to update skip_pager in addition to wm_state_skip_pager
	(set_net_wm_state): base _NET_WM_STATE on skip_pager not
	wm_state_skip_pager, ditto for skip_taskbar
2002-11-20 04:37:55 +00:00
Havoc Pennington
2541da1d83 Fix #98303 and assorted cleanup
2002-11-19  Havoc Pennington  <hp@pobox.com>

        Fix #98303 and assorted cleanup

	* src/prefs.c (meta_preference_to_string): handle
	META_PREF_WORKSPACE_NAMES

	* src/menu.c (get_workspace_name_with_accel): assert that the
	workspace has a name

	* src/screen.c (meta_screen_ensure_workspace_popup): assert that
	we got a workspace name
	(meta_screen_ensure_workspace_popup): assert that we got a
	workspace name

	* src/prefs.c (update_workspace_name): fix screwiness (strcmp with
	a freed string, assorted bad logic)
	(init_workspace_names): assert that we filled in a default
	workspace name
	(meta_prefs_get_workspace_name): assert non-NULL workspace name
2002-11-20 03:57:20 +00:00
Andras Timar
bd537dcfc6 Updated Hungarian translation.
2002-11-19  Andras Timar  <timar@gnome.hu>

	* hu.po: Updated Hungarian translation.
2002-11-19 10:11:10 +00:00
Bill Haneman
b95dd0574c Makes Atlanta work better with inverse themes. Fix for 98745. 2002-11-17 11:54:10 +00:00
Kjartan Maraas
49dca9e5b1 Updated Norwegian (bokml) translation.
2002-11-15  Kjartan Maraas  <kmaraas@gnome.org>

	* no.po: Updated Norwegian (bokml) translation.
2002-11-15 21:52:05 +00:00
Havoc Pennington
02a8fb4a37 fix a multihead safety thing (use proper system colormap for the
2002-11-13  Havoc Pennington  <hp@pobox.com>

	* src/ui.c (get_cmap): fix a multihead safety thing (use proper
	system colormap for the drawable's screen)
2002-11-15 04:10:54 +00:00
Gustavo Noronha Silva
1a5b861dff updated translation 2002-11-15 00:42:55 +00:00
Jonathan Blandford
0970829146 include common.h.
Thu Nov 14 17:30:10 2002  Jonathan Blandford  <jrb@gnome.org>

        * src/Makefile.am (libmetacityinclude_HEADERS): include common.h.
2002-11-14 22:30:51 +00:00
Pablo Gonzalo del Campo
3ee131245c Updated Spanish translation.
2002-11-14  Pablo Gonzalo del Campo <pablodc@bigfoot.com>

	* es.po: Updated Spanish translation.
2002-11-14 15:13:48 +00:00
Christian Neumair
80a1a8d26b Updated German translation. 2002-11-13 18:37:24 +00:00
Havoc Pennington
d1aaf6a9b1 don't read from op->data.image when the op is an icon
2002-11-12  Havoc Pennington  <hp@pobox.com>

	* src/theme.c (draw_op_as_pixbuf): don't read from op->data.image
	when the op is an icon
2002-11-13 04:11:52 +00:00
Havoc Pennington
5590e8878b never use a window with input = FALSE take_focus = FALSE as the default
2002-11-12  Havoc Pennington  <hp@redhat.com>

	* src/stack.c (meta_stack_get_default_focus_window): never use a
	window with input = FALSE take_focus = FALSE as the default focus
	window #95454 fix from Hidetoshi Tajima
2002-11-12 21:53:52 +00:00
Miloslav Trmac
de703edfd7 Update Czech translation 2002-11-11 18:58:49 +00:00
Peteris Krisjanis
772bbb8d91 2002-11-11 Peteris Krisjanis <peteris.krisjanis@os.lv> * lv.po: Updated Latvian translation 2002-11-11 18:34:18 +00:00
Peteris Krisjanis
b17b88595e 2002-11-11 Peteris Krisjanis <peteris.krisjanis@os.lv> Updated Latvian translation 2002-11-11 18:34:12 +00:00
James M. Cape
e64d1bf881 Major changes to look of theme. I'd also recommend
2002-11-10  James M. Cape  <jcape@ignore-your.tv>

	* src/themes/Esco/metacity-theme-1.xml: Major changes
	to look of theme. I'd also recommend "minimize,maximize:close"
	for the button_layout, it looks really slick :-).
2002-11-10 19:08:14 +00:00
Changwoo Ryu
40696052ca Updated Korean translation by Young-Ho Cha <ganadist@chollian.net>.
2002-11-11  Changwoo Ryu  <cwryu@debian.org>

	* ko.po: Updated Korean translation by Young-Ho Cha
	<ganadist@chollian.net>.
2002-11-10 17:04:04 +00:00
Ole Laursen
b567879eac Updated Danish translation.
2002-11-10  Ole Laursen  <olau@hardworking.dk>

	* da.po: Updated Danish translation.
2002-11-10 10:44:50 +00:00
Jonathan Blandford
0163c58ee1 include common.h with the installed files 2002-11-08 00:05:36 +00:00
Mark McLoughlin
bc3b64f922 impl for nice debugging. (meta_workspace_get_neighbor): fix broken logic
2002-11-08  Mark McLoughlin  <mark@skynet.ie>

        * src/workspace.c:
        (meta_motion_direction_to_string),
        (meta_screen_corner_to_string): impl for nice debugging.
        (meta_workspace_get_neighbor): fix broken logic and
        cleanup debugging.
2002-11-07 23:13:12 +00:00
Jonathan Blandford
765cb51df3 add a pc file for libmetacity-private
Thu Nov  7 17:07:21 2002  Jonathan Blandford  <jrb@redhat.com>

	* src/libmetacity-private.pc.in: add a pc file for
	libmetacity-private

	* src/Makefile.am: Install a few files as a shared library so that
	others can draw metacity themes.
2002-11-07 22:09:59 +00:00
Hasbullah Bin Pit
b56824f650 Updated Malay Translation.
2002-11-05  Hasbullah Bin Pit <sebol@ikhlas.com>

        * ms.po: Updated Malay Translation.
2002-11-06 16:53:18 +00:00
Havoc Pennington
c613fed9ef push an error trap around the whole window-key-grab loop
2002-11-06  Havoc Pennington  <hp@pobox.com>

	* src/keybindings.c (grab_keys): push an error trap around the
	whole window-key-grab loop
	(ungrab_all_keys): avoid requiring return value from the error
	trap, unless in debugging mode
	(regrab_window_bindings, regrab_screen_bindings): push traps
	around the loops, for efficiency

	* src/display.c (event_callback): fix from Padraig O'Briain to
	compress extra MappingNotify events to avoid extra work.
2002-11-06 16:00:56 +00:00
Calum Benson
6c18374142 Crux tweaks: adds a Restore button for maximized windows, and un-hard-codes
titlebar text colors. Fixes #97759.
2002-11-05 19:38:12 +00:00
Havoc Pennington
a64b868dbd apply patch from Nikos Mouat to fix this function
2002-11-05  Havoc Pennington  <hp@redhat.com>

	* src/workspace.c (meta_workspace_get_neighbor): apply patch from
	Nikos Mouat to fix this function
2002-11-05 19:25:06 +00:00
Christian Rose
cfd2d87fea Added missing file. Updated Swedish translation.
2002-11-05  Christian Rose  <menthos@menthos.com>

	* POTFILES.in: Added missing file.
	* sv.po: Updated Swedish translation.
2002-11-05 00:16:57 +00:00
Havoc Pennington
77349f6878 fix bug I introduced in case where scaling was done in both directions.
2002-11-04  Havoc Pennington  <hp@pobox.com>

	* src/theme.c (scale_and_alpha_pixbuf): fix bug I introduced in
	case where scaling was done in both directions.
2002-11-04 20:34:25 +00:00
Havoc Pennington
5efd276a22 Patch from Brian Cameron to implement the vertical/horizontal striped
2002-11-04  Havoc Pennington  <hp@pobox.com>

        Patch from Brian Cameron to implement the vertical/horizontal
	striped image accelerated scaling from the gtk pixbuf engine.

	* src/theme.c (scale_and_alpha_pixbuf): if an image is
	vertical/horizontal stripes, use special extra-fast scaling
	routines.

	* src/theme-parser.c (parse_draw_op_element): when loading an
	image, mark it as vertically/horizontally striped when appropriate
2002-11-04 17:55:56 +00:00
Erwann Chenede -
373f6de13e changed __FUNCTION__ to G_GNUC_FUNCTION as __FUNCTION__ is not portable.
2002-11-04 Erwann Chenede - <erwann.chenede@sun.com>

  * src/xprops.c (meta_prop_get_values): changed __FUNCTION__
  to G_GNUC_FUNCTION as __FUNCTION__ is not portable.
2002-11-04 17:24:47 +00:00
Havoc Pennington
e0a4c2a1df remove XSync calls from here (meta_display_ungrab): remove XSync from
2002-11-03  Havoc Pennington  <hp@pobox.com>

	* src/display.c (meta_display_grab): remove XSync calls from here
	(meta_display_ungrab): remove XSync from here, but put in
	an XFlush to be sure we get the ungrab sent.

	* src/util.c (meta_topic): track sync count here

	* src/errors.c: move sync count out of here

        Throughout: error spew on all XSync() calls

	* src/run-metacity.sh: don't set METACITY_DEBUG
2002-11-04 00:56:12 +00:00
Havoc Pennington
9feebc05c7 add _NET_WM_NAME, WM_NAME, _NET_WM_ICON_NAME, WM_ICON_NAME support
2002-11-03  Havoc Pennington  <hp@pobox.com>

	* src/window-props.c (meta_display_init_window_prop_hooks): add
	_NET_WM_NAME, WM_NAME, _NET_WM_ICON_NAME, WM_ICON_NAME support

	* src/window.c (meta_window_new): use window-props.h for
	_NET_WM_NAME, WM_NAME, _NET_WM_ICON_NAME, WM_ICON_NAME
2002-11-04 00:19:08 +00:00
Havoc Pennington
d7917c02fe use window-props.h stuff for a couple of properties (implement_showing):
2002-11-03  Havoc Pennington  <hp@pobox.com>

	* src/window.c (meta_window_new): use window-props.h stuff for a
	couple of properties
	(implement_showing): fix printf string

	* src/xprops.c (meta_prop_free_values): new function

	* src/window-props.h, src/window-props.c: start moving code that
	handles loading window properties into this file.
2002-11-03 23:42:21 +00:00
Havoc Pennington
1d0b5ef660 split into "see if we should be showing" and "actually show/hide"
2002-11-03  Havoc Pennington  <hp@pobox.com>

	* src/window.c (meta_window_calc_showing): split into "see if we
	should be showing" and "actually show/hide" functions
	(idle_calc_showing): rework to first unmap all newly-hidden
	windows from bottom to top then map all newly-showing windows from
	top to bottom resulting in fewer exposes, #95220
2002-11-03 20:30:45 +00:00
Havoc Pennington
ee84fbb81f fix from Garrett LeSage for which button backgrounds we draw when
2002-11-03  Havoc Pennington  <hp@pobox.com>

	* src/theme.c (meta_frame_layout_calc_geometry): fix from Garrett
	LeSage for which button backgrounds we draw when
2002-11-03 19:55:38 +00:00
Havoc Pennington
6a1abc7482 new function, and remove workspace->name field, instead just get the name
2002-11-03  Havoc Pennington  <hp@pobox.com>

	* src/workspace.c (meta_workspace_get_name): new function,
	and remove workspace->name field, instead just get the
	name from prefs each time

	* src/screen.c (meta_screen_update_workspace_names): update the
	gconf key to persist workspace names here, instead of changing
	the names we use

	* src/util.c (topic_name): add META_DEBUG_PREFS

	* src/prefs.c: change NUM_COMMANDS to 32 to allow more custom
	commands, implement workspace names

	* src/metacity.schemas.in: add workspace_names/name_NN gconf keys.
2002-11-03 19:06:39 +00:00
Christian Neumair
7f36a8c7d1 We want at least autoconf 2.5. 2002-11-02 10:39:31 +00:00
Christian Neumair
d1d7767033 Updated German translation. 2002-11-01 19:57:44 +00:00
Pablo Gonzalo del Campo
18973c23b3 Updated Spanish translation.
2002-10-31  Pablo Gonzalo del Campo <pablodc@bigfoot.com>

	* es.po: Updated Spanish translation.
2002-11-01 02:32:38 +00:00
Havoc Pennington
93289dc950 some README updates, right after making the tarball - yes I am on the ball. 2002-10-29 06:41:42 +00:00
118 changed files with 15376 additions and 10085 deletions

View File

@@ -26,3 +26,5 @@ intl
ABOUT-NLS
COPYING
intltool-*
metacity.spec
autom4te.cache

416
ChangeLog
View File

@@ -1,3 +1,419 @@
2002-12-09 Havoc Pennington <hp@redhat.com>
* configure.in: 2.4.8
2002-12-08 Havoc Pennington <hp@pobox.com>
* README: updates
* src/window.c (MAX_RESIZES_PER_SECOND): change to 20 instead of
30, just as an experiment.
(MOVE_THRESHOLD): change 15 to 20
(RESIZE_THRESHOLD): change 15 to 20
* src/util.c (ensure_logfile): kill this function when verbose
mode is disabled.
2002-12-08 Havoc Pennington <hp@pobox.com>
* src/window.c (meta_window_fill_vertical)
(meta_window_fill_horizontal): new functions to resize to
fill screen
* src/keybindings.c: add vert, horiz maximize
* src/prefs.c: had vert, horiz maximize
* src/metacity.schemas.in: shorten some overlong short
descriptions that make the keybindings capplet look ugly.
Add maximize_vertically, maximize_horizontally keys.
2002-12-08 Havoc Pennington <hp@pobox.com>
* src/prefs.c (meta_prefs_get_application_based): make this always
return FALSE for now, to avoid bug reports.
* src/util.c (ensure_logfile): put "opened log file" message on
stderr so it will normally land in ~/.xsession-errors
* configure.in: remove extra AC_ARG_PROGRAM
* src/display.c (event_callback): handle the toggle-verbose message
* src/tools/metacity-message.c: add a toggle-verbose message, been
meaning to do this for a while.
* src/util.c (meta_set_verbose): if verbose mode is enabled and we
don't support it, then exit.
* src/prefs.c: allow building without gconf (currently means some
prefs are no-ops)
* src/util.c, src/util.h: support defining macros to
kill all verbose output entirely. (Removes the code and strings
associated with it)
* configure.in: don't get METACITY_PROPS_LIBS if not building the
config dialog.
(HAVE_GCONF): allow building sans gconf, if you are size-sensitive
and not using gnome.
(WITH_VERBOSE_MODE): add ability to disable all the verbose debug
spew strings, to shrink the binary.
(--disable-sm): allow SM support to be forced on or off
(--disable-startup-notification): allow forcing this on or off
2002-12-08 Havoc Pennington <hp@pobox.com>
* src/prefs.c (update_workspace_name): also treat empty string as
"unset" in this function.
Thu Dec 5 18:41:02 2002 HideToshi Tajima <hidetoshi.tajima@sun.com>
* src/window.h (META_WINDOW_IN_NORMAL_TAB_CHAIN,
META_WINDOW_IN_DOCK_TAB_CHAIN) : never use a window with input =
FALSE take_focus = FALSE in the normal and dock tab chains. #90409
Thu Dec 5 13:56:52 2002 HideToshi Tajima <hidetoshi.tajima@sun.com>
* src/display.c (event_callback): move a window to the current
space on the MapRequest when it's not on the space yet. #100390
2002-12-01 Havoc Pennington <hp@pobox.com>
* src/frames.c (get_control): rearrange this function a bit, so
that we return CONTROL_TITLE for anything above the bottom of the
titlebar, in the fallback case where no other control was found.
Also, don't return RESIZE_N for title rect above the top resize
size, unless the window is resizable.
(meta_frames_button_press_event): only start a move when clicking
control TITLE, not control NONE. This way you don't start moving
a nonresizable window if you click its edges.
2002-12-01 Havoc Pennington <hp@pobox.com>
* src/tools/Makefile.am: conditionalize building the config dialog
* configure.in (BUILD_CONFIG_DIALOG): add --enable-config-dialog
option to turn on the "window focus" dialog. This is part of
deprecating this dialog.
2002-11-30 Havoc Pennington <hp@pobox.com>
* src/screen.c (STARTUP_TIMEOUT): lengthen to 15 seconds
* src/util.c (utf8_fputs): hmm, return a value
* src/screen.c (meta_screen_apply_startup_properties): new
function to apply initial workspace based on startup sequence.
* src/window.c (meta_window_new): load _NET_STARTUP_ID
(meta_window_get_startup_id): new function
* src/window-props.c (meta_display_init_window_prop_hooks): add
hooks for _NET_STARTUP_ID
* src/display.c (event_callback): send property events to
groups.
* src/xprops.c (meta_prop_get_values): make a type of INVALID
mean to ignore that property (don't fetch its value).
* src/group.c (meta_group_property_notify): new function
* src/screen.c (set_supported_hint): support _NET_STARTUP_ID
* src/display.c (meta_display_open): add _NET_STARTUP_ID to atoms
we initialize
* src/group-private.h: private header shared between
group-props.c, group.c
* src/group-props.h, src/group-props.c: new files to contain
functions for retrieving group properties
* src/window.c (meta_window_same_application): change this a bit
to work with new definition of group
* src/group.c (meta_window_get_group): always create a group for
every window, using the window's own ID as group leader if
required.
* src/window.c (update_wm_hints): handle changes to group leader
* src/group.c (meta_window_group_leader_changed): new function
* src/display.h (struct _MetaDisplay): _NET_WM_WINDOW_TYPE_SPLASH,
not SPLASHSCREEN. Reported by Gregory Merchan and Matthias Clasen.
* src/screen.c (startup_sequence_timeout): when timing out a
startup sequence, send a remove message, don't just time it out
locally.
2002-11-26 Calum Benson <calum.benson@sun.com>
* src/themes/Crux :
Removed alpha layers from the pixmaps that don't need them.
Fixes #98389, results in 10-15% speedup on most machines.
2002-11-26 Glynn Foster <glynn.foster@sun.com>
* configure.in: 2.4.5
2002-11-23 Dan Mills <thunder@ximian.com>
* Makefile.am: remove theme-format.txt, it's now in doc/.
2002-11-22 Havoc Pennington <hp@pobox.com>
* src/window.c (meta_window_change_workspace): patch from
Hidetoshi Tajima to move a window's transients when moving
the window between workspaces. #98900
2002-11-21 Havoc Pennington <hp@pobox.com>
* src/display.c (meta_display_open): init ret_to to
RevertToPointerRoot out of sheer paranoia; don't want no
RevertToNone in my code!
2002-11-21 Havoc Pennington <hp@pobox.com>
* src/window.c (update_initial_workspace): delete
(meta_window_new): add getting initial workspace to the batch
property get call
* src/window-props.c (meta_display_init_window_prop_hooks): add
net_wm_desktop and win_workspace support
2002-11-20 Havoc Pennington <hp@pobox.com>
* src/window-props.c (set_icon_title): remove unused variable
* src/screen.c (meta_screen_new): read an existing
_NET_CURRENT_DESKTOP and restore it if set. Makes a restart even
less visible.
* src/workspace.c (set_active_space_hint): don't set the hint
during the process of unmanaging a screen
2002-11-20 Havoc Pennington <hp@pobox.com>
* configure.in: add doc/Makefile
* doc/metacity-theme.dtd: add DTD for themes from Ross Burton
* doc/Makefile.am: doc subdir
* doc/theme-format.txt: move to doc subdir
2002-11-19 Havoc Pennington <hp@pobox.com>
Should really fix #98303
* src/prefs.c (meta_prefs_change_workspace_name): add
bad hack to treat empty string the same as null
* src/menu.c (get_workspace_name_with_accel): allocate one more
than the length of "name" so we have room for a nul byte (and
don't malloc(0) on empty strings). Also some formatting cleanups.
2002-11-19 Havoc Pennington <hp@pobox.com>
* src/window.c (meta_window_client_message): do a
recalc_window_features after setting new wm_state in order
to update skip_pager in addition to wm_state_skip_pager
(set_net_wm_state): base _NET_WM_STATE on skip_pager not
wm_state_skip_pager, ditto for skip_taskbar
2002-11-19 Havoc Pennington <hp@pobox.com>
Fix #98303 and assorted cleanup
* src/prefs.c (meta_preference_to_string): handle
META_PREF_WORKSPACE_NAMES
* src/menu.c (get_workspace_name_with_accel): assert that the
workspace has a name
* src/screen.c (meta_screen_ensure_workspace_popup): assert that
we got a workspace name
(meta_screen_ensure_workspace_popup): assert that we got a
workspace name
* src/prefs.c (update_workspace_name): fix screwiness (strcmp with
a freed string, assorted bad logic)
(init_workspace_names): assert that we filled in a default
workspace name
(meta_prefs_get_workspace_name): assert non-NULL workspace name
2002-11-16 Bill Haneman <bill.haneman@sun.com>
* src/themes/Atlanta/metacity-theme-1.xml:
Changed outer bevel and focus line color to
work better with inverse themes (no effect on
Default or other existing gtk+ themes).
2002-11-13 Havoc Pennington <hp@pobox.com>
* src/ui.c (get_cmap): fix a multihead safety thing (use proper
system colormap for the drawable's screen)
Thu Nov 14 17:30:10 2002 Jonathan Blandford <jrb@gnome.org>
* src/Makefile.am (libmetacityinclude_HEADERS): include common.h.
2002-11-12 Havoc Pennington <hp@pobox.com>
* src/theme.c (draw_op_as_pixbuf): don't read from op->data.image
when the op is an icon
2002-11-12 Havoc Pennington <hp@redhat.com>
* src/stack.c (meta_stack_get_default_focus_window): never use a
window with input = FALSE take_focus = FALSE as the default focus
window #95454 fix from Hidetoshi Tajima
2002-11-10 James M. Cape <jcape@ignore-your.tv>
* src/themes/Esco/metacity-theme-1.xml: Major changes
to look of theme. I'd also recommend "minimize,maximize:close"
for the button_layout, it looks really slick :-).
2002-11-08 Mark McLoughlin <mark@skynet.ie>
* src/workspace.c:
(meta_motion_direction_to_string),
(meta_screen_corner_to_string): impl for nice debugging.
(meta_workspace_get_neighbor): fix broken logic and
cleanup debugging.
Thu Nov 7 17:07:21 2002 Jonathan Blandford <jrb@redhat.com>
* src/libmetacity-private.pc.in: add a pc file for
libmetacity-private
* src/Makefile.am: Install a few files as a shared library so that
others can draw metacity themes.
2002-11-06 Havoc Pennington <hp@pobox.com>
* src/keybindings.c (grab_keys): push an error trap around the
whole window-key-grab loop
(ungrab_all_keys): avoid requiring return value from the error
trap, unless in debugging mode
(regrab_window_bindings, regrab_screen_bindings): push traps
around the loops, for efficiency
* src/display.c (event_callback): fix from Padraig O'Briain to
compress extra MappingNotify events to avoid extra work.
2002-11-05 Calum Benson <calum.benson@sun.com>
* src/themes/Crux/active-restore-button.png:
* src/themes/Crux/inactive-restore-button.png:
* src/themes/Crux/metacity-theme-1.xml: add a restore button
for maximized windows, and un-hard-code titlebar text colors.
Fixes #97759.
2002-11-05 Havoc Pennington <hp@redhat.com>
* src/workspace.c (meta_workspace_get_neighbor): apply patch from
Nikos Mouat to fix this function
2002-11-04 Havoc Pennington <hp@pobox.com>
* src/theme.c (scale_and_alpha_pixbuf): fix bug I introduced in
case where scaling was done in both directions.
2002-11-04 Havoc Pennington <hp@pobox.com>
Patch from Brian Cameron to implement the vertical/horizontal
striped image accelerated scaling from the gtk pixbuf engine.
* src/theme.c (scale_and_alpha_pixbuf): if an image is
vertical/horizontal stripes, use special extra-fast scaling
routines.
* src/theme-parser.c (parse_draw_op_element): when loading an
image, mark it as vertically/horizontally striped when appropriate
2002-11-04 Erwann Chenede - <erwann.chenede@sun.com>
* src/xprops.c (meta_prop_get_values): changed __FUNCTION__
to G_GNUC_FUNCTION as __FUNCTION__ is not portable.
2002-11-03 Havoc Pennington <hp@pobox.com>
* src/display.c (meta_display_grab): remove XSync calls from here
(meta_display_ungrab): remove XSync from here, but put in
an XFlush to be sure we get the ungrab sent.
* src/util.c (meta_topic): track sync count here
* src/errors.c: move sync count out of here
Throughout: error spew on all XSync() calls
* src/run-metacity.sh: don't set METACITY_DEBUG
2002-11-03 Havoc Pennington <hp@pobox.com>
* src/window-props.c (meta_display_init_window_prop_hooks): add
_NET_WM_NAME, WM_NAME, _NET_WM_ICON_NAME, WM_ICON_NAME support
* src/window.c (meta_window_new): use window-props.h for
_NET_WM_NAME, WM_NAME, _NET_WM_ICON_NAME, WM_ICON_NAME
2002-11-03 Havoc Pennington <hp@pobox.com>
* src/window.c (meta_window_new): use window-props.h stuff for a
couple of properties
(implement_showing): fix printf string
* src/xprops.c (meta_prop_free_values): new function
* src/window-props.h, src/window-props.c: start moving code that
handles loading window properties into this file.
2002-11-03 Havoc Pennington <hp@pobox.com>
* src/stack.c (create_constraints): filter out windows that aren't
in the stack for whatever reason, avoids a crash
2002-11-03 Havoc Pennington <hp@pobox.com>
* src/window.c (meta_window_calc_showing): split into "see if we
should be showing" and "actually show/hide" functions
(idle_calc_showing): rework to first unmap all newly-hidden
windows from bottom to top then map all newly-showing windows from
top to bottom resulting in fewer exposes, #95220
2002-11-03 Havoc Pennington <hp@pobox.com>
* src/theme.c (meta_frame_layout_calc_geometry): fix from Garrett
LeSage for which button backgrounds we draw when
2002-11-03 Havoc Pennington <hp@pobox.com>
* src/workspace.c (meta_workspace_get_name): new function,
and remove workspace->name field, instead just get the
name from prefs each time
* src/screen.c (meta_screen_update_workspace_names): update the
gconf key to persist workspace names here, instead of changing
the names we use
* src/util.c (topic_name): add META_DEBUG_PREFS
* src/prefs.c: change NUM_COMMANDS to 32 to allow more custom
commands, implement workspace names
* src/metacity.schemas.in: add workspace_names/name_NN gconf keys.
2002-11-01 Christian Neumair <chris@gnome-de.org>
* configure.in: We want at least autoconf 2.5.
2002-10-29 Havoc Pennington <hp@pobox.com>
* configure.in: 2.4.3, why not

View File

@@ -1,5 +1,5 @@
SUBDIRS=src po
SUBDIRS=src po doc
EXTRA_DIST=HACKING theme-format.txt metacity.spec.in metacity.spec \
EXTRA_DIST=HACKING metacity.spec.in metacity.spec \
intltool-extract.in intltool-merge.in intltool-update.in

286
README
View File

@@ -9,12 +9,23 @@ your petty hangups about version numbers.
COMPILING METACITY
===
You need GTK+ 2.0, ideally the latest in the 2.0.x series.
You need GTK+ 2.0, ideally the latest in the 2.0.x series. For
multihead/Xinerama support to work, you need GTK+ 2.1.x or 2.2. For
startup notification to work you need libstartup-notification at
http://www.freedesktop.org/software/startup-notification/ or on the
GNOME ftp site. You also need GConf 1.2 (unless building a funky
extra-small embedded metacity with --disable-gconf).
REPORTING BUGS AND SUBMITTING PATCHES
===
Report new bugs on http://bugzilla.gnome.org.
Report new bugs on http://bugzilla.gnome.org. Please check for
duplicates, *especially* if you are reporting a feature request.
Please do *not* add "me too!" or "yes I really want this!" comments to
feature requests in bugzilla. Please read
http://pobox.com/~hp/features.html prior to adding any kind of flame
about missing features or misfeatures.
Feel free to send patches too; Metacity is relatively small and
simple, so if you find a bug or want to add a feature it should be
@@ -22,6 +33,39 @@ pretty easy. Send me mail, or put the patch in bugzilla.
See the HACKING file for some notes on hacking Metacity.
SHRINKING METACITY
===
Not that metacity is huge (<400K binary last I checked), but about
half of that is in the preferences handling, in static strings that
aren't essential, and in the theme engine.
You can strip about 70K from the metacity binary by compiling with
options such as:
--disable-gconf
--disable-sm
--disable-verbose
--disable-startup-notification
However the result is no good for desktop use, all prefs have to be
hardcoded in the binary, for example. If you wanted to make a really
small metacity, here's some additional stuff you might consider
implementing:
- add --disable-themes, which would replace theme.c and theme-parser.c
with a hardcoded implementation of the interface in theme.h,
should save about 80K. This should be fairly easy.
- add --disable-gtk, which would implement the interface in ui.h
without using GTK. This one is easier than you think because the
main part of the window manager doesn't use GTK directly, but is
still fairly hard to do. You would probably have to give up some
of the features, such as window menus, as menus are pretty complex
to implement well. So time may be better spent adding a GTK
configure script feature to build GTK with only a small core set of
functionality.
METACITY FEATURES
===
@@ -31,8 +75,22 @@ METACITY FEATURES
- Uses GTK+ 2.0 for drawing window frames. This means colors, fonts,
etc. come from GTK+ theme.
- Does not expose the concept of "window manager" to the user. Some
of the features in the GNOME control panel and other parts of the
desktop happen to be implemented in metacity, such as changing your
window border theme, or changing your window navigation shorcuts,
but the user doesn't need to know this.
- Includes only the window manager; does not try to be a desktop
environment. The pager, configuration, etc. are all separate and
modular. The "libwnck" library (which I also wrote) is available
for writing metacity extensions, pagers, and so on. (But libwnck
isn't metacity specific, or GNOME-dependent; it requires only GTK,
and should work with KWin, fvwm2, and other EWMH-compliant WMs.)
- Has a simple theme system and a couple of extra themes come with it.
Change themes via gconf-editor or gconftool:
Change themes via gconf-editor or gconftool or GNOME themes control
panel:
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
@@ -51,7 +109,7 @@ METACITY FEATURES
gconftool-2 --type=string --set /apps/metacity/general/focus_mode sloppy
gconftool-2 --type=string --set /apps/metacity/general/focus_mode click
- Global keybinding defaults:
- Global keybinding defaults include:
Alt-Tab forward cycle window focus
Alt-Shift-Tab backward cycle focus
@@ -66,7 +124,10 @@ METACITY FEATURES
unst gconftool-2 --type=string --set /apps/metacity/global_keybindings/switch_to_workspace_1 '<Alt>F1'
See metacity.schemas for available bindings.
Also try the GNOME keyboard shortcuts control panel, or
gconf-editor.
See metacity.schemas for all available bindings.
- Window keybindings:
@@ -83,8 +144,9 @@ METACITY FEATURES
Choose Resize from menu, and nothing happens yet, but
eventually I might implement something.
Keybindings for things like maximize window, etc. can be bound,
but don't exist by default. See metacity.schemas.
Keybindings for things like maximize window, vertical maximize,
etc. can be bound, but may not all exist by default. See
metacity.schemas.
- Window mouse bindings:
@@ -99,11 +161,15 @@ METACITY FEATURES
If you click and drag the titlebar with button 1 it moves the
window.
If you click anywhere on the frame with button 2 it lowers the
window.
If you click anywhere on the frame with button 3 it shows the
window menu.
If you hold down Alt and click inside a window, it will move the
window (buttons 1 and 2) or show menu (button 3).
If you hold down Super (windows key) and click inside a window, it
will move the window (buttons 1 and 2) or show menu (button 3).
Or you can configure a different modifier for this.
If you pick up a window with button 1 and then switch workspaces
the window will come with you to the new workspace, this is
@@ -119,9 +185,10 @@ METACITY FEATURES
for session-aware applications.
- 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
yet.
freedesktop.org
(http://www.freedesktop.org/standards/wm-spec.html), and much of
the ICCCM. But then there are parts of each that it doesn't
implement, just because I haven't yet.
- Uses Pango to render text, so has cool i18n capabilities.
Supports UTF-8 window titles and such.
@@ -144,80 +211,69 @@ METACITY FEATURES
- does basic colormap handling
- and much more! well, maybe not a lot more.
METACITY BUGS, NON-FEATURES, AND CAVEATS
===
- 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.
- doesn't do WM_COLORMAPS from the ICCCM, may matter on some really
old obscure hardware with some really obscure apps.
- There are probably other ICCCM-compliance issues.
- The first-fit algorithm for placement isn't very clever.
- Should Metacity support flipping in right-to-left locales?
I don't know what window managers look like in a right-to-left
locale. I assume the window titles should be right-justified;
should the window controls also be flipped?
See bugzilla: http://bugzilla.gnome.org/query.cgi
FAQ
===
Q: Will you add my feature?
A: If it makes sense to turn on unconditionally,
or is genuinely a harmless preference that I would not
be embarrassed to put in a simple, uncluttered, user-friendly
configuration dialog.
A: If it makes sense to turn on unconditionally, or is genuinely a
harmless preference that I would not be embarrassed to put in a
simple, uncluttered, user-friendly configuration dialog.
If the only rationale for your feature is that other window
managers have it, or that you are personally used to it, or something
like that, then I will not be impressed. Metacity is firmly in the
"choose good defaults" camp rather than the "offer 6 equally broken
ways to do it, and let the user pick one" camp.
managers have it, or that you are personally used to it, or
something like that, then I will not be impressed. Metacity is
firmly in the "choose good defaults" camp rather than the "offer 6
equally broken ways to do it, and let the user pick one" camp.
This is part of a "no crackrock" policy, despite some exceptions
I'm mildly embarrassed about. For example, multiple workspaces
probably constitute crackrock, they confuse most users
and really are not that useful if you have a decent tasklist and
so on. But I am too used to them to turn them off.
Or alternatively iconification/tasklist is crack, and workspaces/pager
are good. But having both is certainly a bit wrong.
Sloppy focus is probably crackrock too.
probably constitute crackrock, they confuse most users and really
are not that useful if you have a decent tasklist and so on. But I
am too used to them to turn them off. Or alternatively
iconification/tasklist is crack, and workspaces/pager are good. But
having both is certainly a bit wrong. Sloppy focus is probably
crackrock too.
But don't think unlimited crack is OK just because I slipped up a
little. No slippery slope here.
little. No slippery slope here.
Don't let this discourage patches and fixes - I love those. ;-)
Just be prepared to hear the above objections if your patch
adds some crack-ridden configuration option.
Just be prepared to hear the above objections if your patch adds
some crack-ridden configuration option.
http://pobox.com/~hp/free-software-ui.html
http://pobox.com/~hp/features.html
Q: Will Metacity be part of GNOME?
A: Many people are now asking for this, though it was not the original
plan - Metacity started out as sort of an experiment.
A decision hasn't really been made but the issue will probably
be raised shortly after the GNOME 2 release.
A: It is officially part of GNOME as of GNOME 2.2. Prior to that,
it was unofficially shipped as the default GNOME WM by several
OS vendors.
Q: Is Metacity a Red Hat project?
A: Metacity is in no way funded, endorsed, or encouraged by Red Hat,
Inc. - I'm guessing Red Hat would not consider "insufficient number
of window managers for Linux" an urgent problem. Just a wild guess
though.
A: Metacity's original creation was in no way funded, endorsed, or
encouraged by Red Hat, Inc. - I'm guessing Red Hat would not
consider "insufficient number of window managers for Linux" an
urgent problem. Just a wild guess though.
Now that metacity is the default WM however, Red Hat supports some
bugfixing and other work.
Q: Why does Metacity remember the workspace/position of some apps
but not others?
but not others across logout/login?
A: Metacity only stores sizes/positions for apps that are session
managed. As far as I can determine, there is no way to attempt
to remember workspace/position for non-session-aware apps without
A: Metacity only stores sizes/positions for apps that are session
managed. As far as I can determine, there is no way to attempt to
remember workspace/position for non-session-aware apps without
causing a lot of weird effects.
The reason is that you don't know which non-SM-aware apps were
@@ -270,6 +326,120 @@ A: I could conceivably be convinced to use viewports _instead_ of
features traditionally associated with either kind if those
features make sense.
Q: Why is the panel always on top?
A: Because it's a better user interface, and until we made this not
configurable a bunch of apps were not getting fixed (the app
authors were just saying "put your panel on the bottom" instead of
properly supporting fullscreen mode, and such).
rationales.txt has the bugzilla URL for some flamefesting on this,
if you want to go back and relive the glory.
Read these and the bugzilla stuff before asking/commenting:
http://pobox.com/~hp/free-software-ui.html
http://pobox.com/~hp/features.html
Q: Why is there no edge flipping?
A: This one is also in rationales.txt. Because "ouija board" UI, where
you just move the mouse around and the computer guesses what you
mean, has a lot of issues. This includes mouse focus, shade-hover
mode, edge flipping, autoraise, etc. Metacity has mouse focus and
autoraise as a compromise, but these features are all confusing for
many users, and cause problems with accessibility, fitt's law, and
so on.
Read these and the bugzilla stuff before asking/commenting:
http://pobox.com/~hp/free-software-ui.html
http://pobox.com/~hp/features.html
Q: Why no wireframe move/resize?
A: Also in rationales.txt. Because it has low usability, and is a pain
to implement, and there's no reason opaque move/resize should be a
problem on any setup that can run a modern desktop worth a darn to
begin with.
Read these and the bugzilla stuff before asking/commenting:
http://pobox.com/~hp/free-software-ui.html
http://pobox.com/~hp/features.html
Q: Why no XYZ?
A: You are probably getting the idea by now - check rationales.txt,
query/search bugzilla, and read http://pobox.com/~hp/features.html
and http://pobox.com/~hp/free-software-ui.html
Then sit down and answer the question for yourself. Is the feature
good? What's the rationale for it? Answer "why" not just "why not."
Justify in terms of users as a whole, not just users like
yourself. How else can you solve the same problem? etc. If that
leads you to a strong opinion, then please, post the rationale for
discussion to an appropriate bugzilla bug, or to
usability@gnome.org.
Please don't just "me too!" on bugzilla bugs, please don't think
flames will get you anywhere, and please don't repeat rationale
that's already been offered.
Q: Your dumb web pages you made me read talk about solving problems in
fundamental ways instead of adding preferences or workarounds.
What are some examples where metacity has done this?
A: There are quite a few, though many opportunities remain. Sometimes
the real fix involves application changes. The metacity approach is
that it's OK to require apps to change, though there are also
plenty of workarounds in metacity for battles considered too hard
to fight.
Here are some examples:
- fullscreen mode was introduced to allow position constraints,
panel-on-top, and other such things to apply to normal windows
while still allowing video players etc. to "just work"
- "whether to include minimized windows in Alt+Tab" was solved
by putting minimized windows at the *end* of the tab order.
- Whether to pop up a feedback display during Alt+Tab was solved by
having both Alt+Tab and Alt+Esc
- Whether to have a "kill" feature was solved by automatically
detecting and offering to kill stuck apps. Better, metacity
actually does "kill -9" on the process, it doesn't just
disconnect the process from the X server. You'll appreciate this
if you ever did a "kill" on Netscape 4, and watched it keep
eating 100% CPU even though the X server had booted it.
- The workspaces vs. viewports mess was avoided by adding
directional navigation and such to workspaces, see discussion
earlier in this file.
- Instead of configurable placement algorithms, there's just one
that works fairly well most of the time.
- To avoid excess CPU use during opaque move/resize, we rate limit
the updates to the application window's size.
- Instead of configurable "show size of window while resizing,"
it's only shown for windows where it matters, such as terminals.
(Only use-case given for all windows is for web designers
choosing their web browser size, but there are web sites and
desktop backgrounds that do this for you.)
- Using startup notification, applications open on the workspace
where you launched them, not the active workspace when their
window is opened.
- and much more.
Q: I think metacity sucks.
A: Feel free to use any WM you like. The reason metacity follows the
ICCCM and EWMH specifications is that it makes metacity a modular,
interchangeable part in the desktop. libwnck-based apps such as the
GNOME window list will work just fine with any EWMH-compliant WM.
Q: Did you spend a lot of time on this?
A: Originally the answer was no. Sadly the answer is now yes.
@@ -278,5 +448,3 @@ Q: How can you claim that you are anti-crack, while still
writing a window manager?
A: I have no comment on that.

View File

@@ -1,19 +0,0 @@
#undef PACKAGE
#undef VERSION
#undef HAVE_CATGETS
#undef HAVE_GETTEXT
#undef HAVE_LC_MESSAGES
#undef HAVE_STPCPY
#undef ENABLE_NLS
#undef HAVE_PTHREAD_H
#undef GETTEXT_PACKAGE
#undef HAVE_SHAPE_EXT
#undef HAVE_XFT
#undef HAVE_SM
#undef HAVE_XINERAMA
#undef HAVE_SOLARIS_XINERAMA
#undef HAVE_XFREE_XINERAMA
#undef HAVE_SHAPE
#undef HAVE_RANDR
#undef HAVE_STARTUP_NOTIFICATION

View File

@@ -46,6 +46,7 @@ ACLOCAL=aclocal-1.4
}
}
CONFIGURE=configure.in
if grep "^AM_[A-Z0-9_]\{1,\}_GETTEXT" "$CONFIGURE" >/dev/null; then
if grep "sed.*POTFILES" "$CONFIGURE" >/dev/null; then
GETTEXTIZE=""

View File

@@ -1,16 +1,17 @@
AC_PREREQ(2.50)
AC_INIT(src/display.c)
AM_CONFIG_HEADER(config.h)
# 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987
AM_INIT_AUTOMAKE(metacity, 2.4.3)
AM_INIT_AUTOMAKE(metacity, 2.4.8)
# Honor aclocal flags
ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
GETTEXT_PACKAGE=metacity
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE")
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Name of default gettext domain])
AM_MAINTAINER_MODE
@@ -18,7 +19,6 @@ AC_PROG_INTLTOOL([0.21])
AC_PROG_CC
AC_ISC_POSIX
AC_HEADER_STDC
AC_ARG_PROGRAM
AM_PROG_LIBTOOL
changequote(,)dnl
@@ -82,31 +82,74 @@ if test "x$GCC" = "xyes"; then
fi
changequote([,])dnl
METACITY_PC_MODULES='gtk+-2.0 >= 2.0.0'
AC_ARG_ENABLE(config-dialog, [ --enable-config-dialog enable the config dialog that you need with GNOME 2.0 (obsolete with GNOME 2.2)],enable_config_dialog=yes,enable_config_dialog=no)
AM_CONDITIONAL(BUILD_CONFIG_DIALOG, test x$enable_config_dialog = xyes)
if test x$enable_config_dialog = xyes; then
AC_DEFINE(BUILD_CONFIG_DIALOG,1,[Build configuration dialog])
fi
AC_ARG_ENABLE(gconf, [ --disable-gconf disable gconf usage, for embedded/size-sensitive non-GNOME builds],enable_gconf=no,enable_gconf=yes)
if test x$enable_gconf = xyes; then
AC_DEFINE(HAVE_GCONF,1,[Build with gconf support])
METACITY_PC_MODULES="$METACITY_PC_MODULES gconf-2.0 >= 1.2.0"
fi
AC_ARG_ENABLE(verbose-mode, [ --disable-verbose disable metacity's ability to do verbose logging, for embedded/size-sensitive custom builds],enable_verbose_mode=no,enable_verbose_mode=yes)
if test x$enable_verbose_mode = xyes; then
AC_DEFINE(WITH_VERBOSE_MODE,1,[Build with verbose mode support])
fi
AC_ARG_ENABLE(sm, [ --disable-sm disable metacity's session management support, for embedded/size-sensitive custom non-GNOME builds],enable_sm=no,enable_sm=auto)
AC_ARG_ENABLE(startup-notification, [ --disable-startup-notification disable metacity's startup notification support, for embedded/size-sensitive custom non-GNOME builds],enable_startup_notification=no,enable_startup_notification=auto)
## try definining HAVE_BACKTRACE
AC_CHECK_HEADERS(execinfo.h, [AC_CHECK_FUNCS(backtrace)])
ALL_LINGUAS="az ca cs da de el es fr gl hu it ja ko lv ms no pl pt pt_BR ro ru sk sv tr uk vi zh_CN zh_TW"
AM_GLIB_GNU_GETTEXT
## here we get the flags we'll actually use
PKG_CHECK_MODULES(METACITY_MESSAGE, gtk+-2.0 >= 2.0.0)
PKG_CHECK_MODULES(METACITY_WINDOW_DEMO, gtk+-2.0 >= 2.0.0)
PKG_CHECK_MODULES(METACITY_PROPS, gtk+-2.0 >= 2.0.0 gconf-2.0 >= 1.1.9 libglade-2.0)
STARTUP_NOTIFICATION_VERSION=0.2
if test x$enable_config_dialog = xyes; then
PKG_CHECK_MODULES(METACITY_PROPS, gtk+-2.0 >= 2.0.0 gconf-2.0 >= 1.1.9 libglade-2.0)
fi
STARTUP_NOTIFICATION_VERSION=0.4
AC_MSG_CHECKING([Startup notification library >= $STARTUP_NOTIFICATION_VERSION])
if $PKG_CONFIG --atleast-version $STARTUP_NOTIFICATION_VERSION libstartup-notification-1.0; then
have_startup_notification=yes
else
have_startup_notification=no
fi
AC_MSG_RESULT($have_startup_notification)
if test x$enable_startup_notification = xyes; then
have_startup_notification=yes
echo "startup-notification support forced on"
elif test x$enable_startup_notification = xauto; then
true
else
have_startup_notification=no
fi
if test x$have_startup_notification = xyes; then
echo "Building with libstartup-notification"
PKG_CHECK_MODULES(METACITY, gtk+-2.0 >= 2.0.0 gconf-2.0 >= 1.1.9 libstartup-notification-1.0 >= $STARTUP_NOTIFICATION_VERSION)
AC_DEFINE(HAVE_STARTUP_NOTIFICATION)
with_startup_notification=yes
METACITY_PC_MODULES="$METACITY_PC_MODULES libstartup-notification-1.0 >= $STARTUP_NOTIFICATION_VERSION"
AC_DEFINE(HAVE_STARTUP_NOTIFICATION, , [Building with startup notification support])
else
echo "Building without libstartup-notification"
PKG_CHECK_MODULES(METACITY, gtk+-2.0 >= 2.0.0 gconf-2.0 >= 1.1.9)
with_startup_notification=no
fi
PKG_CHECK_MODULES(METACITY, $METACITY_PC_MODULES)
if $PKG_CONFIG --atleast-version 2.1.0 gtk+-2.0; then
AC_DEFINE(HAVE_GTK_MULTIHEAD,,[gtk+ with multihead support found])
with_multihead=yes
@@ -136,8 +179,8 @@ case "$host" in
if test -z "`echo $ALL_X_LIBS | grep "\-lXext" 2> /dev/null`"; then
X_EXTRA_LIBS="-lXext $X_EXTRA_LIBS"
fi
AC_DEFINE(HAVE_SOLARIS_XINERAMA)
AC_DEFINE(HAVE_XINERAMA),
AC_DEFINE(HAVE_SOLARIS_XINERAMA, , [Have Solaris-style Xinerama])
AC_DEFINE(HAVE_XINERAMA, , [Have some version of Xinerama]),
use_solaris_xinerama=no,
[#include <X11/Xlib.h>])
fi
@@ -153,8 +196,8 @@ case "$host" in
if test -z "`echo $ALL_X_LIBS | grep "\-lXext" 2> /dev/null`"; then
X_EXTRA_LIBS="-lXext $X_EXTRA_LIBS"
fi
AC_DEFINE(HAVE_XFREE_XINERAMA)
AC_DEFINE(HAVE_XINERAMA),
AC_DEFINE(HAVE_XFREE_XINERAMA, , [Have XFree86-style Xinerama])
AC_DEFINE(HAVE_XINERAMA,, [Have some version of Xinerama]),
use_xfree_xinerama=no,
[#include <X11/Xlib.h>])],
use_xfree_xinerama=no, -lXext $ALL_X_LIBS)
@@ -173,7 +216,7 @@ AC_CHECK_LIB(Xext, XShapeQueryExtension,
, $ALL_X_LIBS)
if test "x$found_shape" = "xyes"; then
AC_DEFINE(HAVE_SHAPE)
AC_DEFINE(HAVE_SHAPE, , [Have the shape extension library])
fi
RANDR_LIBS=
@@ -185,7 +228,7 @@ AC_CHECK_LIB(Xrandr, XRRUpdateConfiguration,
, -lXrender $ALL_X_LIBS)
if test "x$found_randr" = "xyes"; then
AC_DEFINE(HAVE_RANDR)
AC_DEFINE(HAVE_RANDR, , [Have the Xrandr extension library])
fi
METACITY_LIBS="$RANDR_LIBS $SHAPE_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $METACITY_LIBS"
@@ -206,8 +249,19 @@ case "$METACITY_LIBS" in
;;
esac
if test x$enable_sm = xno; then
found_sm=no
fi
if test x$enable_sm = xyes; then
if test "$found_sm" = "no"; then
AC_MSG_ERROR([--enable-sm forced and -lSM not found])
exit 1
fi
fi
if test "$found_sm" = "yes"; then
AC_DEFINE(HAVE_SM)
AC_DEFINE(HAVE_SM, , [Building with SM support])
fi
AM_CONDITIONAL(HAVE_SM, test "$found_sm" = "yes")
@@ -229,38 +283,60 @@ LDFLAGS="$METACITY_LIBS $LDFLAGS"
AC_CHECK_FUNCS(gdk_pixbuf_new_from_stream)
LDFLAGS=$save_LDFLAGS
AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
if test x$enable_gconf = xyes; then
AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
if test x"$GCONFTOOL" = xno; then
AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf])
fi
if test x"$GCONFTOOL" = xno; then
AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf])
AM_GCONF_SOURCE_2
fi
AM_GCONF_SOURCE_2
AC_OUTPUT([
Makefile
doc/Makefile
src/Makefile
src/wm-tester/Makefile
src/libmetacity-private.pc
src/tools/Makefile
src/themes/Makefile
po/Makefile.in
metacity.spec
])
if test x$enable_gconf = xno; then
echo "*** WARNING WARNING WARNING WARNING WARNING"
echo "*** Building without GConf"
echo "*** This means there's no way to change prefs except"
echo "*** hacking source code, at least for now."
echo "*** Also, some prefs may have broken defaults."
echo "*** Patches needed for a simple no-gconf config file."
echo "*** This is intended for embedded systems etc., not for normal use."
fi
if test x$enable_verbose_mode = xno; then
echo "*** WARNING WARNING WARNING WARNING WARNING"
echo "*** Building without verbose mode"
echo "*** This means there's no way to debug metacity problems."
echo "*** Please build normal desktop versions of metacity"
echo "*** with verbose mode enabled so users can use it when they report bugs."
fi
dnl ==========================================================================
echo "
metacity-$VERSION:
prefix: ${prefix}
source code location: ${srcdir}
compiler: ${CC}
XFree86 Xinerama: ${use_xfree_xinerama}
Solaris Xinerama: ${use_solaris_xinerama}
Multihead: ${with_multihead}
Startup notification: ${with_startup_notification}
Session management: ${found_sm}
Shape extension: ${found_shape}
Resize-and-rotate: ${found_randr}
prefix: ${prefix}
source code location: ${srcdir}
compiler: ${CC}
GConf: ${enable_gconf}
XFree86 Xinerama: ${use_xfree_xinerama}
Solaris Xinerama: ${use_solaris_xinerama}
Multihead: ${with_multihead}
Startup notification: ${have_startup_notification}
Session management: ${found_sm}
Shape extension: ${found_shape}
Resize-and-rotate: ${found_randr}
Deprecated config dialog: ${enable_config_dialog}
"

2
doc/.cvsignore Normal file
View File

@@ -0,0 +1,2 @@
Makefile
Makefile.in

2
doc/Makefile.am Normal file
View File

@@ -0,0 +1,2 @@
EXTRA_DIST=theme-format.txt metacity-theme.dtd

273
doc/metacity-theme.dtd Normal file
View File

@@ -0,0 +1,273 @@
<!--
DTD for Metacity themes, as of Metacity 2.4.1
Author: Ross Burton <ross@burtonini.com>
Copyright (C) 2002 Ross Burton
Licensed under the GPL, version 2
-->
<!-- Top-level element -->
<!ELEMENT metacity_theme (info,(window|frame_style_set|frame_style|frame_geometry|constant|draw_ops|menu_icon)+)>
<!-- Theme metadata -->
<!ELEMENT info (name?|author?|copyright?|date?|description?)*>
<!ELEMENT name (#PCDATA)>
<!ELEMENT author (#PCDATA)>
<!ELEMENT copyright (#PCDATA)>
<!ELEMENT date (#PCDATA)>
<!ELEMENT description (#PCDATA)>
<!ENTITY % xyrequired "
x CDATA #REQUIRED
y CDATA #REQUIRED
">
<!ENTITY % xyimplied "
x CDATA #IMPLIED
y CDATA #IMPLIED
">
<!ENTITY % widthheightrequired "
width CDATA #REQUIRED
height CDATA #REQUIRED
">
<!ENTITY % widthheightimplied "
width CDATA #IMPLIED
height CDATA #IMPLIED
">
<!ENTITY % boolean "(true|false)">
<!ENTITY % piece_positions "
(entire_background|titlebar|titlebar_middle|left_titlebar_edge|right_titlebar_edge|top_titlebar_edge|bottom_titlebar_edge|title|left_edge|right_edge|bottom_edge|overlay)
">
<!ENTITY % gtk-state "
state (normal|prelight|active|selected|insensitive) #REQUIRED
">
<!ENTITY % gtk-shadow "
shadow (none|in|out|etched_in|etched_out) #REQUIRED
">
<!-- The actual theme -->
<!ELEMENT window EMPTY>
<!ATTLIST window
type (normal|dialog|modal_dialog|menu|utility|border) #REQUIRED
style_set CDATA #REQUIRED
>
<!ELEMENT frame_style_set (frame+)>
<!ATTLIST frame_style_set
name CDATA #REQUIRED
parent CDATA #IMPLIED
>
<!ELEMENT frame EMPTY>
<!ATTLIST frame
focus (yes|no) #REQUIRED
state (normal|maximized|shaded|maximized_and_shaded) #REQUIRED
resize (both|horizontal|vertical|none) #REQUIRED
style CDATA #REQUIRED
>
<!ELEMENT frame_style (piece|button)*>
<!ATTLIST frame_style
name CDATA #REQUIRED
geometry CDATA #REQUIRED
parent CDATA #IMPLIED
>
<!ELEMENT piece (draw_ops?)>
<!ATTLIST piece
position %piece_positions; #REQUIRED
draw_ops CDATA #IMPLIED
>
<!ELEMENT button (draw_ops?)>
<!ATTLIST button
function (menu|minimize|maximize|close|left_left_background|left_middle_background|left_right_background|right_left_background|right_middle_background|right_right_background) #REQUIRED
state (normal|prelight|pressed) #REQUIRED
draw_ops CDATA #IMPLIED
>
<!ELEMENT frame_geometry (border|(aspect_ratio|distance))+>
<!ATTLIST frame_geometry
name CDATA #REQUIRED
parent CDATA #IMPLIED
title_scale (xx-small|x-small|small|medium|large|x-large|xx-large) #IMPLIED
has_title (true|false) 'true'
rounded_top_left %boolean; #IMPLIED
rounded_top_right %boolean; #IMPLIED
rounded_bottom_left %boolean; #IMPLIED
rounded_bottom_right %boolean; #IMPLIED
>
<!ELEMENT distance EMPTY>
<!ATTLIST distance
name (left_width|right_width|bottom_height|title_vertical_pad|right_titlebar_edge|left_titlebar_edge|button_width|button_height) #REQUIRED
value CDATA #REQUIRED
>
<!ELEMENT border EMPTY>
<!ATTLIST border
name CDATA #REQUIRED
top CDATA #REQUIRED
bottom CDATA #REQUIRED
left CDATA #REQUIRED
right CDATA #REQUIRED
>
<!ELEMENT aspect_ratio EMPTY>
<!ATTLIST aspect_ratio
name CDATA #REQUIRED
value CDATA #REQUIRED
>
<!ELEMENT draw_ops (line|rectangle|arc|tint|gradient|image|gtk_arrow|gtk_box|gtk_vline|icon|title|clip|include|tile)*>
<!-- not sure about this.. maybe it should be removed. see #3478 in theme-parser.c -->
<!ATTLIST draw_ops
name CDATA #IMPLIED
>
<!ELEMENT line EMPTY>
<!ATTLIST line
color CDATA #REQUIRED
x1 CDATA #REQUIRED
y1 CDATA #REQUIRED
x2 CDATA #REQUIRED
y2 CDATA #REQUIRED
width CDATA #IMPLIED
dash_on_length CDATA #IMPLIED
dash_off_length CDATA #IMPLIED
>
<!ELEMENT rectangle EMPTY>
<!ATTLIST rectangle
color CDATA #REQUIRED
%xyrequired;
%widthheightrequired;
filled %boolean; 'false'
>
<!ELEMENT arc EMTPY>
<!ATTLIST arc
color CDATA #REQUIRED
%xyrequired;
%widthheightrequired;
start_angle CDATA #REQUIRED
extent_angle CDATA #REQUIRED
filled %boolean; 'false'
>
<!ELEMENT icon EMPTY>
<!ATTLIST icon
%xyrequired;
width CDATA #REQUIRED
height CDATA #REQUIRED
alpha CDATA #IMPLIED
fill_type (tile|scale) 'scale'
>
<!ELEMENT image EMPTY>
<!ATTLIST image
filename CDATA #REQUIRED
colorize CDATA #IMPLIED
%xyrequired;
%widthheightrequired;
alpha CDATA #IMPLIED
fill_type (tile|scale) 'scale'
>
<!ELEMENT tile EMPTY>
<!ATTLIST tile
name CDATA #REQUIRED
%xyrequired;
%widthheightrequired;
tile_xoffset CDATA #IMPLIED
tile_yoffset CDATA #IMPLIED
tile_width CDATA #REQUIRED
tile_height CDATA #REQUIRED
>
<!ELEMENT clip EMPTY>
<!ATTLIST clip
%xyrequired;
%widthheightrequired;
>
<!ELEMENT title EMPTY>
<!ATTLIST title
color CDATA #REQUIRED
%xyrequired;
>
<!ELEMENT tint EMPTY>
<!ATTLIST tint
color CDATA #REQUIRED
%xyrequired;
%widthheightrequired;
alpha CDATA #REQUIRED
>
<!ELEMENT gtk_box EMPTY>
<!ATTLIST gtk_box
%gtk-state;
%gtk-shadow;
%xyrequired;
%widthheightrequired;
>
<!ELEMENT gtk_arrow EMPTY>
<!ATTLIST gtk_arrow
%gtk-state;
%gtk-shadow;
arrow (up|down|left|right) #REQUIRED
%xyrequired;
%widthheightrequired;
filed CDATA #IMPLIED
>
<!ELEMENT gtk_vline EMPTY>
<!ATTLIST gtk_vline
%gtk-state;
x CDATA #REQUIRED
y1 CDATA #REQUIRED
y2 CDATA #REQUIRED
>
<!ELEMENT gradient (color)+>
<!ATTLIST gradient
type (vertical|horizontal|diagonal) #REQUIRED
%xyrequired;
%widthheightrequired;
alpha CDATA #IMPLIED
>
<!ELEMENT color EMPTY>
<!ATTLIST color
value CDATA #REQUIRED
>
<!ELEMENT include EMPTY>
<!ATTLIST include
name CDATA #REQUIRED
%xyimplied;
%widthheightimplied;
>
<!ELEMENT constant EMPTY>
<!ATTLIST constant
name CDATA #REQUIRED
value CDATA #REQUIRED
>
<!ELEMENT menu_icon (draw_ops?)>
<!ATTLIST menu_icon
function (close|maximize|minimize|unmaximize) #REQUIRED
%gtk-state;
draw_ops CDATA #IMPLIED
>

View File

@@ -1,3 +1,81 @@
2002-12-09 Pablo Gonzalo del Campo <pablodc@bigfoot.com>
* es.po: Updated Spanish translation.
2002-12-09 Miloslav Trmac <mitr@volny.cz>
* cs.po: Updated Czech translation.
2002-12-04 Pablo Gonzalo del Campo <pablodc@bigfoot.com>
* es.po: Updated Spanish translation.
2002-11-25 Kjartan Maraas <kmaraas@gnome.org>
* no.po: Updated Norwegian (bokmål) translation.
2002-11-25 Yanko Kaneti <yaneti@declera.com>
* *.po: Convert all to UTF-8.
2002-11-24 Kostas Papadimas <pkst@gmx.net>
* el.po: Updated Greek translation.
2002-11-23 Kostas Papadimas <pkst@gmx.net>
* el.po: Updated Greek translation.
2002-11-19 Andras Timar <timar@gnome.hu>
* hu.po: Updated Hungarian translation.
2002-11-15 Kjartan Maraas <kmaraas@gnome.org>
* no.po: Updated Norwegian (bokmål) translation.
2002-11-14 Gustavo Noronha Silva <kov@debian.org>
* pt_BR.po: Update translation.
2002-11-14 Pablo Gonzalo del Campo <pablodc@bigfoot.com>
* es.po: Updated Spanish translation.
2002-11-13 Christian Neumair <chris@gnome-de.org>
* de.po: Updated German translation.
2002-11-11 Peteris Krisjanis <peteris.krisjanis@os.lv>
* lv.po: Updated Latvian translation.
2002-11-11 Changwoo Ryu <cwryu@debian.org>
* ko.po: Updated Korean translation by Young-Ho Cha
<ganadist@chollian.net>.
2002-11-10 Ole Laursen <olau@hardworking.dk>
* da.po: Updated Danish translation.
2002-11-05 Hasbullah Bin Pit <sebol@ikhlas.com>
* ms.po: Updated Malay Translation.
2002-11-05 Christian Rose <menthos@menthos.com>
* POTFILES.in: Added missing file.
* sv.po: Updated Swedish translation.
2002-11-01 Christian Neumair <chris@gnome-de.org>
* de.po: Updated German translation.
2002-10-31 Pablo Gonzalo del Campo <pablodc@bigfoot.com>
* es.po: Updated Spanish translation.
2002-10-28 Ole Laursen <olau@hardworking.dk>
* da.po: Updated Danish translation.
@@ -21,7 +99,7 @@
2002-10-21 Kjartan Maraas <kmaraas@gnome.org>
* no.po: Updated Norwegian (bokmål) translation.
* no.po: Updated Norwegian (bokmål) translation.
2002-10-17 Andras Timar <timar@gnome.hu>
@@ -45,7 +123,7 @@
2002-10-15 Kjartan Maraas <kmaraas@gnome.org>
* no.po: Updated Norwegian (bokmål) translation.
* no.po: Updated Norwegian (bokmål) translation.
2002-10-15 Ole Laursen <olau@hardworking.dk>
@@ -109,7 +187,7 @@
2002-09-11 Kjartan Maraas <kmaraas@gnome.org>
* no.po: Updated Norwegian (bokmål) translation.
* no.po: Updated Norwegian (bokmål) translation.
2002-09-10 Pablo Gonzalo del Campo <pablodc@bigfoot.com>
@@ -286,7 +364,7 @@
2002-08-04 Kjartan Maraas <kmaraas@gnome.org>
* no.po: Updated Norwegian (bokmål) translation.
* no.po: Updated Norwegian (bokmål) translation.
2002-07-30 Pablo Saratxaga <pablo@mandrakesoft.com>
@@ -343,7 +421,7 @@
2002-07-16 Kjartan Maraas <kmaraas@gnome.org>
* no.po: Updated Norwegian (bokmål) translation.
* no.po: Updated Norwegian (bokmål) translation.
2002-07-15 Ole Laursen <olau@hardworking.dk>
@@ -392,7 +470,7 @@
2002-06-23 Kjartan Maraas <kmaraas@gnome.org>
* no.po: Updated Norwegian (bokmål) translation.
* no.po: Updated Norwegian (bokmål) translation.
2002-06-23 Christian Rose <menthos@menthos.com>
@@ -470,7 +548,7 @@
2002-06-03 Kjartan Maraas <kmaraas@gnome.org>
* no.po: Updated Norwegian (bokmål) translation.
* no.po: Updated Norwegian (bokmål) translation.
2002-06-03 Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>
@@ -495,7 +573,7 @@
2002-05-31 Kjartan Maraas <kmaraas@gnome.org>
* no.po: Updated Norwegian (bokmål) translation.
* no.po: Updated Norwegian (bokmål) translation.
2002-05-28 Pablo Gonzalo del Campo <pablodc@bigfoot.com>
@@ -542,7 +620,7 @@
2002-05-18 Kjartan Maraas <kmaraas@gnome.org>
* no.po: Updated Norwegian (bokmål) translation.
* no.po: Updated Norwegian (bokmål) translation.
2002-05-18 Ole Laursen <olau@hardworking.dk>
@@ -568,7 +646,7 @@
2002-04-22 Kjartan Maraas <kmaraas@gnome.org>
* no.po: Updated Norwegian (bokmål) translation.
* no.po: Updated Norwegian (bokmål) translation.
2002-04-19 Changwoo Ryu <cwryu@debian.org>
@@ -596,11 +674,11 @@
2002-03-28 Kjartan Maraas <kmaraas@gnome.org>
* no.po: Updated Norwegian (bokmål) translation.
* no.po: Updated Norwegian (bokmål) translation.
2002-03-27 Kjartan Maraas <kmaraas@gnome.org>
* no.po: Updated Norwegian (bokmål) translation.
* no.po: Updated Norwegian (bokmål) translation.
2002-03-22 Zbigniew Chyla <cyba@gnome.pl>
@@ -608,19 +686,19 @@
2002-02-22 Kjartan Maraas <kmaraas@gnome.org>
* no.po: Updated Norwegian (bokmål) translation.
* no.po: Updated Norwegian (bokmål) translation.
2002-02-17 Kjartan Maraas <kmaraas@gnome.org>
* no.po: Updated Norwegian (bokmål) translation.
* no.po: Updated Norwegian (bokmål) translation.
2002-02-16 Kjartan Maraas <kmaraas@gnome.org>
* no.po: Updated Norwegian (bokmål) translation.
* no.po: Updated Norwegian (bokmål) translation.
2002-02-12 Kjartan Maraas <kmaraas@gnome.org>
* no.po: Updated Norwegian (bokmål) translation.
* no.po: Updated Norwegian (bokmål) translation.
2002-02-11 Duarte Loreto <happyguy_pt@hotmail.com>
@@ -632,7 +710,7 @@
2002-02-10 Kjartan Maraas <kmaraas@gnome.org>
* no.po: Updated Norwegian (bokmål) translation.
* no.po: Updated Norwegian (bokmål) translation.
2002-02-08 Christian Rose <menthos@menthos.com>
@@ -649,7 +727,7 @@
2002-02-02 Kjartan Maraas <kmaraas@gnome.org>
* no.po: Updated Norwegian (bokmål) translation.
* no.po: Updated Norwegian (bokmål) translation.
2002-01-31 Christian Rose <menthos@menthos.com>
@@ -665,7 +743,7 @@
2002-01-29 Kjartan Maraas <kmaraas@gnome.org>
* no.po: Updated Norwegian (bokmål) translation.
* no.po: Updated Norwegian (bokmål) translation.
2002-01-27 Peteris Krisjanis <peteris.krisjanis@ttc.lv>
@@ -677,7 +755,7 @@
2002-01-11 Kjartan Maraas <kmaraas@gnome.org>
* no.po: Updated Norwegian (bokmål) translation.
* no.po: Updated Norwegian (bokmål) translation.
2002-01-09 Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>
@@ -689,7 +767,7 @@
2002-01-06 Fatih Demir <kabalak@gtranslator.org>
* tr.po: Added Turkish translation by Görkem Cetin.
* tr.po: Added Turkish translation by Görkem Cetin.
2002-01-05 Christian Rose <menthos@menthos.com>
@@ -711,7 +789,7 @@
2001-12-16 Kjartan Maraas <kmaraas@gnome.org>
* no.po: Updated Norwegian (bokm�) translation.
* no.po: Updated Norwegian (bokmᅵ) translation.
2001-12-15 Christian Rose <menthos@menthos.com>
@@ -728,17 +806,17 @@
2001-11-27 Jesus Bravo Alvarez <jba@pobox.com>
* gl.po: Added Galician translation from
Manuel A. Fern�dez Montecelo <manuel@sindominio.net>
Manuel A. Fernᅵdez Montecelo <manuel@sindominio.net>
2001-10-29 Yuriy Syrota <rasta@renome.rovno.ua>
* uk.po: Added Ukrainian translation file.
2001-10-28 H�tor Garc� �varez <hector@scouts-es.org>
2001-10-28 Hᅵtor Garcᅵ ᅵvarez <hector@scouts-es.org>
* es.po: Updated Spanish translation.
2001-10-14 H�tor Garc� �varez <hector@scouts-es.org>
2001-10-14 Hᅵtor Garcᅵ ᅵvarez <hector@scouts-es.org>
* es.po: Added Spanish translation.
@@ -748,7 +826,7 @@
2001-10-11 Christian Rose <menthos@menthos.com>
* sv.po: Fixed some typos. Thanks to Tomas �ren <stric@ing.umu.se>
* sv.po: Fixed some typos. Thanks to Tomas ᅵren <stric@ing.umu.se>
for spotting many of them.
2001-10-11 Christian Rose <menthos@menthos.com>

View File

@@ -20,6 +20,7 @@ src/theme.c
src/tools/metacity-properties.desktop.in
src/tools/metacity-properties.glade
src/util.c
src/window-props.c
src/window.c
src/workspace.c
src/xprops.c

598
po/az.po

File diff suppressed because it is too large Load Diff

879
po/ca.po

File diff suppressed because it is too large Load Diff

674
po/cs.po

File diff suppressed because it is too large Load Diff

616
po/da.po

File diff suppressed because it is too large Load Diff

1104
po/de.po

File diff suppressed because it is too large Load Diff

1903
po/el.po

File diff suppressed because it is too large Load Diff

View File

@@ -9,10 +9,11 @@ msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2002-10-16 00:19+0100\n"
"PO-Revision-Date: 2002-10-15 23:19+0000\n"
"Last-Translator: Robert Brady <rwb197@zepler.org>, Bastien Nocera <hadess@hadess.net>\n"
"Last-Translator: Robert Brady <rwb197@zepler.org>, Bastien Nocera "
"<hadess@hadess.net>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-1\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: src/delete.c:62 src/delete.c:89 src/metacity-dialog.c:46
@@ -97,7 +98,8 @@ msgstr ""
#: src/keybindings.c:2084
#, c-format
msgid "Error launching metacity-dialog to print an error about a command: %s\n"
msgstr "Error launching metacity-dialogue to print an error about a command: %s\n"
msgstr ""
"Error launching metacity-dialogue to print an error about a command: %s\n"
#: src/keybindings.c:2114
#, c-format
@@ -1817,8 +1819,8 @@ msgid ""
"GTK color specification must have the state in brackets, e.g. gtk:fg[NORMAL] "
"where NORMAL is the state; could not parse \"%s\""
msgstr ""
"GTK colour specification must have the state in brackets, e.g. gtk:fg[NORMAL] "
"where NORMAL is the state; could not parse \"%s\""
"GTK colour specification must have the state in brackets, e.g. gtk:fg"
"[NORMAL] where NORMAL is the state; could not parse \"%s\""
#: src/theme.c:987
#, c-format

1285
po/es.po

File diff suppressed because it is too large Load Diff

620
po/fr.po

File diff suppressed because it is too large Load Diff

734
po/gl.po

File diff suppressed because it is too large Load Diff

622
po/hu.po

File diff suppressed because it is too large Load Diff

704
po/it.po

File diff suppressed because it is too large Load Diff

600
po/ja.po

File diff suppressed because it is too large Load Diff

704
po/ko.po

File diff suppressed because it is too large Load Diff

626
po/lv.po

File diff suppressed because it is too large Load Diff

677
po/ms.po

File diff suppressed because it is too large Load Diff

641
po/no.po

File diff suppressed because it is too large Load Diff

618
po/pl.po

File diff suppressed because it is too large Load Diff

598
po/pt.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

600
po/ro.po

File diff suppressed because it is too large Load Diff

602
po/ru.po

File diff suppressed because it is too large Load Diff

598
po/sk.po

File diff suppressed because it is too large Load Diff

606
po/sv.po

File diff suppressed because it is too large Load Diff

611
po/tr.po

File diff suppressed because it is too large Load Diff

600
po/uk.po

File diff suppressed because it is too large Load Diff

598
po/vi.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -5,4 +5,4 @@ Edge flipping: http://bugzilla.gnome.org/show_bug.cgi?id=82917
Opaque resize: http://bugzilla.gnome.org/show_bug.cgi?id=92618
Super+click to resize: http://bugzilla.gnome.org/show_bug.cgi?id=79315
minimized windows in Alt+tab: http://bugzilla.gnome.org/show_bug.cgi?id=89416
raise windows on click: http://bugzilla.gnome.org/show_bug.cgi?id=86108

View File

@@ -9,3 +9,5 @@ testgradient
inlinepixbufs.h
metacity.desktop
metacity.schemas
libmetacity-private.pc
testasyncgetprop

View File

@@ -1,3 +1,4 @@
lib_LTLIBRARIES = libmetacity-private.la
SUBDIRS=wm-tester tools themes
@@ -34,6 +35,9 @@ metacity_SOURCES= \
gradient.h \
group.c \
group.h \
group-private.h \
group-props.c \
group-props.h \
iconcache.c \
iconcache.h \
inlinepixbufs.h \
@@ -72,13 +76,15 @@ metacity_SOURCES= \
util.h \
window.c \
window.h \
window-props.c \
window-props.h \
workspace.c \
workspace.h \
xprops.c \
xprops.h \
$(EGGFILES)
metacity_theme_viewer_SOURCES= \
libmetacity_private_la_SOURCES= \
gradient.c \
gradient.h \
preview-widget.c \
@@ -87,9 +93,22 @@ metacity_theme_viewer_SOURCES= \
theme.h \
theme-parser.c \
theme-parser.h \
theme-viewer.c \
util.c \
util.h
util.h \
common.h
libmetacityincludedir = $(includedir)/metacity-1/metacity-private
libmetacityinclude_HEADERS = \
common.h \
gradient.h \
preview-widget.h \
theme.h \
theme-parser.h \
util.h
metacity_theme_viewer_SOURCES= \
theme-viewer.c
metacity_dialog_SOURCES= \
metacity-dialog.c
@@ -97,8 +116,9 @@ metacity_dialog_SOURCES= \
bin_PROGRAMS=metacity metacity-theme-viewer
libexec_PROGRAMS=metacity-dialog
metacity_LDADD= @METACITY_LIBS@
metacity_theme_viewer_LDADD= @METACITY_LIBS@
EFENCE=
metacity_LDADD=@METACITY_LIBS@ $(EFENCE)
metacity_theme_viewer_LDADD= @METACITY_LIBS@ libmetacity-private.la
metacity_dialog_LDADD=@METACITY_LIBS@
testgradient_SOURCES=gradient.h gradient.c testgradient.c
@@ -135,7 +155,17 @@ CLEANFILES = inlinepixbufs.h
inlinepixbufs.h: $(IMAGES)
$(GDK_PIXBUF_CSOURCE) --raw --build-list $(VARIABLES) >$(srcdir)/inlinepixbufs.h
EXTRA_DIST=$(desktopfiles_DATA) $(IMAGES) $(schema_DATA) update-from-egg.sh $(desktopfiles_in_files) $(schema_in_files)
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libmetacity-private.pc
EXTRA_DIST=$(desktopfiles_DATA) \
$(IMAGES) $(schema_DATA) \
update-from-egg.sh \
$(desktopfiles_in_files) \
$(schema_in_files) \
libmetacity-private.pc.in
EGGDIR=$(srcdir)/../../libegg/libegg

View File

@@ -641,7 +641,7 @@ meta_core_get_menu_accelerator (MetaMenuOp menu_op,
}
}
char *
const char*
meta_core_get_workspace_name_with_index (Display *xdisplay,
Window xroot,
int index)
@@ -654,7 +654,7 @@ meta_core_get_workspace_name_with_index (Display *xdisplay,
screen = meta_display_screen_for_root (display, xroot);
g_assert (screen != NULL);
workspace = meta_screen_get_workspace_by_index (screen, index);
return (workspace != NULL) ? workspace->name : NULL;
return workspace ? meta_workspace_get_name (workspace) : NULL;
}
gboolean

View File

@@ -102,9 +102,9 @@ int meta_core_get_num_workspaces (Screen *xscreen);
int meta_core_get_active_workspace (Screen *xscreen);
int meta_core_get_frame_workspace (Display *xdisplay,
Window frame_xwindow);
char* meta_core_get_workspace_name_with_index (Display *xdisplay,
Window xroot,
int index);
const char* meta_core_get_workspace_name_with_index (Display *xdisplay,
Window xroot,
int index);
void meta_core_get_frame_extents (Display *xdisplay,
Window frame_xwindow,

View File

@@ -38,11 +38,9 @@ delete_ping_reply_func (MetaDisplay *display,
Window xwindow,
void *user_data)
{
MetaWindow *window = user_data;
meta_topic (META_DEBUG_PING,
"Got reply to delete ping for %s\n",
window->desc);
((MetaWindow*)user_data)->desc);
/* we do nothing */
}

View File

@@ -25,6 +25,8 @@
#include "main.h"
#include "screen.h"
#include "window.h"
#include "window-props.h"
#include "group-props.h"
#include "frame.h"
#include "errors.h"
#include "keybindings.h"
@@ -224,7 +226,7 @@ meta_display_open (const char *name)
"_METACITY_SET_KEYBINDINGS_MESSAGE",
"_NET_WM_STATE_HIDDEN",
"_NET_WM_WINDOW_TYPE_UTILITY",
"_NET_WM_WINDOW_TYPE_SPLASHSCREEN",
"_NET_WM_WINDOW_TYPE_SPLASH",
"_NET_WM_STATE_FULLSCREEN",
"_NET_WM_PING",
"_NET_WM_PID",
@@ -249,7 +251,9 @@ meta_display_open (const char *name)
"_NET_WM_ACTION_CHANGE_DESKTOP",
"_NET_WM_ACTION_CLOSE",
"_NET_WM_STATE_ABOVE",
"_NET_WM_STATE_BELOW"
"_NET_WM_STATE_BELOW",
"_NET_STARTUP_ID",
"_METACITY_TOGGLE_VERBOSE"
};
Atom atoms[G_N_ELEMENTS(atom_names)];
@@ -357,7 +361,7 @@ meta_display_open (const char *name)
display->atom_metacity_set_keybindings_message = atoms[48];
display->atom_net_wm_state_hidden = atoms[49];
display->atom_net_wm_window_type_utility = atoms[50];
display->atom_net_wm_window_type_splashscreen = atoms[51];
display->atom_net_wm_window_type_splash = atoms[51];
display->atom_net_wm_state_fullscreen = atoms[52];
display->atom_net_wm_ping = atoms[53];
display->atom_net_wm_pid = atoms[54];
@@ -383,6 +387,13 @@ meta_display_open (const char *name)
display->atom_net_wm_action_close = atoms[74];
display->atom_net_wm_state_above = atoms[75];
display->atom_net_wm_state_below = atoms[76];
display->atom_net_startup_id = atoms[77];
display->atom_metacity_toggle_verbose = atoms[78];
display->prop_hooks = NULL;
meta_display_init_window_prop_hooks (display);
display->group_prop_hooks = NULL;
meta_display_init_group_prop_hooks (display);
/* Offscreen unmapped window used for _NET_SUPPORTING_WM_CHECK,
* created in screen_new
@@ -524,7 +535,7 @@ meta_display_open (const char *name)
meta_error_trap_push (display);
focus = None;
ret_to = RevertToNone;
ret_to = RevertToPointerRoot;
XGetInputFocus (display->xdisplay, &focus, &ret_to);
/* Force a new FocusIn (does this work?) */
@@ -663,6 +674,9 @@ meta_display_close (MetaDisplay *display)
XDestroyWindow (display->xdisplay, display->leader_window);
XFlush (display->xdisplay);
meta_display_free_window_prop_hooks (display);
meta_display_free_group_prop_hooks (display);
#ifndef USE_GDK_DISPLAY
meta_event_queue_free (display->events);
@@ -751,10 +765,8 @@ meta_display_grab (MetaDisplay *display)
{
if (display->server_grab_count == 0)
{
XSync (display->xdisplay, False);
XGrabServer (display->xdisplay);
}
XSync (display->xdisplay, False);
display->server_grab_count += 1;
meta_verbose ("Grabbing display, grab count now %d\n",
display->server_grab_count);
@@ -772,10 +784,9 @@ meta_display_ungrab (MetaDisplay *display)
/* FIXME we want to purge all pending "queued" stuff
* at this point, such as window hide/show
*/
XSync (display->xdisplay, False);
XUngrabServer (display->xdisplay);
XFlush (display->xdisplay);
}
XSync (display->xdisplay, False);
meta_verbose ("Ungrabbing display, grab count now %d\n",
display->server_grab_count);
@@ -1449,6 +1460,10 @@ event_callback (XEvent *event,
{
if (window->minimized)
meta_window_unminimize (window);
if (!meta_workspace_contains_window (window->screen->active_workspace,
window))
meta_window_change_workspace (window,
window->screen->active_workspace);
}
break;
case ReparentNotify:
@@ -1522,25 +1537,34 @@ event_callback (XEvent *event,
case CirculateRequest:
break;
case PropertyNotify:
if (window && !frame_was_receiver)
meta_window_property_notify (window, event);
else
{
MetaScreen *screen;
{
MetaGroup *group;
MetaScreen *screen;
if (window && !frame_was_receiver)
meta_window_property_notify (window, event);
group = meta_display_lookup_group (display,
event->xproperty.window);
if (group != NULL)
meta_group_property_notify (group, event);
screen = NULL;
if (window == NULL &&
group == NULL) /* window/group != NULL means it wasn't a root window */
screen = meta_display_screen_for_root (display,
event->xproperty.window);
if (screen)
{
if (event->xproperty.atom ==
display->atom_net_desktop_layout)
meta_screen_update_workspace_layout (screen);
else if (event->xproperty.atom ==
display->atom_net_desktop_names)
meta_screen_update_workspace_names (screen);
}
}
if (screen != NULL)
{
if (event->xproperty.atom ==
display->atom_net_desktop_layout)
meta_screen_update_workspace_layout (screen);
else if (event->xproperty.atom ==
display->atom_net_desktop_names)
meta_screen_update_workspace_names (screen);
}
}
break;
case SelectionClear:
/* do this here instead of at end of function
@@ -1643,6 +1667,12 @@ event_callback (XEvent *event,
(int) event->xclient.data.l[0]);
meta_set_keybindings_disabled (!event->xclient.data.l[0]);
}
else if (event->xclient.message_type ==
display->atom_metacity_toggle_verbose)
{
meta_verbose ("Received toggle verbose message\n");
meta_set_verbose (!meta_is_verbose ());
}
else if (event->xclient.message_type ==
display->atom_wm_protocols)
{
@@ -1663,10 +1693,34 @@ event_callback (XEvent *event,
}
break;
case MappingNotify:
/* Let XLib know that there is a new keyboard mapping.
*/
XRefreshKeyboardMapping (&event->xmapping);
meta_display_process_mapping_event (display, event);
{
gboolean ignore_current;
ignore_current = FALSE;
/* Check whether the next event is an identical MappingNotify
* event. If it is, ignore the current event, we'll update
* when we get the next one.
*/
if (XPending (display->xdisplay))
{
XEvent next_event;
XPeekEvent (display->xdisplay, &next_event);
if (next_event.type == MappingNotify &&
next_event.xmapping.request == event->xmapping.request)
ignore_current = TRUE;
}
if (!ignore_current)
{
/* Let XLib know that there is a new keyboard mapping.
*/
XRefreshKeyboardMapping (&event->xmapping);
meta_display_process_mapping_event (display, event);
}
}
break;
default:
break;
@@ -3308,6 +3362,7 @@ convert_property (MetaDisplay *display,
* can send SelectionNotify
*/
/* FIXME the error trap pop synced anyway, right? */
meta_topic (META_DEBUG_SYNC, "Syncing on %s\n", G_GNUC_FUNCTION);
XSync (display->xdisplay, False);
return TRUE;

View File

@@ -57,6 +57,9 @@ typedef struct _MetaUISlave MetaUISlave;
typedef struct _MetaWindow MetaWindow;
typedef struct _MetaWorkspace MetaWorkspace;
typedef struct _MetaWindowPropHooks MetaWindowPropHooks;
typedef struct _MetaGroupPropHooks MetaGroupPropHooks;
typedef void (* MetaWindowPingFunc) (MetaDisplay *display,
Window xwindow,
gpointer user_data);
@@ -131,7 +134,7 @@ struct _MetaDisplay
Atom atom_metacity_set_keybindings_message;
Atom atom_net_wm_state_hidden;
Atom atom_net_wm_window_type_utility;
Atom atom_net_wm_window_type_splashscreen;
Atom atom_net_wm_window_type_splash;
Atom atom_net_wm_ping;
Atom atom_net_wm_pid;
Atom atom_wm_client_machine;
@@ -157,6 +160,8 @@ struct _MetaDisplay
Atom atom_net_wm_action_close;
Atom atom_net_wm_state_above;
Atom atom_net_wm_state_below;
Atom atom_net_startup_id;
Atom atom_metacity_toggle_verbose;
/* This is the actual window from focus events,
* not the one we last set
@@ -262,6 +267,12 @@ struct _MetaDisplay
/* currently-active window menu if any */
MetaWindowMenu *window_menu;
MetaWindow *window_with_menu;
/* Managed by window-props.c */
MetaWindowPropHooks *prop_hooks;
/* Managed by group-props.c */
MetaGroupPropHooks *group_prop_hooks;
#ifdef HAVE_STARTUP_NOTIFICATION
/* This is at the end in case someone doesn't include config.h before this file
@@ -269,7 +280,6 @@ struct _MetaDisplay
*/
SnDisplay *sn_display;
#endif
};
gboolean meta_display_open (const char *name);

View File

@@ -26,8 +26,6 @@
#include <stdlib.h>
#include <gdk/gdk.h>
static int sync_count = 0;
static int x_error_handler (Display *display,
XErrorEvent *error);
static int x_io_error_handler (Display *display);
@@ -50,7 +48,6 @@ meta_error_trap_push_internal (MetaDisplay *display,
if (need_sync)
{
XSync (display->xdisplay, False);
++sync_count;
}
gdk_error_trap_push ();
@@ -84,7 +81,6 @@ meta_error_trap_pop_internal (MetaDisplay *display,
if (need_sync)
{
XSync (display->xdisplay, False);
++sync_count;
}
result = gdk_error_trap_pop ();
@@ -128,8 +124,8 @@ meta_error_trap_pop (MetaDisplay *display,
need_sync = (display->error_traps == 1 && !last_request_was_roundtrip);
if (need_sync)
meta_topic (META_DEBUG_SYNC, "%d: Syncing on error_trap_pop, traps = %d, roundtrip = %d\n",
sync_count, display->error_traps, last_request_was_roundtrip);
meta_topic (META_DEBUG_SYNC, "Syncing on error_trap_pop, traps = %d, roundtrip = %d\n",
display->error_traps, last_request_was_roundtrip);
display->error_trap_synced_at_last_pop = need_sync || last_request_was_roundtrip;
@@ -156,8 +152,8 @@ meta_error_trap_push_with_return (MetaDisplay *display)
need_sync = FALSE;
if (need_sync)
meta_topic (META_DEBUG_SYNC, "%d: Syncing on error_trap_push_with_return, traps = %d\n",
sync_count, display->error_traps);
meta_topic (META_DEBUG_SYNC, "Syncing on error_trap_push_with_return, traps = %d\n",
display->error_traps);
meta_error_trap_push_internal (display, FALSE);
}
@@ -167,8 +163,8 @@ meta_error_trap_pop_with_return (MetaDisplay *display,
gboolean last_request_was_roundtrip)
{
if (!last_request_was_roundtrip)
meta_topic (META_DEBUG_SYNC, "%d: Syncing on error_trap_pop_with_return, traps = %d, roundtrip = %d\n",
sync_count, display->error_traps, last_request_was_roundtrip);
meta_topic (META_DEBUG_SYNC, "Syncing on error_trap_pop_with_return, traps = %d, roundtrip = %d\n",
display->error_traps, last_request_was_roundtrip);
display->error_trap_synced_at_last_pop = TRUE;

View File

@@ -1230,8 +1230,7 @@ meta_frames_button_press_event (GtkWidget *widget,
event->x_root,
event->y_root);
}
else if ((control == META_FRAME_CONTROL_TITLE ||
control == META_FRAME_CONTROL_NONE) &&
else if (control == META_FRAME_CONTROL_TITLE &&
event->button == 1)
{
MetaFrameFlags flags;
@@ -1856,14 +1855,17 @@ get_control (MetaFrames *frames,
MetaFrameFlags flags;
gboolean has_vert, has_horiz;
GdkRectangle client;
int bottom_of_titlebar;
meta_frames_calc_geometry (frames, frame, &fgeom);
client.x = fgeom.left_width;
client.y = fgeom.top_height;
client.width = fgeom.width - fgeom.left_width - fgeom.right_width;
client.height = fgeom.height - fgeom.top_height - fgeom.bottom_height;
client.height = fgeom.height - fgeom.top_height - fgeom.bottom_height;
bottom_of_titlebar = fgeom.title_rect.y + fgeom.title_rect.height;
if (POINT_IN_RECT (x, y, client))
return META_FRAME_CONTROL_CLIENT_AREA;
@@ -1875,16 +1877,19 @@ get_control (MetaFrames *frames,
if (POINT_IN_RECT (x, y, fgeom.menu_rect))
return META_FRAME_CONTROL_MENU;
flags = meta_core_get_frame_flags (gdk_display, frame->xwindow);
has_vert = (flags & META_FRAME_ALLOWS_VERTICAL_RESIZE) != 0;
has_horiz = (flags & META_FRAME_ALLOWS_HORIZONTAL_RESIZE) != 0;
if (POINT_IN_RECT (x, y, fgeom.title_rect))
{
if (y <= TOP_RESIZE_HEIGHT)
if (has_vert && y <= TOP_RESIZE_HEIGHT)
return META_FRAME_CONTROL_RESIZE_N;
else
return META_FRAME_CONTROL_TITLE;
}
flags = meta_core_get_frame_flags (gdk_display, frame->xwindow);
if (POINT_IN_RECT (x, y, fgeom.max_rect))
{
@@ -1893,83 +1898,78 @@ get_control (MetaFrames *frames,
else
return META_FRAME_CONTROL_MAXIMIZE;
}
has_vert = (flags & META_FRAME_ALLOWS_VERTICAL_RESIZE) != 0;
has_horiz = (flags & META_FRAME_ALLOWS_HORIZONTAL_RESIZE) != 0;
if (has_vert || has_horiz)
{
int bottom_of_titlebar;
bottom_of_titlebar = fgeom.title_rect.y + fgeom.title_rect.height;
/* South resize always has priority over north resize,
* in case of overlap.
*/
/* South resize always has priority over north resize,
* in case of overlap.
*/
if (y >= (fgeom.height - fgeom.bottom_height - RESIZE_EXTENDS) &&
x >= (fgeom.width - fgeom.right_width - RESIZE_EXTENDS))
{
if (has_vert && has_horiz)
return META_FRAME_CONTROL_RESIZE_SE;
else if (has_vert)
return META_FRAME_CONTROL_RESIZE_S;
else
return META_FRAME_CONTROL_RESIZE_E;
}
else if (y >= (fgeom.height - fgeom.bottom_height - RESIZE_EXTENDS) &&
x <= (fgeom.left_width + RESIZE_EXTENDS))
{
if (has_vert && has_horiz)
return META_FRAME_CONTROL_RESIZE_SW;
else if (has_vert)
return META_FRAME_CONTROL_RESIZE_S;
else
return META_FRAME_CONTROL_RESIZE_W;
}
else if (y < (fgeom.top_height + RESIZE_EXTENDS) &&
x < RESIZE_EXTENDS)
{
if (has_vert && has_horiz)
return META_FRAME_CONTROL_RESIZE_NW;
else if (has_vert)
return META_FRAME_CONTROL_RESIZE_N;
else
return META_FRAME_CONTROL_RESIZE_W;
}
else if (y < (fgeom.top_height + RESIZE_EXTENDS) &&
x >= (fgeom.width - RESIZE_EXTENDS))
{
if (has_vert && has_horiz)
return META_FRAME_CONTROL_RESIZE_NE;
else if (has_vert)
return META_FRAME_CONTROL_RESIZE_N;
else
return META_FRAME_CONTROL_RESIZE_E;
}
else if (y >= (fgeom.height - fgeom.bottom_height - RESIZE_EXTENDS))
{
if (has_vert)
return META_FRAME_CONTROL_RESIZE_S;
}
else if (y <= TOP_RESIZE_HEIGHT)
{
if (has_vert)
return META_FRAME_CONTROL_RESIZE_N;
}
else if (x <= fgeom.left_width)
{
if (has_horiz)
return META_FRAME_CONTROL_RESIZE_W;
}
else if (x >= (fgeom.width - fgeom.right_width))
{
if (has_horiz)
return META_FRAME_CONTROL_RESIZE_E;
}
if (y >= (fgeom.height - fgeom.bottom_height - RESIZE_EXTENDS) &&
x >= (fgeom.width - fgeom.right_width - RESIZE_EXTENDS))
{
if (has_vert && has_horiz)
return META_FRAME_CONTROL_RESIZE_SE;
else if (has_vert)
return META_FRAME_CONTROL_RESIZE_S;
else if (has_horiz)
return META_FRAME_CONTROL_RESIZE_E;
}
return META_FRAME_CONTROL_NONE;
else if (y >= (fgeom.height - fgeom.bottom_height - RESIZE_EXTENDS) &&
x <= (fgeom.left_width + RESIZE_EXTENDS))
{
if (has_vert && has_horiz)
return META_FRAME_CONTROL_RESIZE_SW;
else if (has_vert)
return META_FRAME_CONTROL_RESIZE_S;
else if (has_horiz)
return META_FRAME_CONTROL_RESIZE_W;
}
else if (y < (fgeom.top_height + RESIZE_EXTENDS) &&
x < RESIZE_EXTENDS)
{
if (has_vert && has_horiz)
return META_FRAME_CONTROL_RESIZE_NW;
else if (has_vert)
return META_FRAME_CONTROL_RESIZE_N;
else if (has_horiz)
return META_FRAME_CONTROL_RESIZE_W;
}
else if (y < (fgeom.top_height + RESIZE_EXTENDS) &&
x >= (fgeom.width - RESIZE_EXTENDS))
{
if (has_vert && has_horiz)
return META_FRAME_CONTROL_RESIZE_NE;
else if (has_vert)
return META_FRAME_CONTROL_RESIZE_N;
else if (has_horiz)
return META_FRAME_CONTROL_RESIZE_E;
}
else if (y >= (fgeom.height - fgeom.bottom_height - RESIZE_EXTENDS))
{
if (has_vert)
return META_FRAME_CONTROL_RESIZE_S;
}
else if (y <= TOP_RESIZE_HEIGHT)
{
if (has_vert)
return META_FRAME_CONTROL_RESIZE_N;
else if (has_horiz)
return META_FRAME_CONTROL_TITLE;
}
else if (x <= fgeom.left_width)
{
if (has_horiz)
return META_FRAME_CONTROL_RESIZE_W;
}
else if (x >= (fgeom.width - fgeom.right_width))
{
if (has_horiz)
return META_FRAME_CONTROL_RESIZE_E;
}
if (y >= bottom_of_titlebar)
return META_FRAME_CONTROL_NONE;
else
return META_FRAME_CONTROL_TITLE;
}
void

41
src/group-private.h Normal file
View File

@@ -0,0 +1,41 @@
/* Metacity window group private header */
/*
* Copyright (C) 2002 Red Hat Inc.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
#ifndef META_GROUP_PRIVATE_H
#define META_GROUP_PRIVATE_H
#include "group.h"
struct _MetaGroup
{
int refcount;
MetaDisplay *display;
GSList *windows;
Window group_leader;
char *startup_id;
char *wm_client_machine;
};
#endif

230
src/group-props.c Normal file
View File

@@ -0,0 +1,230 @@
/* MetaGroup property handling */
/*
* Copyright (C) 2002 Red Hat, Inc.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
#include <config.h>
#include "group-props.h"
#include "group-private.h"
#include "xprops.h"
#include <X11/Xatom.h>
typedef void (* InitValueFunc) (MetaDisplay *display,
Atom property,
MetaPropValue *value);
typedef void (* ReloadValueFunc) (MetaGroup *group,
MetaPropValue *value);
struct _MetaGroupPropHooks
{
Atom property;
InitValueFunc init_func;
ReloadValueFunc reload_func;
};
static void init_prop_value (MetaDisplay *display,
Atom property,
MetaPropValue *value);
static void reload_prop_value (MetaGroup *group,
MetaPropValue *value);
static MetaGroupPropHooks* find_hooks (MetaDisplay *display,
Atom property);
void
meta_group_reload_property (MetaGroup *group,
Atom property)
{
meta_group_reload_properties (group, &property, 1);
}
void
meta_group_reload_properties (MetaGroup *group,
const Atom *properties,
int n_properties)
{
int i;
MetaPropValue *values;
g_return_if_fail (properties != NULL);
g_return_if_fail (n_properties > 0);
values = g_new0 (MetaPropValue, n_properties);
i = 0;
while (i < n_properties)
{
init_prop_value (group->display, properties[i], &values[i]);
++i;
}
meta_prop_get_values (group->display, group->group_leader,
values, n_properties);
i = 0;
while (i < n_properties)
{
reload_prop_value (group, &values[i]);
++i;
}
meta_prop_free_values (values, n_properties);
g_free (values);
}
/* Fill in the MetaPropValue used to get the value of "property" */
static void
init_prop_value (MetaDisplay *display,
Atom property,
MetaPropValue *value)
{
MetaGroupPropHooks *hooks;
value->type = META_PROP_VALUE_INVALID;
value->atom = None;
hooks = find_hooks (display, property);
if (hooks && hooks->init_func != NULL)
(* hooks->init_func) (display, property, value);
}
static void
reload_prop_value (MetaGroup *group,
MetaPropValue *value)
{
MetaGroupPropHooks *hooks;
hooks = find_hooks (group->display, value->atom);
if (hooks && hooks->reload_func != NULL)
(* hooks->reload_func) (group, value);
}
static void
init_wm_client_machine (MetaDisplay *display,
Atom property,
MetaPropValue *value)
{
value->type = META_PROP_VALUE_STRING;
value->atom = display->atom_wm_client_machine;
}
static void
reload_wm_client_machine (MetaGroup *group,
MetaPropValue *value)
{
g_free (group->wm_client_machine);
group->wm_client_machine = NULL;
if (value->type != META_PROP_VALUE_INVALID)
group->wm_client_machine = g_strdup (value->v.str);
meta_verbose ("Group has client machine \"%s\"\n",
group->wm_client_machine ? group->wm_client_machine : "unset");
}
static void
init_net_startup_id (MetaDisplay *display,
Atom property,
MetaPropValue *value)
{
value->type = META_PROP_VALUE_UTF8;
value->atom = display->atom_net_startup_id;
}
static void
reload_net_startup_id (MetaGroup *group,
MetaPropValue *value)
{
g_free (group->startup_id);
group->startup_id = NULL;
if (value->type != META_PROP_VALUE_INVALID)
group->startup_id = g_strdup (value->v.str);
meta_verbose ("Group has startup id \"%s\"\n",
group->startup_id ? group->startup_id : "unset");
}
#define N_HOOKS 3
void
meta_display_init_group_prop_hooks (MetaDisplay *display)
{
int i;
MetaGroupPropHooks *hooks;
g_assert (display->group_prop_hooks == NULL);
display->group_prop_hooks = g_new0 (MetaGroupPropHooks, N_HOOKS);
hooks = display->group_prop_hooks;
i = 0;
hooks[i].property = display->atom_wm_client_machine;
hooks[i].init_func = init_wm_client_machine;
hooks[i].reload_func = reload_wm_client_machine;
++i;
hooks[i].property = display->atom_net_wm_pid;
hooks[i].init_func = NULL;
hooks[i].reload_func = NULL;
++i;
hooks[i].property = display->atom_net_startup_id;
hooks[i].init_func = init_net_startup_id;
hooks[i].reload_func = reload_net_startup_id;
++i;
if (i != N_HOOKS)
g_error ("Initialized %d group hooks should have been %d\n", i, N_HOOKS);
}
void
meta_display_free_group_prop_hooks (MetaDisplay *display)
{
g_assert (display->group_prop_hooks != NULL);
g_free (display->group_prop_hooks);
display->group_prop_hooks = NULL;
}
static MetaGroupPropHooks*
find_hooks (MetaDisplay *display,
Atom property)
{
int i;
/* FIXME we could sort the array and do binary search or
* something
*/
i = 0;
while (i < N_HOOKS)
{
if (display->group_prop_hooks[i].property == property)
return &display->group_prop_hooks[i];
++i;
}
return NULL;
}

35
src/group-props.h Normal file
View File

@@ -0,0 +1,35 @@
/* MetaGroup property handling */
/*
* Copyright (C) 2002 Red Hat, Inc.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
#ifndef META_GROUP_PROPS_H
#define META_GROUP_PROPS_H
#include "group.h"
void meta_group_reload_property (MetaGroup *group,
Atom property);
void meta_group_reload_properties (MetaGroup *group,
const Atom *properties,
int n_properties);
void meta_display_init_group_prop_hooks (MetaDisplay *display);
void meta_display_free_group_prop_hooks (MetaDisplay *display);
#endif /* META_GROUP_PROPS_H */

View File

@@ -21,23 +21,21 @@
#include <config.h>
#include "util.h"
#include "group.h"
#include "group-private.h"
#include "group-props.h"
#include "window.h"
struct _MetaGroup
{
MetaDisplay *display;
GSList *windows;
Window group_leader;
int refcount;
};
static MetaGroup*
meta_group_new (MetaDisplay *display,
Window group_leader)
{
MetaGroup *group;
#define N_INITIAL_PROPS 3
Atom initial_props[N_INITIAL_PROPS];
int i;
g_assert (N_INITIAL_PROPS == (int) G_N_ELEMENTS (initial_props));
group = g_new0 (MetaGroup, 1);
group->display = display;
@@ -54,6 +52,19 @@ meta_group_new (MetaDisplay *display,
g_hash_table_insert (display->groups_by_leader,
&group->group_leader,
group);
/* Fill these in the order we want them to be gotten */
i = 0;
initial_props[i++] = display->atom_wm_client_machine;
initial_props[i++] = display->atom_net_wm_pid;
initial_props[i++] = display->atom_net_startup_id;
g_assert (N_INITIAL_PROPS == i);
meta_group_reload_properties (group, initial_props, N_INITIAL_PROPS);
meta_topic (META_DEBUG_GROUPS,
"Created new group with leader 0x%lx\n",
group->group_leader);
return group;
}
@@ -66,6 +77,10 @@ meta_group_unref (MetaGroup *group)
group->refcount -= 1;
if (group->refcount == 0)
{
meta_topic (META_DEBUG_GROUPS,
"Destroying group with leader 0x%lx\n",
group->group_leader);
g_assert (group->display->groups_by_leader != NULL);
g_hash_table_remove (group->display->groups_by_leader,
@@ -78,6 +93,9 @@ meta_group_unref (MetaGroup *group)
group->display->groups_by_leader = NULL;
}
g_free (group->wm_client_machine);
g_free (group->startup_id);
g_free (group);
}
}
@@ -88,16 +106,23 @@ meta_window_get_group (MetaWindow *window)
if (window->unmanaging)
return NULL;
if (window->cached_group == NULL &&
window->xgroup_leader != None) /* some windows have no group */
if (window->cached_group == NULL)
{
MetaGroup *group;
/* use window->xwindow if no window->xgroup_leader */
group = NULL;
if (window->display->groups_by_leader)
group = g_hash_table_lookup (window->display->groups_by_leader,
&window->xgroup_leader);
{
if (window->xgroup_leader != None)
group = g_hash_table_lookup (window->display->groups_by_leader,
&window->xgroup_leader);
else
group = g_hash_table_lookup (window->display->groups_by_leader,
&window->xwindow);
}
if (group != NULL)
{
@@ -106,24 +131,36 @@ meta_window_get_group (MetaWindow *window)
}
else
{
group = meta_group_new (window->display,
window->xgroup_leader);
if (window->xgroup_leader != None)
group = meta_group_new (window->display,
window->xgroup_leader);
else
group = meta_group_new (window->display,
window->xwindow);
window->cached_group = group;
}
window->cached_group->windows = g_slist_prepend (window->cached_group->windows,
window);
meta_topic (META_DEBUG_GROUPS,
"Adding %s to group with leader 0x%lx\n",
window->desc, group->group_leader);
}
return window->cached_group;
}
void
meta_window_shutdown_group (MetaWindow *window)
static void
remove_window_from_group (MetaWindow *window)
{
if (window->cached_group != NULL)
{
meta_topic (META_DEBUG_GROUPS,
"Removing %s from group with leader 0x%lx\n",
window->desc, window->cached_group->group_leader);
window->cached_group->windows =
g_slist_remove (window->cached_group->windows,
window);
@@ -132,6 +169,19 @@ meta_window_shutdown_group (MetaWindow *window)
}
}
void
meta_window_group_leader_changed (MetaWindow *window)
{
remove_window_from_group (window);
meta_window_get_group (window);
}
void
meta_window_shutdown_group (MetaWindow *window)
{
remove_window_from_group (window);
}
MetaGroup*
meta_display_lookup_group (MetaDisplay *display,
Window group_leader)
@@ -190,3 +240,19 @@ meta_group_update_layers (MetaGroup *group)
g_slist_free (frozen_stacks);
}
const char*
meta_group_get_startup_id (MetaGroup *group)
{
return group->startup_id;
}
gboolean
meta_group_property_notify (MetaGroup *group,
XEvent *event)
{
meta_group_reload_property (group,
event->xproperty.atom);
return TRUE;
}

View File

@@ -28,6 +28,8 @@
MetaGroup* meta_window_get_group (MetaWindow *window);
void meta_window_shutdown_group (MetaWindow *window);
void meta_window_group_leader_changed (MetaWindow *window);
/* note, can return NULL */
MetaGroup* meta_display_lookup_group (MetaDisplay *display,
Window group_leader);
@@ -36,6 +38,11 @@ GSList* meta_group_list_windows (MetaGroup *group);
void meta_group_update_layers (MetaGroup *group);
const char* meta_group_get_startup_id (MetaGroup *group);
gboolean meta_group_property_notify (MetaGroup *group,
XEvent *event);
#endif

View File

@@ -154,6 +154,16 @@ static void handle_run_command (MetaDisplay *display,
MetaWindow *window,
XEvent *event,
MetaKeyBinding *binding);
static void handle_maximize_vert (MetaDisplay *display,
MetaScreen *screen,
MetaWindow *window,
XEvent *event,
MetaKeyBinding *binding);
static void handle_maximize_horiz (MetaDisplay *display,
MetaScreen *screen,
MetaWindow *window,
XEvent *event,
MetaKeyBinding *binding);
/* debug */
static void handle_spew_mark (MetaDisplay *display,
@@ -329,6 +339,8 @@ static const MetaKeyHandler window_handlers[] = {
{ META_KEYBINDING_RAISE_OR_LOWER, handle_raise_or_lower, NULL},
{ META_KEYBINDING_RAISE, handle_raise, NULL},
{ META_KEYBINDING_LOWER, handle_lower, NULL},
{ META_KEYBINDING_MAXIMIZE_VERTICALLY, handle_maximize_vert, NULL },
{ META_KEYBINDING_MAXIMIZE_HORIZONTALLY, handle_maximize_horiz, NULL },
{ NULL, NULL, NULL }
};
@@ -604,6 +616,8 @@ regrab_screen_bindings (MetaDisplay *display)
{
GSList *tmp;
meta_error_trap_push (display); /* for efficiency push outer trap */
tmp = display->screens;
while (tmp != NULL)
{
@@ -614,6 +628,8 @@ regrab_screen_bindings (MetaDisplay *display)
tmp = tmp->next;
}
meta_error_trap_pop (display, FALSE);
}
static void
@@ -624,6 +640,7 @@ regrab_window_bindings (MetaDisplay *display)
windows = meta_display_list_windows (display);
meta_error_trap_push (display); /* for efficiency push outer trap */
tmp = windows;
while (tmp != NULL)
{
@@ -634,6 +651,7 @@ regrab_window_bindings (MetaDisplay *display)
tmp = tmp->next;
}
meta_error_trap_pop (display, FALSE);
g_slist_free (windows);
}
@@ -882,6 +900,8 @@ grab_keys (MetaKeyBinding *bindings,
int i;
g_assert (n_bindings == 0 || bindings != NULL);
meta_error_trap_push (display);
i = 0;
while (i < n_bindings)
@@ -896,24 +916,34 @@ grab_keys (MetaKeyBinding *bindings,
++i;
}
meta_error_trap_pop (display, FALSE);
}
static void
ungrab_all_keys (MetaDisplay *display,
Window xwindow)
{
int result;
meta_error_trap_push_with_return (display);
if (meta_is_debugging ())
meta_error_trap_push_with_return (display);
else
meta_error_trap_push (display);
XUngrabKey (display->xdisplay, AnyKey, AnyModifier,
xwindow);
if (meta_is_debugging ())
{
int result;
result = meta_error_trap_pop_with_return (display, FALSE);
if (result != Success)
meta_topic (META_DEBUG_KEYBINDINGS,
"Ungrabbing all keys on 0x%lx failed\n", xwindow);
result = meta_error_trap_pop_with_return (display, FALSE);
if (result != Success)
meta_topic (META_DEBUG_KEYBINDINGS,
"Ungrabbing all keys on 0x%lx failed\n", xwindow);
}
else
meta_error_trap_pop (display, FALSE);
}
void
@@ -2221,6 +2251,35 @@ handle_run_command (MetaDisplay *display,
}
}
static void
handle_maximize_vert (MetaDisplay *display,
MetaScreen *screen,
MetaWindow *window,
XEvent *event,
MetaKeyBinding *binding)
{
if (window)
{
if (window->has_resize_func)
meta_window_fill_vertical (window);
}
}
static void
handle_maximize_horiz (MetaDisplay *display,
MetaScreen *screen,
MetaWindow *window,
XEvent *event,
MetaKeyBinding *binding)
{
if (window)
{
if (window->has_resize_func)
meta_window_fill_horizontal (window);
}
}
static gboolean
process_workspace_switch_grab (MetaDisplay *display,
MetaScreen *screen,

View File

@@ -0,0 +1,12 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
libgnome_serverdir=@libexecdir@
Name: libmetacity-private
Description: Metacity internals shared
Requires: gtk+-2.0
Version: @VERSION@
Libs: -L${libdir} -lmetacity-private
Cflags: -I${includedir}/metacity-1

View File

@@ -131,31 +131,36 @@ activate_cb (GtkWidget *menuitem, gpointer data)
* The calling code owns the string, and is reponsible to free the
* memory after use.
*/
static char *
static char*
get_workspace_name_with_accel (Display *display,
Window xroot,
int index)
{
char *name;
unsigned int number;
const char *name;
int number;
name = meta_core_get_workspace_name_with_index (display, xroot, index);
g_assert (name != NULL);
/*
* If the name is of the form "Workspace x" where x is an unsigned
* integer, insert a '_' before the number if it is less than 10 and
* return it
*/
if (sscanf (name, _("Workspace %u"), &number) == 1)
number = 0;
if (sscanf (name, _("Workspace %d"), &number) == 1)
{
char *new_name;
/*
* Above name is a pointer into the Workspace struct. Here we make
* a copy copy so we can have our wicked way with it.
*/
name = g_strdup_printf (_("Workspace %s%d"),
number < 10 ? "_" : "",
number);
return name;
new_name = g_strdup_printf (_("Workspace %s%d"),
number < 10 ? "_" : "",
number);
return new_name;
}
else
{
@@ -164,27 +169,29 @@ get_workspace_name_with_accel (Display *display,
* add accelerators. Escape any _ characters so that the user's
* workspace names do not get mangled.
*/
char *new_name, *source, *dest;
source = name;
char *new_name;
const char *source;
char *dest;
/*
* Assume the worst case, that every character is a _
*/
dest = new_name = g_malloc0 (strlen (name) * 2);
new_name = g_malloc0 (strlen (name) * 2 + 1);
/*
* Now iterate down the strings, adding '_' to escape as we go
*/
dest = new_name;
source = name;
while (*source != '\0')
{
if (*source == '_')
*dest++ = '_';
*dest++ = *source++;
}
/*
* We don't free *name as we don't own it, and pass ownership of
* *new_name to the calling code.
*/
return new_name;
}
}
}
static GtkWidget*

View File

@@ -71,8 +71,8 @@
<short>Action on title bar double-click</short>
<long>
This option determines the effects of double-clicking on the
title bar. Current valid options are 'toggle_shade', which will
shade/unshade the window, and 'toggle_maximize' which will
title bar. Current valid options are 'toggle_shaded', which will
shade/unshade the window, and 'toggle_maximized' which will
maximize/unmaximize the window.
</long>
</locale>
@@ -177,6 +177,35 @@
</locale>
</schema>
<schema>
<key>/schemas/apps/metacity/workspace_names/name</key>
<applyto>/apps/metacity/workspace_names/name_1</applyto>
<applyto>/apps/metacity/workspace_names/name_2</applyto>
<applyto>/apps/metacity/workspace_names/name_3</applyto>
<applyto>/apps/metacity/workspace_names/name_4</applyto>
<applyto>/apps/metacity/workspace_names/name_5</applyto>
<applyto>/apps/metacity/workspace_names/name_6</applyto>
<applyto>/apps/metacity/workspace_names/name_7</applyto>
<applyto>/apps/metacity/workspace_names/name_8</applyto>
<applyto>/apps/metacity/workspace_names/name_9</applyto>
<applyto>/apps/metacity/workspace_names/name_10</applyto>
<applyto>/apps/metacity/workspace_names/name_11</applyto>
<applyto>/apps/metacity/workspace_names/name_12</applyto>
<applyto>/apps/metacity/workspace_names/name_13</applyto>
<applyto>/apps/metacity/workspace_names/name_14</applyto>
<applyto>/apps/metacity/workspace_names/name_15</applyto>
<applyto>/apps/metacity/workspace_names/name_16</applyto>
<owner>metacity</owner>
<type>string</type>
<default></default>
<locale name="C">
<short>Name of workspace</short>
<long>
The name of a workspace.
</long>
</locale>
</schema>
<!-- Window Keybindings -->
<schema>
@@ -397,7 +426,7 @@ you set
<type>string</type>
<default>disabled</default>
<locale name="C">
<short>Toggle whether the window is on all workspaces</short>
<short>Toggle window on all workspaces</short>
<long>
The keybinding used to toggle whether the window is on all
workspaces or just one.
@@ -794,7 +823,7 @@ you set
<type>string</type>
<!-- no default for this one -->
<locale name="C">
<short>Raise window if obscured, lowers it otherwise</short>
<short>Raise obscured window, otherwise lower</short>
<long>
This keybinding changes whether a window is above or below
other windows. If the window is covered by another window, it raises
@@ -859,6 +888,51 @@ you set
</locale>
</schema>
<schema>
<key>/schemas/apps/metacity/window_keybindings/maximize_vertically</key>
<applyto>/apps/metacity/window_keybindings/maximize_vertically</applyto>
<owner>metacity</owner>
<type>string</type>
<!-- no default for this one -->
<locale name="C">
<short>Maximize window vertically</short>
<long>
This keybinding resizes a window to fill available vertical space.
The format looks like "&lt;Control&gt;a" or
"&lt;Shift&gt;&lt;Alt&gt;F1.
The parser is fairly liberal and allows lower or upper case,
and also abbreviations such as "&lt;Ctl&gt;" and
"&lt;Ctrl&gt;". If you set the option to the special string
"disabled", then there will be no keybinding for this
action.
</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/metacity/window_keybindings/maximize_horizontally</key>
<applyto>/apps/metacity/window_keybindings/maximize_horizontally</applyto>
<owner>metacity</owner>
<type>string</type>
<!-- no default for this one -->
<locale name="C">
<short>Maximize window horizontally</short>
<long>
This keybinding resizes a window to fill available horizontal space.
The format looks like "&lt;Control&gt;a" or
"&lt;Shift&gt;&lt;Alt&gt;F1.
The parser is fairly liberal and allows lower or upper case,
and also abbreviations such as "&lt;Ctl&gt;" and
"&lt;Ctrl&gt;". If you set the option to the special string
"disabled", then there will be no keybinding for this
action.
</long>
</locale>
</schema>
<!-- Global Keybindings -->
@@ -870,7 +944,7 @@ you set
<type>string</type>
<default>&lt;Alt&gt;Tab</default>
<locale name="C">
<short>Move focus between windows using popup display</short>
<short>Move between windows with popup</short>
<long>
The keybinding used to move focus between windows, using
a popup window.
@@ -921,7 +995,7 @@ you set
<type>string</type>
<default>&lt;Control&gt;&lt;Alt&gt;Tab</default>
<locale name="C">
<short>Move focus between panels and the desktop using popup display</short>
<short>Move between panels and the desktop with popup</short>
<long>
The keybinding used to move focus between panels and
the desktop, using a popup window.
@@ -945,7 +1019,7 @@ you set
<type>string</type>
<default>disabled</default>
<locale name="C">
<short>Move focus backwards between panels and the desktop using popup display</short>
<short>Move backwards between panels and the desktop with popup</short>
<long>
The keybinding used to move focus backwards between panels
and the desktop, using a popup window.
@@ -969,7 +1043,7 @@ you set
<type>string</type>
<default>&lt;Alt&gt;Escape</default>
<locale name="C">
<short>Move focus between windows immediately</short>
<short>Move between windows immediately</short>
<long>
The keybinding used to move focus between windows without
a popup window.
@@ -995,7 +1069,7 @@ you set
<type>string</type>
<default>disabled</default>
<locale name="C">
<short>Move focus backwards between windows immediately</short>
<short>Move backwards between windows immediately</short>
<long>
The keybinding used to move focus backwards between windows
without a popup window. Holding "shift" together with this
@@ -1020,7 +1094,7 @@ you set
<type>string</type>
<default>&lt;Control&gt;&lt;Alt&gt;Escape</default>
<locale name="C">
<short>Move focus between panels and the desktop immediately</short>
<short>Move between panels and the desktop immediately</short>
<long>
The keybinding used to move focus between panels and
the desktop, without a popup window.
@@ -1044,7 +1118,7 @@ you set
<type>string</type>
<default>&lt;Control&gt;&lt;Alt&gt;Escape</default>
<locale name="C">
<short>Move focus backward between panels and the desktop immediately</short>
<short>Move backward between panels and the desktop immediately</short>
<long>
The keybinding used to move focus backwards between panels and
the desktop, without a popup window.
@@ -1432,7 +1506,7 @@ you set
<type>string</type>
<default>&lt;Control&gt;&lt;Alt&gt;Up</default>
<locale name="C">
<short>Switch to workspace above the current space</short>
<short>Switch to workspace above this one</short>
<long>
The keybinding that switches to the workspace above
the current workspace.
@@ -1457,7 +1531,7 @@ you set
<type>string</type>
<default>&lt;Control&gt;&lt;Alt&gt;Down</default>
<locale name="C">
<short>Switch to workspace below the current space</short>
<short>Switch to workspace below this one</short>
<long>
The keybinding that switches to the workspace below
the current workspace.

View File

@@ -23,10 +23,15 @@
#include "prefs.h"
#include "ui.h"
#include "util.h"
#ifdef HAVE_GCONF
#include <gconf/gconf-client.h>
#endif
#include <string.h>
#include <stdlib.h>
#define MAX_REASONABLE_WORKSPACES 32
#define MAX_COMMANDS 32
/* If you add a key, it needs updating in init() and in the gconf
* notify listener and of course in the .schemas file
*/
@@ -47,10 +52,15 @@
#define KEY_SCREEN_BINDINGS_PREFIX "/apps/metacity/global_keybindings"
#define KEY_WINDOW_BINDINGS_PREFIX "/apps/metacity/window_keybindings"
#define KEY_WORKSPACE_NAME_PREFIX "/apps/metacity/workspace_names/name_"
#ifdef HAVE_GCONF
static GConfClient *default_client = NULL;
static GList *listeners = NULL;
static GList *changes = NULL;
static guint changed_idle;
#endif
static GList *listeners = NULL;
static gboolean use_system_font = TRUE;
static PangoFontDescription *titlebar_font = NULL;
static MetaVirtualModifier mouse_button_mods = Mod1Mask;
@@ -77,11 +87,12 @@ static MetaButtonLayout button_layout = {
META_BUTTON_FUNCTION_LAST
}
};
#define NUM_COMMANDS 12
static char *commands[NUM_COMMANDS] = { NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL };
static char *commands[MAX_COMMANDS] = { NULL, };
static char *workspace_names[MAX_REASONABLE_WORKSPACES] = { NULL, };
#ifdef HAVE_GCONF
static gboolean update_use_system_font (gboolean value);
static gboolean update_titlebar_font (const char *value);
static gboolean update_mouse_button_mods (const char *value);
@@ -98,22 +109,28 @@ static gboolean update_window_binding (const char *name,
const char *value);
static gboolean update_screen_binding (const char *name,
const char *value);
static void init_bindings (void);
static gboolean update_binding (MetaKeyPref *binding,
const char *value);
static gboolean update_command (const char *name,
const char *value);
static void init_commands (void);
static gboolean update_workspace_name (const char *name,
const char *value);
static void queue_changed (MetaPreference pref);
static void change_notify (GConfClient *client,
guint cnxn_id,
GConfEntry *entry,
gpointer user_data);
static char* gconf_key_for_workspace_name (int i);
static void queue_changed (MetaPreference pref);
#endif /* HAVE_GCONF */
static void init_bindings (void);
static void init_commands (void);
static void init_workspace_names (void);
typedef struct
{
MetaPrefsChangedFunc func;
@@ -159,14 +176,15 @@ meta_prefs_remove_listener (MetaPrefsChangedFunc func,
meta_bug ("Did not find listener to remove\n");
}
#ifdef HAVE_GCONF
static void
emit_changed (MetaPreference pref)
{
GList *tmp;
GList *copy;
meta_verbose ("Notifying listeners that pref %s changed\n",
meta_preference_to_string (pref));
meta_topic (META_DEBUG_PREFS, "Notifying listeners that pref %s changed\n",
meta_preference_to_string (pref));
copy = g_list_copy (listeners);
@@ -182,7 +200,9 @@ emit_changed (MetaPreference pref)
g_list_free (copy);
}
#endif /* HAVE_GCONF */
#ifdef HAVE_GCONF
static gboolean
changed_idle_handler (gpointer data)
{
@@ -210,25 +230,29 @@ changed_idle_handler (gpointer data)
return FALSE;
}
#endif /* HAVE_GCONF */
#ifdef HAVE_GCONF
static void
queue_changed (MetaPreference pref)
{
meta_verbose ("Queueing change of pref %s\n",
meta_preference_to_string (pref));
meta_topic (META_DEBUG_PREFS, "Queueing change of pref %s\n",
meta_preference_to_string (pref));
if (g_list_find (changes, GINT_TO_POINTER (pref)) == NULL)
changes = g_list_prepend (changes, GINT_TO_POINTER (pref));
else
meta_verbose ("Change of pref %s was already pending\n",
meta_preference_to_string (pref));
meta_topic (META_DEBUG_PREFS, "Change of pref %s was already pending\n",
meta_preference_to_string (pref));
/* add idle at priority below the gconf notify idle */
if (changed_idle == 0)
changed_idle = g_idle_add_full (META_PRIORITY_PREFS_NOTIFY,
changed_idle_handler, NULL, NULL);
}
#endif /* HAVE_GCONF */
#ifdef HAVE_GCONF
static void
cleanup_error (GError **error)
{
@@ -240,10 +264,12 @@ cleanup_error (GError **error)
*error = NULL;
}
}
#endif /* HAVE_GCONF */
void
meta_prefs_init (void)
{
#ifdef HAVE_GCONF
GError *err = NULL;
char *str_val;
int int_val;
@@ -332,21 +358,28 @@ meta_prefs_init (void)
cleanup_error (&err);
update_button_layout (str_val);
g_free (str_val);
#endif /* HAVE_GCONF */
/* Load keybindings prefs */
init_bindings ();
/* commands */
init_commands ();
/* workspace names */
init_workspace_names ();
#ifdef HAVE_GCONF
gconf_client_notify_add (default_client, "/apps/metacity",
change_notify,
NULL,
NULL,
&err);
cleanup_error (&err);
cleanup_error (&err);
#endif /* HAVE_GCONF */
}
#ifdef HAVE_GCONF
/* from eel */
static gboolean
str_has_prefix (const char *haystack, const char *needle)
@@ -609,6 +642,22 @@ change_notify (GConfClient *client,
if (update_command (key, str))
queue_changed (META_PREF_COMMANDS);
}
else if (str_has_prefix (key, KEY_WORKSPACE_NAME_PREFIX))
{
const char *str;
if (value && value->type != GCONF_VALUE_STRING)
{
meta_warning (_("GConf key \"%s\" is set to an invalid type\n"),
key);
goto out;
}
str = value ? gconf_value_get_string (value) : NULL;
if (update_workspace_name (key, str))
queue_changed (META_PREF_WORKSPACE_NAMES);
}
else if (strcmp (key, KEY_BUTTON_LAYOUT) == 0)
{
const char *str;
@@ -627,15 +676,17 @@ change_notify (GConfClient *client,
}
else
{
meta_verbose ("Key %s doesn't mean anything to Metacity\n",
key);
meta_topic (META_DEBUG_PREFS, "Key %s doesn't mean anything to Metacity\n",
key);
}
out:
/* nothing */
return; /* AIX compiler wants something after a label like out: */
}
#endif /* HAVE_GCONF */
#ifdef HAVE_GCONF
static gboolean
update_mouse_button_mods (const char *value)
{
@@ -665,7 +716,9 @@ update_mouse_button_mods (const char *value)
return old_mods != mouse_button_mods;
}
#endif /* HAVE_GCONF */
#ifdef HAVE_GCONF
static gboolean
update_focus_mode (const char *value)
{
@@ -686,7 +739,9 @@ update_focus_mode (const char *value)
return (old_mode != focus_mode);
}
#endif /* HAVE_GCONF */
#ifdef HAVE_GCONF
static gboolean
update_theme (const char *value)
{
@@ -718,7 +773,7 @@ update_theme (const char *value)
return changed;
}
#endif /* HAVE_GCONF */
MetaVirtualModifier
meta_prefs_get_mouse_button_mods (void)
@@ -738,6 +793,7 @@ meta_prefs_get_theme (void)
return current_theme;
}
#ifdef HAVE_GCONF
static gboolean
update_use_system_font (gboolean value)
{
@@ -747,7 +803,9 @@ update_use_system_font (gboolean value)
return old != value;
}
#endif /* HAVE_GCONF */
#ifdef HAVE_GCONF
static gboolean
update_titlebar_font (const char *value)
{
@@ -779,7 +837,9 @@ update_titlebar_font (const char *value)
return TRUE;
}
}
#endif /* HAVE_GCONF */
#ifdef HAVE_GCONF
static gboolean
button_layout_equal (const MetaButtonLayout *a,
const MetaButtonLayout *b)
@@ -867,8 +927,8 @@ update_button_layout (const char *value)
}
else
{
meta_verbose ("Ignoring unknown or already-used button name \"%s\"\n",
buttons[b]);
meta_topic (META_DEBUG_PREFS, "Ignoring unknown or already-used button name \"%s\"\n",
buttons[b]);
}
++b;
@@ -905,8 +965,8 @@ update_button_layout (const char *value)
}
else
{
meta_verbose ("Ignoring unknown or already-used button name \"%s\"\n",
buttons[b]);
meta_topic (META_DEBUG_PREFS, "Ignoring unknown or already-used button name \"%s\"\n",
buttons[b]);
}
++b;
@@ -923,6 +983,7 @@ update_button_layout (const char *value)
return changed;
}
#endif /* HAVE_GCONF */
const PangoFontDescription*
meta_prefs_get_titlebar_font (void)
@@ -933,8 +994,7 @@ meta_prefs_get_titlebar_font (void)
return titlebar_font;
}
#define MAX_REASONABLE_WORKSPACES 32
#ifdef HAVE_GCONF
static gboolean
update_num_workspaces (int value)
{
@@ -954,6 +1014,7 @@ update_num_workspaces (int value)
return old != num_workspaces;
}
#endif /* HAVE_GCONF */
int
meta_prefs_get_num_workspaces (void)
@@ -961,6 +1022,7 @@ meta_prefs_get_num_workspaces (void)
return num_workspaces;
}
#ifdef HAVE_GCONF
static gboolean
update_application_based (gboolean value)
{
@@ -970,13 +1032,17 @@ update_application_based (gboolean value)
return old != application_based;
}
#endif /* HAVE_GCONF */
gboolean
meta_prefs_get_application_based (void)
{
return FALSE; /* For now, we never want this to do anything */
return application_based;
}
#ifdef HAVE_GCONF
static gboolean
update_disable_workarounds (gboolean value)
{
@@ -997,6 +1063,7 @@ update_disable_workarounds (gboolean value)
return old != disable_workarounds;
}
#endif /* HAVE_GCONF */
gboolean
meta_prefs_get_disable_workarounds (void)
@@ -1004,6 +1071,7 @@ meta_prefs_get_disable_workarounds (void)
return disable_workarounds;
}
#ifdef HAVE_GCONF
static MetaActionDoubleClickTitlebar
action_double_click_titlebar_from_string (const char *str)
{
@@ -1064,7 +1132,9 @@ update_auto_raise_delay (int value)
return old != auto_raise_delay;
}
#endif /* HAVE_GCONF */
#ifdef WITH_VERBOSE_MODE
const char*
meta_preference_to_string (MetaPreference pref)
{
@@ -1112,14 +1182,20 @@ meta_preference_to_string (MetaPreference pref)
case META_PREF_BUTTON_LAYOUT:
return "BUTTON_LAYOUT";
break;
case META_PREF_WORKSPACE_NAMES:
return "WORKSPACE_NAMES";
break;
}
return "(unknown)";
}
#endif /* WITH_VERBOSE_MODE */
void
meta_prefs_set_num_workspaces (int n_workspaces)
{
#ifdef HAVE_GCONF
GError *err;
if (default_client == NULL)
@@ -1143,6 +1219,7 @@ meta_prefs_set_num_workspaces (int n_workspaces)
err->message);
g_error_free (err);
}
#endif /* HAVE_GCONF */
}
/* Indexes must correspond to MetaKeybindingAction */
@@ -1218,12 +1295,15 @@ static MetaKeyPref window_bindings[] = {
{ META_KEYBINDING_RAISE_OR_LOWER, 0, 0 },
{ META_KEYBINDING_RAISE, 0, 0 },
{ META_KEYBINDING_LOWER, 0, 0 },
{ META_KEYBINDING_MAXIMIZE_VERTICALLY, 0, 0 },
{ META_KEYBINDING_MAXIMIZE_HORIZONTALLY, 0, 0 },
{ NULL, 0, 0 }
};
static void
init_bindings (void)
{
#ifdef HAVE_GCONF
int i;
GError *err;
@@ -1268,16 +1348,18 @@ init_bindings (void)
++i;
}
#endif /* HAVE_GCONF */
}
static void
init_commands (void)
{
#ifdef HAVE_GCONF
int i;
GError *err;
i = 0;
while (i < NUM_COMMANDS)
while (i < MAX_COMMANDS)
{
char *str_val;
char *key;
@@ -1295,8 +1377,41 @@ init_commands (void)
++i;
}
#endif /* HAVE_GCONF */
}
static void
init_workspace_names (void)
{
#ifdef HAVE_GCONF
int i;
GError *err;
i = 0;
while (i < MAX_REASONABLE_WORKSPACES)
{
char *str_val;
char *key;
key = gconf_key_for_workspace_name (i);
err = NULL;
str_val = gconf_client_get_string (default_client, key, &err);
cleanup_error (&err);
update_workspace_name (key, str_val);
g_assert (workspace_names[i] != NULL);
g_free (str_val);
g_free (key);
++i;
}
#endif /* HAVE_GCONF */
}
#ifdef HAVE_GCONF
static gboolean
update_binding (MetaKeyPref *binding,
const char *value)
@@ -1424,13 +1539,21 @@ update_command (const char *name,
i = atoi (p);
i -= 1; /* count from 0 not 1 */
if (i >= NUM_COMMANDS)
if (i >= MAX_COMMANDS)
{
meta_topic (META_DEBUG_KEYBINDINGS,
"Command %d is too highly numbered, ignoring\n", i);
return FALSE;
}
if ((commands[i] == NULL && value == NULL) ||
(commands[i] && value && strcmp (commands[i], value) == 0))
{
meta_topic (META_DEBUG_KEYBINDINGS,
"Command %d is unchanged\n", i);
return FALSE;
}
g_free (commands[i]);
commands[i] = g_strdup (value);
@@ -1440,11 +1563,12 @@ update_command (const char *name,
return TRUE;
}
#endif /* HAVE_GCONF */
const char*
meta_prefs_get_command (int i)
{
g_return_val_if_fail (i >= 0 && i < NUM_COMMANDS, NULL);
g_return_val_if_fail (i >= 0 && i < MAX_COMMANDS, NULL);
return commands[i];
}
@@ -1459,6 +1583,162 @@ meta_prefs_get_gconf_key_for_command (int i)
return key;
}
#ifdef HAVE_GCONF
static gboolean
update_workspace_name (const char *name,
const char *value)
{
char *p;
int i;
p = strrchr (name, '_');
if (p == NULL)
{
meta_topic (META_DEBUG_PREFS,
"Workspace name %s has no underscore?\n", name);
return FALSE;
}
++p;
if (!g_ascii_isdigit (*p))
{
meta_topic (META_DEBUG_PREFS,
"Workspace name %s doesn't end in number?\n", name);
return FALSE;
}
i = atoi (p);
i -= 1; /* count from 0 not 1 */
if (i >= MAX_REASONABLE_WORKSPACES)
{
meta_topic (META_DEBUG_PREFS,
"Workspace name %d is too highly numbered, ignoring\n", i);
return FALSE;
}
if (workspace_names[i] && value && strcmp (workspace_names[i], value) == 0)
{
meta_topic (META_DEBUG_PREFS,
"Workspace name %d is unchanged\n", i);
return FALSE;
}
/* This is a bad hack. We have to treat empty string as
* "unset" because the root window property can't contain
* null. So it gets empty string instead and we don't want
* that to result in setting the empty string as a value that
* overrides "unset".
*/
if (value != NULL && *value != '\0')
{
g_free (workspace_names[i]);
workspace_names[i] = g_strdup (value);
}
else
{
/* use a default name */
char *d;
d = g_strdup_printf (_("Workspace %d"), i + 1);
if (workspace_names[i] && strcmp (workspace_names[i], d) == 0)
{
g_free (d);
return FALSE;
}
else
{
g_free (workspace_names[i]);
workspace_names[i] = d;
}
}
meta_topic (META_DEBUG_PREFS,
"Updated workspace name %d to \"%s\"\n",
i, workspace_names[i] ? workspace_names[i] : "none");
return TRUE;
}
#endif /* HAVE_GCONF */
const char*
meta_prefs_get_workspace_name (int i)
{
g_return_val_if_fail (i >= 0 && i < MAX_REASONABLE_WORKSPACES, NULL);
g_assert (workspace_names[i] != NULL);
meta_topic (META_DEBUG_PREFS,
"Getting workspace name for %d: \"%s\"\n",
i, workspace_names[i]);
return workspace_names[i];
}
void
meta_prefs_change_workspace_name (int i,
const char *name)
{
#ifdef HAVE_GCONF
char *key;
GError *err;
g_return_if_fail (i >= 0 && i < MAX_REASONABLE_WORKSPACES);
meta_topic (META_DEBUG_PREFS,
"Changing name of workspace %d to %s\n",
i, name ? name : "none");
/* This is a bad hack. We have to treat empty string as
* "unset" because the root window property can't contain
* null. So it gets empty string instead and we don't want
* that to result in setting the empty string as a value that
* overrides "unset".
*/
if (name && *name == '\0')
name = NULL;
if ((name == NULL && workspace_names[i] == NULL) ||
(name && workspace_names[i] && strcmp (name, workspace_names[i]) == 0))
{
meta_topic (META_DEBUG_PREFS,
"Workspace %d already has name %s\n",
i, name ? name : "none");
return;
}
key = gconf_key_for_workspace_name (i);
err = NULL;
gconf_client_set_string (default_client,
key, name,
&err);
if (err)
{
meta_warning (_("Error setting name for workspace %d to \"%s\": %s\n"),
i, name ? name : "none",
err->message);
g_error_free (err);
}
g_free (key);
#endif /* HAVE_GCONF */
}
#ifdef HAVE_GCONF
static char*
gconf_key_for_workspace_name (int i)
{
char *key;
key = g_strdup_printf (KEY_WORKSPACE_NAME_PREFIX"%d", i + 1);
return key;
}
#endif /* HAVE_GCONF */
void
meta_prefs_get_button_layout (MetaButtonLayout *button_layout_p)
{

View File

@@ -41,7 +41,8 @@ typedef enum
META_PREF_SCREEN_KEYBINDINGS,
META_PREF_DISABLE_WORKAROUNDS,
META_PREF_COMMANDS,
META_PREF_BUTTON_LAYOUT
META_PREF_BUTTON_LAYOUT,
META_PREF_WORKSPACE_NAMES
} MetaPreference;
typedef void (* MetaPrefsChangedFunc) (MetaPreference pref,
@@ -75,6 +76,10 @@ MetaActionDoubleClickTitlebar meta_prefs_get_action_double_click_titlebar (void)
void meta_prefs_set_num_workspaces (int n_workspaces);
const char* meta_prefs_get_workspace_name (int i);
void meta_prefs_change_workspace_name (int i,
const char *name);
/* Screen bindings */
#define META_KEYBINDING_WORKSPACE_1 "switch_to_workspace_1"
#define META_KEYBINDING_WORKSPACE_2 "switch_to_workspace_2"
@@ -145,6 +150,8 @@ void meta_prefs_set_num_workspaces (int n_workspaces);
#define META_KEYBINDING_RAISE_OR_LOWER "raise_or_lower"
#define META_KEYBINDING_RAISE "raise"
#define META_KEYBINDING_LOWER "lower"
#define META_KEYBINDING_MAXIMIZE_VERTICALLY "maximize_vertically"
#define META_KEYBINDING_MAXIMIZE_HORIZONTALLY "maximize_horizontally"
typedef enum _MetaKeyBindingAction
{

View File

@@ -8,6 +8,10 @@ if test -z "$CLIENT_DISPLAY"; then
CLIENT_DISPLAY=:1
fi
if test -z "$METACITY_DISPLAY"; then
export METACITY_DISPLAY=$CLIENT_DISPLAY
fi
if test -z "$SCREENS"; then
SCREENS=1
fi
@@ -44,6 +48,8 @@ if test -n "$XINERAMA"; then
XINERAMA_FLAGS='+xinerama'
fi
export EF_ALLOW_MALLOC_0=1
if test -z "$ONLY_WM"; then
echo "Launching Xnest"
Xnest -ac $XNEST_DISPLAY -scrns $SCREENS -geometry 640x480 -bw 15 $XINERAMA_FLAGS &
@@ -52,7 +58,17 @@ if test -z "$ONLY_WM"; then
if test -n "$XMON_DIR"; then
echo "Launching xmond"
$XMON_DIR/xmonui | $XMON_DIR/xmond -server $XNEST_DISPLAY &
$XMON_DIR/xmonui | $XMON_DIR/xmond -server localhost:$XNEST_DISPLAY &
sleep 1
fi
if test -n "$XSCOPE_DIR"; then
## xscope doesn't like to die when it should, it backgrounds itself
killall -9 xscope
killall -9 xscope
echo "Launching xscope"
DISPLAY= $XSCOPE_DIR/xscope -o1 -i28 > xscoped-replies.txt &
export METACITY_DISPLAY=localhost:28
sleep 1
fi
@@ -89,5 +105,5 @@ if test -z "$ONLY_WM"; then
fi
if test -z "$ONLY_SETUP"; then
METACITY_VERBOSE=1 METACITY_DEBUG=1 METACITY_USE_LOGFILE=1 METACITY_DEBUG_BUTTON_GRABS=1 METACITY_DISPLAY=$CLIENT_DISPLAY exec $DEBUG ./metacity $OPTIONS
METACITY_VERBOSE=1 METACITY_USE_LOGFILE=1 METACITY_DEBUG_BUTTON_GRABS=1 exec $DEBUG ./metacity $OPTIONS
fi

View File

@@ -51,6 +51,7 @@ static char* get_screen_name (MetaDisplay *display,
static void update_num_workspaces (MetaScreen *screen);
static void update_focus_mode (MetaScreen *screen);
static void update_workspace_names (MetaScreen *screen);
static void prefs_changed_callback (MetaPreference pref,
gpointer data);
@@ -89,7 +90,7 @@ set_wm_check_hint (MetaScreen *screen)
static int
set_supported_hint (MetaScreen *screen)
{
#define N_SUPPORTED 44
#define N_SUPPORTED 45
#define N_WIN_SUPPORTED 1
Atom atoms[N_SUPPORTED];
@@ -118,7 +119,7 @@ set_supported_hint (MetaScreen *screen)
atoms[22] = screen->display->atom_net_wm_moveresize;
atoms[23] = screen->display->atom_net_wm_state_hidden;
atoms[24] = screen->display->atom_net_wm_window_type_utility;
atoms[25] = screen->display->atom_net_wm_window_type_splashscreen;
atoms[25] = screen->display->atom_net_wm_window_type_splash;
atoms[26] = screen->display->atom_net_wm_state_fullscreen;
atoms[27] = screen->display->atom_net_wm_ping;
atoms[28] = screen->display->atom_net_active_window;
@@ -137,6 +138,7 @@ set_supported_hint (MetaScreen *screen)
atoms[41] = screen->display->atom_net_wm_action_close;
atoms[42] = screen->display->atom_net_wm_state_above;
atoms[43] = screen->display->atom_net_wm_state_below;
atoms[44] = screen->display->atom_net_startup_id;
XChangeProperty (screen->display->xdisplay, screen->xroot,
screen->display->atom_net_supported,
@@ -366,6 +368,7 @@ meta_screen_new (MetaDisplay *display,
Atom wm_sn_atom;
char buf[128];
Time manager_timestamp;
gulong current_workspace;
replace_current_wm = meta_get_replace_current_wm ();
@@ -566,13 +569,24 @@ meta_screen_new (MetaDisplay *display,
meta_screen_update_workspace_layout (screen);
meta_screen_update_workspace_names (screen);
/* Get current workspace */
current_workspace = 0;
if (meta_prop_get_cardinal (screen->display,
screen->xroot,
screen->display->atom_net_current_desktop,
&current_workspace))
meta_verbose ("Read existing _NET_CURRENT_DESKTOP = %d\n",
(int) current_workspace);
else
meta_verbose ("No _NET_CURRENT_DESKTOP present\n");
/* Screens must have at least one workspace at all times,
* so create that required workspace.
*/
meta_workspace_activate (meta_workspace_new (screen));
update_num_workspaces (screen);
screen->all_keys_grabbed = FALSE;
screen->keys_grabbed = FALSE;
meta_screen_grab_keys (screen);
@@ -596,6 +610,17 @@ meta_screen_new (MetaDisplay *display,
screen->startup_sequences = NULL;
screen->startup_sequence_timeout = 0;
#endif
/* Switch to the _NET_CURRENT_DESKTOP workspace */
{
MetaWorkspace *space;
space = meta_screen_get_workspace_by_index (screen,
current_workspace);
if (space != NULL)
meta_workspace_activate (space);
}
meta_verbose ("Added screen %d ('%s') root 0x%lx\n",
screen->number, screen->screen_name, screen->xroot);
@@ -727,6 +752,10 @@ prefs_changed_callback (MetaPreference pref,
{
update_focus_mode (screen);
}
else if (pref == META_PREF_WORKSPACE_NAMES)
{
update_workspace_names (screen);
}
}
@@ -1130,8 +1159,11 @@ meta_screen_ensure_workspace_popup (MetaScreen *screen)
g_assert (workspace);
entries[iter].key = (MetaTabEntryKey) workspace;
entries[iter].title = workspace->name;
entries[iter].title = meta_workspace_get_name (workspace);
entries[iter].icon = NULL;
g_assert (entries[iter].title != NULL);
iter++;
}
}
@@ -1149,8 +1181,10 @@ meta_screen_ensure_workspace_popup (MetaScreen *screen)
g_assert (workspace);
entries[i].key = (MetaTabEntryKey) workspace;
entries[i].title = workspace->name;
entries[i].title = meta_workspace_get_name (workspace);
entries[i].icon = NULL;
g_assert (entries[i].title != NULL);
}
}
@@ -1389,13 +1423,58 @@ meta_screen_update_workspace_layout (MetaScreen *screen)
screen->starting_corner);
}
static void
update_workspace_names (MetaScreen *screen)
{
/* This updates names on root window when the pref changes,
* note we only get prefs change notify if things have
* really changed.
*/
GString *flattened;
int i;
int n_spaces;
/* flatten to nul-separated list */
n_spaces = meta_screen_get_n_workspaces (screen);
flattened = g_string_new ("");
i = 0;
while (i < n_spaces)
{
const char *name;
name = meta_prefs_get_workspace_name (i);
if (name)
g_string_append_len (flattened, name,
strlen (name) + 1);
else
g_string_append_len (flattened, "", 1);
++i;
}
meta_error_trap_push (screen->display);
XChangeProperty (screen->display->xdisplay,
screen->xroot,
screen->display->atom_net_desktop_names,
screen->display->atom_utf8_string,
8, PropModeReplace,
flattened->str, flattened->len);
meta_error_trap_pop (screen->display, FALSE);
g_string_free (flattened, TRUE);
}
void
meta_screen_update_workspace_names (MetaScreen *screen)
{
char **names;
int n_names;
int i;
GList *tmp;
/* this updates names in prefs when the root window property changes,
* iff the new property contents don't match what's already in prefs
*/
names = NULL;
n_names = 0;
@@ -1410,16 +1489,14 @@ meta_screen_update_workspace_names (MetaScreen *screen)
}
i = 0;
tmp = screen->workspaces;
while (tmp != NULL && i < n_names)
while (i < n_names)
{
MetaWorkspace *w = tmp->data;
meta_workspace_set_name (w, names[i]);
++i;
meta_topic (META_DEBUG_PREFS,
"Setting workspace %d name to \"%s\" due to _NET_DESKTOP_NAMES change\n",
i, names[i] ? names[i] : "null");
meta_prefs_change_workspace_name (i, names[i]);
tmp = tmp->next;
++i;
}
g_strfreev (names);
@@ -1724,7 +1801,12 @@ typedef struct
GTimeVal now;
} CollectTimedOutData;
#define STARTUP_TIMEOUT 5000
/* This should be fairly long, as it should never be required unless
* apps or .desktop files are buggy, and it's confusing if
* OpenOffice or whatever seems to stop launching - people
* might decide they need to launch it again.
*/
#define STARTUP_TIMEOUT 15000
static void
collect_timed_out_foreach (void *element,
@@ -1772,7 +1854,7 @@ startup_sequence_timeout (void *data)
"Timed out sequence %s\n",
sn_startup_sequence_get_id (sequence));
remove_sequence (screen, sequence);
sn_startup_sequence_complete (sequence);
tmp = tmp->next;
}
@@ -1837,3 +1919,68 @@ meta_screen_sn_event (SnMonitorEvent *event,
}
}
#endif
void
meta_screen_apply_startup_properties (MetaScreen *screen,
MetaWindow *window)
{
#ifdef HAVE_STARTUP_NOTIFICATION
const char *startup_id;
GSList *tmp;
SnStartupSequence *sequence;
startup_id = meta_window_get_startup_id (window);
if (startup_id == NULL)
return;
sequence = NULL;
tmp = screen->startup_sequences;
while (tmp != NULL)
{
const char *id;
id = sn_startup_sequence_get_id (tmp->data);
if (strcmp (id, startup_id) == 0)
{
sequence = tmp->data;
break;
}
tmp = tmp->next;
}
if (sequence != NULL)
{
int space;
meta_topic (META_DEBUG_STARTUP,
"Found startup sequence for window %s ID \"%s\"\n",
window->desc, startup_id);
if (!window->initial_workspace_set)
{
space = sn_startup_sequence_get_workspace (sequence);
if (space >= 0)
{
meta_topic (META_DEBUG_STARTUP,
"Setting initial window workspace to %d based on startup info\n",
space);
window->initial_workspace_set = TRUE;
window->initial_workspace = space;
}
}
return;
}
else
{
meta_topic (META_DEBUG_STARTUP,
"Did not find startup sequence for window %s ID \"%s\"\n",
window->desc, startup_id);
}
#endif /* HAVE_STARTUP_NOTIFICATION */
}

View File

@@ -152,5 +152,8 @@ void meta_screen_resize (MetaScreen *screen,
void meta_screen_show_desktop (MetaScreen *screen);
void meta_screen_unshow_desktop (MetaScreen *screen);
void meta_screen_apply_startup_properties (MetaScreen *screen,
MetaWindow *window);
#endif

View File

@@ -522,6 +522,8 @@ add_constraint (Constraint **constraints,
w->transient_parent_is_root_window) && \
WINDOW_HAS_TRANSIENT_TYPE (w))
#define WINDOW_IN_STACK(w) (w->stack_position >= 0)
static void
create_constraints (Constraint **constraints,
GList *windows)
@@ -532,6 +534,14 @@ create_constraints (Constraint **constraints,
while (tmp != NULL)
{
MetaWindow *w = tmp->data;
if (!WINDOW_IN_STACK (w))
{
meta_topic (META_DEBUG_STACK, "Window %s not in the stack, not constraining it\n",
w->desc);
tmp = tmp->next;
continue;
}
if (WINDOW_TRANSIENT_FOR_WHOLE_GROUP (w))
{
@@ -552,6 +562,12 @@ create_constraints (Constraint **constraints,
{
MetaWindow *group_window = tmp2->data;
if (!WINDOW_IN_STACK (group_window))
{
tmp2 = tmp2->next;
continue;
}
#if 0
/* old way of doing it */
if (!(meta_window_is_ancestor_of_transient (w, group_window)) &&
@@ -581,7 +597,7 @@ create_constraints (Constraint **constraints,
parent =
meta_display_lookup_x_window (w->display, w->xtransient_for);
if (parent)
if (parent && WINDOW_IN_STACK (parent))
{
meta_topic (META_DEBUG_STACK, "Constraining %s above %s due to transiency\n",
w->desc, parent->desc);
@@ -1325,6 +1341,7 @@ meta_stack_get_default_focus_window (MetaStack *stack,
window != not_this_one &&
(window->unmaps_pending == 0) &&
!window->minimized &&
(window->input || window->take_focus) &&
(workspace == NULL ||
meta_window_visible_on_workspace (window, workspace)))
{

View File

@@ -2246,6 +2246,9 @@ parse_draw_op_element (GMarkupParseContext *context,
GdkPixbuf *pixbuf;
MetaColorSpec *colorize_spec = NULL;
MetaImageFillType fill_type_val;
int h, w, c;
int pixbuf_width, pixbuf_height, pixbuf_n_channels, pixbuf_rowstride;
guchar *pixbuf_pixels;
if (!locate_attributes (context, element_name, attribute_names, attribute_values,
error,
@@ -2308,7 +2311,7 @@ parse_draw_op_element (GMarkupParseContext *context,
if (fill_type)
{
fill_type_val = meta_image_fill_type_from_string (fill_type);
if (((int) fill_type_val) == -1)
{
set_error (error, context, G_MARKUP_ERROR,
@@ -2330,16 +2333,16 @@ parse_draw_op_element (GMarkupParseContext *context,
}
if (colorize)
{
colorize_spec = meta_color_spec_new_from_string (colorize, error);
if (colorize_spec == NULL)
{
add_context_to_error (error, context);
{
colorize_spec = meta_color_spec_new_from_string (colorize, error);
if (colorize_spec == NULL)
{
add_context_to_error (error, context);
g_object_unref (G_OBJECT (pixbuf));
return;
}
}
return;
}
}
alpha_spec = NULL;
if (alpha && !parse_alpha (alpha, &alpha_spec, context, error))
@@ -2359,6 +2362,67 @@ parse_draw_op_element (GMarkupParseContext *context,
op->data.image.alpha_spec = alpha_spec;
op->data.image.fill_type = fill_type_val;
/* Check for vertical & horizontal stripes */
pixbuf_n_channels = gdk_pixbuf_get_n_channels(pixbuf);
pixbuf_width = gdk_pixbuf_get_width(pixbuf);
pixbuf_height = gdk_pixbuf_get_height(pixbuf);
pixbuf_rowstride = gdk_pixbuf_get_rowstride(pixbuf);
pixbuf_pixels = gdk_pixbuf_get_pixels(pixbuf);
/* Check for horizontal stripes */
for (h = 0; h < pixbuf_height; h++)
{
for (w = 1; w < pixbuf_width; w++)
{
for (c = 0; c < pixbuf_n_channels; c++)
{
if (pixbuf_pixels[(h * pixbuf_rowstride) + c] !=
pixbuf_pixels[(h * pixbuf_rowstride) + w + c])
break;
}
if (c < pixbuf_n_channels)
break;
}
if (w < pixbuf_width)
break;
}
if (h >= pixbuf_height)
{
op->data.image.horizontal_stripes = TRUE;
}
else
{
op->data.image.horizontal_stripes = FALSE;
}
/* Check for vertical stripes */
for (w = 0; w < pixbuf_width; w++)
{
for (h = 1; h < pixbuf_height; h++)
{
for (c = 0; c < pixbuf_n_channels; c++)
{
if (pixbuf_pixels[w + c] !=
pixbuf_pixels[(h * pixbuf_rowstride) + w + c])
break;
}
if (c < pixbuf_n_channels)
break;
}
if (h < pixbuf_height)
break;
}
if (w >= pixbuf_width)
{
op->data.image.vertical_stripes = TRUE;
}
else
{
op->data.image.vertical_stripes = FALSE;
}
g_assert (info->op_list);
meta_draw_op_list_append (info->op_list, op);

View File

@@ -576,9 +576,9 @@ meta_frame_layout_calc_geometry (const MetaFrameLayout *layout,
while (i < n_left)
{
if (i == 0) /* prefer left background if only one button */
left_bg_rects[i] = &fgeom->left_right_background;
else if (i == (n_left - 1))
left_bg_rects[i] = &fgeom->left_left_background;
else if (i == (n_left - 1))
left_bg_rects[i] = &fgeom->left_right_background;
else
left_bg_rects[i] = &fgeom->left_middle_backgrounds[i-1];
@@ -589,9 +589,9 @@ meta_frame_layout_calc_geometry (const MetaFrameLayout *layout,
while (i < n_right)
{
if (i == (n_right - 1)) /* prefer right background if only one button */
right_bg_rects[i] = &fgeom->right_left_background;
else if (i == 0)
right_bg_rects[i] = &fgeom->right_right_background;
else if (i == 0)
right_bg_rects[i] = &fgeom->right_left_background;
else
right_bg_rects[i] = &fgeom->right_middle_backgrounds[i-1];
@@ -2804,18 +2804,107 @@ pixbuf_tile (GdkPixbuf *tile,
return pixbuf;
}
static GdkPixbuf *
replicate_rows (GdkPixbuf *src,
int src_x,
int src_y,
int width,
int height)
{
unsigned int n_channels = gdk_pixbuf_get_n_channels (src);
unsigned int src_rowstride = gdk_pixbuf_get_rowstride (src);
unsigned char *pixels = (gdk_pixbuf_get_pixels (src) + src_y * src_rowstride + src_x
* n_channels);
unsigned char *dest_pixels;
GdkPixbuf *result;
unsigned int dest_rowstride;
int i;
result = gdk_pixbuf_new (GDK_COLORSPACE_RGB, n_channels == 4, 8,
width, height);
dest_rowstride = gdk_pixbuf_get_rowstride (result);
dest_pixels = gdk_pixbuf_get_pixels (result);
for (i = 0; i < height; i++)
memcpy (dest_pixels + dest_rowstride * i, pixels, n_channels * width);
return result;
}
static GdkPixbuf *
replicate_cols (GdkPixbuf *src,
int src_x,
int src_y,
int width,
int height)
{
unsigned int n_channels = gdk_pixbuf_get_n_channels (src);
unsigned int src_rowstride = gdk_pixbuf_get_rowstride (src);
unsigned char *pixels = (gdk_pixbuf_get_pixels (src) + src_y * src_rowstride + src_x
* n_channels);
unsigned char *dest_pixels;
GdkPixbuf *result;
unsigned int dest_rowstride;
int i, j;
result = gdk_pixbuf_new (GDK_COLORSPACE_RGB, n_channels == 4, 8,
width, height);
dest_rowstride = gdk_pixbuf_get_rowstride (result);
dest_pixels = gdk_pixbuf_get_pixels (result);
for (i = 0; i < height; i++)
{
unsigned char *p = dest_pixels + dest_rowstride * i;
unsigned char *q = pixels + src_rowstride * i;
unsigned char r = *(q++);
unsigned char g = *(q++);
unsigned char b = *(q++);
if (n_channels == 4)
{
unsigned char a;
a = *(q++);
for (j = 0; j < width; j++)
{
*(p++) = r;
*(p++) = g;
*(p++) = b;
*(p++) = a;
}
}
else
{
for (j = 0; j < width; j++)
{
*(p++) = r;
*(p++) = g;
*(p++) = b;
}
}
}
return result;
}
static GdkPixbuf*
scale_and_alpha_pixbuf (GdkPixbuf *src,
MetaAlphaGradientSpec *alpha_spec,
MetaImageFillType fill_type,
int width,
int height)
int height,
gboolean vertical_stripes,
gboolean horizontal_stripes)
{
GdkPixbuf *pixbuf;
GdkPixbuf *temp_pixbuf;
pixbuf = NULL;
pixbuf = src;
if (gdk_pixbuf_get_width (pixbuf) == width &&
gdk_pixbuf_get_height (pixbuf) == height)
{
@@ -2823,16 +2912,65 @@ scale_and_alpha_pixbuf (GdkPixbuf *src,
}
else
{
switch (fill_type)
if (fill_type == META_IMAGE_FILL_TILE)
{
case META_IMAGE_FILL_SCALE:
pixbuf = gdk_pixbuf_scale_simple (pixbuf,
width, height,
GDK_INTERP_BILINEAR);
break;
case META_IMAGE_FILL_TILE:
pixbuf = pixbuf_tile (pixbuf, width, height);
break;
}
else
{
int src_h, src_w, dest_h, dest_w;
src_h = gdk_pixbuf_get_height (src);
src_w = gdk_pixbuf_get_width (src);
/* prefer to replicate_cols if possible, as that
* is faster (no memory reads)
*/
if (horizontal_stripes)
{
dest_w = gdk_pixbuf_get_width (src);
dest_h = height;
}
else if (vertical_stripes)
{
dest_w = width;
dest_h = gdk_pixbuf_get_height (src);
}
else
{
dest_w = width;
dest_h = height;
}
if (dest_w == src_w && dest_h == src_h)
{
temp_pixbuf = src;
g_object_ref (G_OBJECT (temp_pixbuf));
}
else
{
temp_pixbuf = gdk_pixbuf_scale_simple (src,
dest_w, dest_h,
GDK_INTERP_BILINEAR);
}
/* prefer to replicate_cols if possible, as that
* is faster (no memory reads)
*/
if (horizontal_stripes)
{
pixbuf = replicate_cols (temp_pixbuf, 0, 0, width, height);
g_object_unref (G_OBJECT (temp_pixbuf));
}
else if (vertical_stripes)
{
pixbuf = replicate_rows (temp_pixbuf, 0, 0, width, height);
g_object_unref (G_OBJECT (temp_pixbuf));
}
else
{
pixbuf = temp_pixbuf;
}
}
}
@@ -2972,15 +3110,19 @@ draw_op_as_pixbuf (const MetaDrawOp *op,
pixbuf = scale_and_alpha_pixbuf (op->data.image.colorize_cache_pixbuf,
op->data.image.alpha_spec,
op->data.image.fill_type,
width, height);
width, height,
op->data.image.vertical_stripes,
op->data.image.horizontal_stripes);
}
}
else
{
pixbuf = scale_and_alpha_pixbuf (op->data.image.pixbuf,
op->data.image.alpha_spec,
op->data.image.alpha_spec,
op->data.image.fill_type,
width, height);
width, height,
op->data.image.vertical_stripes,
op->data.image.horizontal_stripes);
}
break;
}
@@ -2997,12 +3139,14 @@ draw_op_as_pixbuf (const MetaDrawOp *op,
pixbuf = scale_and_alpha_pixbuf (info->mini_icon,
op->data.icon.alpha_spec,
op->data.icon.fill_type,
width, height);
width, height,
FALSE, FALSE);
else if (info->icon)
pixbuf = scale_and_alpha_pixbuf (info->icon,
op->data.icon.alpha_spec,
op->data.icon.fill_type,
width, height);
width, height,
FALSE, FALSE);
break;
case META_DRAW_TITLE:

View File

@@ -325,6 +325,8 @@ struct _MetaDrawOp
guint32 colorize_cache_pixel;
GdkPixbuf *colorize_cache_pixbuf;
MetaImageFillType fill_type;
unsigned int vertical_stripes : 1;
unsigned int horizontal_stripes : 1;
} image;
struct {

View File

@@ -145,7 +145,7 @@
</draw_ops>
<draw_ops name="outer_bevel">
<rectangle color="#000000"
<rectangle color="gtk:fg[NORMAL]"
x="0" y="0" width="width-1" height="height-1"/>
<line color="gtk:light[NORMAL]"
x1="1" y1="1" x2="1" y2="height-2"/>
@@ -162,7 +162,7 @@
</draw_ops>
<draw_ops name="focus_outline">
<rectangle color="#000000"
<rectangle color="gtk:fg[NORMAL]"
x="left_width-1" y="top_height-1"
width="width-left_width-right_width+1"
height="height-top_height-bottom_height+1"/>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 147 B

After

Width:  |  Height:  |  Size: 154 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 134 B

After

Width:  |  Height:  |  Size: 166 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 150 B

After

Width:  |  Height:  |  Size: 154 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 178 B

After

Width:  |  Height:  |  Size: 171 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 139 B

After

Width:  |  Height:  |  Size: 138 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 235 B

After

Width:  |  Height:  |  Size: 224 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 142 B

After

Width:  |  Height:  |  Size: 136 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 300 B

After

Width:  |  Height:  |  Size: 282 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 176 B

After

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 268 B

After

Width:  |  Height:  |  Size: 312 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 B

After

Width:  |  Height:  |  Size: 168 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 184 B

After

Width:  |  Height:  |  Size: 162 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 237 B

After

Width:  |  Height:  |  Size: 210 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 192 B

After

Width:  |  Height:  |  Size: 170 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 190 B

After

Width:  |  Height:  |  Size: 171 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 148 B

After

Width:  |  Height:  |  Size: 158 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 201 B

After

Width:  |  Height:  |  Size: 176 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 259 B

After

Width:  |  Height:  |  Size: 254 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 140 B

After

Width:  |  Height:  |  Size: 137 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 195 B

After

Width:  |  Height:  |  Size: 264 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 249 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 143 B

After

Width:  |  Height:  |  Size: 140 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 279 B

After

Width:  |  Height:  |  Size: 262 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 165 B

After

Width:  |  Height:  |  Size: 232 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 907 B

After

Width:  |  Height:  |  Size: 981 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 181 B

After

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 174 B

After

Width:  |  Height:  |  Size: 157 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 194 B

After

Width:  |  Height:  |  Size: 163 B

Some files were not shown because too many files have changed in this diff Show More