Compare commits

...

306 Commits

Author SHA1 Message Date
Havoc Pennington
04fcad7c13 2.5.0 2003-03-27 02:27:40 +00:00
Christophe Merlet
ebbc4c499b Updated French translation. 2003-03-27 00:30:14 +00:00
Soeren Sandmann
3c8b051e31 just return if we are not verbose.
Sun Mar 23 23:04:06 2003  Soeren Sandmann  <sandmann@daimi.au.dk>

	* src/display.c (meta_spew_event): just return if we are not
	verbose.
2003-03-23 21:54:48 +00:00
Havoc Pennington
d34e54785d Should fix #108108, #106217, tracked down by Owen Taylor and Frederic
2003-03-11  Havoc Pennington  <hp@pobox.com>

	Should fix #108108, #106217, tracked down by Owen Taylor and
	Frederic Crozat

	* src/window.c (meta_window_foreach_transient): change
	MetaWindowForeachFunc to return a boolean for whether to continue
	(meta_window_foreach_ancestor): new function
	(window_should_be_showing): use meta_window_foreach_ancestor
	(unminimize_window_and_all_transient_parents): ditto
	(update_sm_hints): ditto
	(meta_window_is_ancestor_of_transient): ditto

	* src/stack.c (get_maximum_layer_of_ancestor): use
	meta_window_foreach_ancestor
2003-03-17 06:36:39 +00:00
Rob Adams
51e74d4027 Free old window menu if it already exists so we don't end up with more
2003-03-16  Rob Adams <robadams@ucla.edu>

	* window.c (meta_window_show_menu): Free old window menu if it
	already exists so we don't end up with more than one.  Fix for
	#108392.
2003-03-17 01:19:07 +00:00
Rob Adams
2d662f67a5 Don't try to force a window onscreen by more than its width. Fix for
2003-03-14  Rob Adams <robadams@ucla.edu>

	* contraints.c (get_outermost_screen_positions): Don't try to
	force a window onscreen by more than its width.  Fix for #94815.
2003-03-16 00:13:58 +00:00
Rob Adams
67cbbeb6c1 Make it so that the alt-tabbing won't try to go to a minimized window by
2003-03-13  Rob Adams <robadams@ucla.edu>

        Make it so that the alt-tabbing won't try to go to a minimized
	window by default.  Fix for #107071.

	* display.c (meta_display_get_tab_list): use a GList instead of a
	GSList
	(meta_display_get_tab_next): use meta_display_get_tab_list to
	decide what the next/previous tab window should be.

	* display.h (meta_display_get_tab_list): update function prototype
	to return GList instead of GSList.

	* screen.c (meta_screen_ensure_tab_popup): update function to deal
	with GList returned by meta_display_get_tab_list instead of GSList.
2003-03-15 02:16:21 +00:00
Rob Adams
cc7493cac9 resolve a merge conflict 2003-03-15 02:12:02 +00:00
Christian Rose
be96be95f6 Added "ml" to ALL_LINGUAS. Added Malayalam translation by FSF-India
2003-03-13  Christian Rose  <menthos@menthos.com>

	* configure.in: Added "ml" to ALL_LINGUAS.
	* po/ml.po: Added Malayalam translation by
	FSF-India <locale@gnu.org.in>.
2003-03-13 13:44:09 +00:00
Paul Duffy
6b144cd2eb Added "ga" to ALL_LINGUAS line in configure.in 2003-03-12 14:28:44 +00:00
Paul Duffy
38412b4460 Added Irish Translation (ga.po) 2003-03-12 14:27:26 +00:00
Rob Adams
b8287d3aca include left frame geometry when maximizing or fullscreening windows. Fix
2003-03-11  Rob Adams <robadams@ucla.edu>

	* src/constraints.c (meta_window_constrain): include left frame
	geometry when maximizing or fullscreening windows.  Fix for
	#108127.
2003-03-12 05:08:29 +00:00
Rob Adams
5eb4eea57e include left frame geometry when maximizing or fullscreening windows. Fix
2003-03-11  Rob Adams <robadams@ucla.edu>

	* src/constraints.c (meta_window_constrain): include left frame
	geometry when maximizing or fullscreening windows.  Fix for
	#108127.
2003-03-12 03:56:01 +00:00
Roozbeh Pournader
af3b5b77b1 Added "fa" to ALL_LINGUAS. Added Persian translation.
2003-03-10  Roozbeh Pournader  <roozbeh@sharif.edu>

	* configure.in: Added "fa" to ALL_LINGUAS.
	* po/fa.po: Added Persian translation.
2003-03-10 08:32:03 +00:00
Havoc Pennington
5f75334d57 Switch over to new constraints code, unquestionably introduces some bugs,
2003-02-27  Havoc Pennington  <hp@redhat.com>

	Switch over to new constraints code, unquestionably introduces
	some bugs, but should get us on the right path.

	* src/window.c (meta_window_get_work_area_all_xineramas): create
	this function again as it turned out to be legitimate for window
	position constraint
	(adjust_for_gravity): use the width/height from the configure
	request to compute the requested move
	(meta_window_move_resize_internal): use meta_window_constrain
	(update_size_hints): clamp max size to MAXSHORT to avoid worrying
	about overflow stuff

	* src/constraints.c (meta_window_constrain): don't base placement
	on uninitialized variables, general hacking

	* src/Makefile.am (metacity_SOURCES): add constraints.c,
	constraints.h

	* src/constraints.c (meta_window_constrain): update the
	cut-and-paste aspect ratio code to have latest bugfixes
2003-03-08 23:43:17 +00:00
Rob Adams
4481be72d1 Check that window min and max size hints are at least 1. Fix for #107110.
2003-03-08  Rob Adams <robadams@ucla.edu>

	* src/window-props.c (reload_normal_hints):  Check that window min
	and max size hints are at least 1.  Fix for #107110.
2003-03-08 18:15:22 +00:00
Havoc Pennington
c595a7ac0f fix changelog 2003-02-28 01:26:37 +00:00
Havoc Pennington
fa3de81741 add more debug spew about conditional build stuff (main): panic to
2003-02-27  Havoc Pennington  <hp@pobox.com>

	* src/main.c (main): add more debug spew about conditional
	build stuff
	(main): panic to "Simple" theme

	* src/window.c, src/window-props.c: move WM_NORMAL_HINTS and
	WM_PROTOCOLS to new property system; don't queue move resize on
	updating WM_PROTOCOLS; move WM_HINTS to new property system;
	reload icon in an idle handler.

	Changes made on plane from FOSDEM, syncing from laptop.
2003-02-28 01:24:44 +00:00
Mark McLoughlin
6094763def Give me back my keys.
2003-02-28  Mark McLoughlin  <mark@skynet.ie>

        Give me back my keys.

        * src/keybindings.c: (meta_window_grab_keys): don't
        grab keys on DOCK windows.

        * src/window.c: (recalc_window_type): re-grab the
        keys.
2003-02-27 22:44:36 +00:00
Dmitry Mastrukov
4e96dd7ea6 configure.in: Added Belarusian to ALL_LINGUAS. 2003-02-26 05:14:43 +00:00
Dmitry Mastrukov
6e6e85632a be.po: Added Belarusian translation from Belarusian team <i18n@infonet.by> 2003-02-26 05:13:07 +00:00
Mark McLoughlin
6af9a11361 release the keyboard grab before sending the action message to the panel.
2003-02-26  Mark McLoughlin  <mark@skynet.ie>

        * src/keybindings.c: (handle_panel_keybinding): release
        the keyboard grab before sending the action message to
        the panel.
2003-02-26 01:55:25 +00:00
Pablo Gonzalo del Campo
8377c7776c Fixed a translation string to match with libwnck.
2003-02-25  Pablo Gonzalo del Campo <pablodc@bigfoot.com>

	* es.po: Fixed a translation string to match with libwnck.
2003-02-25 18:04:00 +00:00
Mark McLoughlin
73cce3b174 Take control of the panel's global keybindings. The screenshot utility is
2003-02-24  Mark McLoughlin  <mark@skynet.ie>

        Take control of the panel's global keybindings. The
        screenshot utility is hooked up using a special case
        run_command and the menu and run dialog bindings are
        done using the _GNOME_PANEL_ACTION ClientMessage
        protocol.

        * src/display.[ch]: (meta_display_open): add some atoms.

        * src/keybindings.c:
        (handle_panel_keybinding): impl to handle a keybinding
        by sending an action message to the panel.

        * src/metacity.schemas.in: add schemas for the panel and
        screenshot keybindings and the screenshot commands.

        * src/prefs.[ch]: (update_command),
        (meta_prefs_get_gconf_key_for_command): impl special case
        handling for the screenshot commands. They are stored at
        the the end of the commands array but have named keys.
2003-02-24 02:16:09 +00:00
Rob Adams
947adb6d07 change toggle_maximized to toggle_maximize and toggle_shaded to
2003-02-22  Rob Adams <robadams@ucla.edu>

	* *.po: change toggle_maximized to toggle_maximize and
	toggle_shaded to toggle_shade in action_double_click_titlebar long
	description to match the values used by metacity
2003-02-23 19:24:56 +00:00
Rob Adams
d0f1f084e8 change toggle_maximized to toggle_maximize and toggle_shaded to
2003-02-22  Rob Adams <robadams@ucla.edu>

	* src/metacity.schemas.in: change toggle_maximized to
	toggle_maximize and toggle_shaded to toggle_shade in
	action_double_click_titlebar long description to match the values
	used by metacity

	* po/*.po: change toggle_maximized to toggle_maximize and
	toggle_shaded to toggle_shade in action_double_click_titlebar long
	description to match the values used by metacity
2003-02-23 19:21:10 +00:00
Havoc Pennington
c27d89218c Patch from Rob Adams addresses #95014 (placement issues), makes first fit
2003-02-23  Havoc Pennington  <hp@pobox.com>

	Patch from Rob Adams addresses #95014 (placement issues),
	makes first fit algorithm "center tile", adds most code
	for per-xinerama workspaces (#86682) but disables it for now.

	* src/workspace.c (meta_workspace_get_work_area_for_xinerama)
	(meta_workspace_get_work_area_all_xineramas): new xinerama
	functions, maintain workspace->work_areas with a different
	work area for each xinerama. However for now all the work
	areas are the same, because haven't quite figured out how
	_NET_WM_STRUT is supposed to work

	* src/window.c: adapt to new meta_window_* xinerama APIs
	(meta_window_get_work_area_current_xinerama): new xinerama
	API
	(meta_window_get_work_area_for_xinerama): new xinerama API
	(constrain_position): be a bit more clever about which xinerama's
	work area we choose to use.

	* src/stack.c: adapt to new Xinerama API

	* src/screen.c (reload_xinerama_infos): invalidate all work areas
	(meta_screen_get_xinerama_for_rect): new function
	(meta_screen_window_intersects_xinerama): new function

	* src/place.c (find_first_fit): change to use
	"center tiling" (center a screen full of tiled windows,
	rather than aligning them top left). Adapt to new
	xinerama functions.
2003-02-23 17:09:46 +00:00
Rob Adams
15c5ddbec4 change toggle_maximized to toggle_maximize and toggle_shaded to
2003-02-22  Rob Adams <robadams@ucla.edu>

	* src/metacity.schemas.in: change toggle_maximized to
	toggle_maximize and toggle_shaded to toggle_shade in
	action_double_click_titlebar long description to match the values
	used by metacity

	* po/*.po: change toggle_maximized to toggle_maximize and
	toggle_shaded to toggle_shade in action_double_click_titlebar long
	description to match the values used by metacity
2003-02-23 05:18:37 +00:00
Rob Adams
546679cbd1 modify comment to explain why the icon window element is set to None. Fix
2003-02-22  Rob Adams <robadams@ucla.edu>

	* window.c (set_wm_state): modify comment to explain why the icon
	window element is set to None.  Fix for #97357 thanks to Gregory
	Merchan.
2003-02-23 04:56:11 +00:00
Havoc Pennington
b54c422b93 fix a typo, pointed out by Steve Kemp
2003-02-22  Havoc Pennington  <hp@pobox.com>

        * README: fix a typo, pointed out by Steve Kemp
2003-02-23 03:30:48 +00:00
Havoc Pennington
5049fdc13a add system modal dialogs bug to rationales.txt 2003-02-22 22:51:30 +00:00
Havoc Pennington
d8bb7c8ae9 add "configure alt+click" etc. bug 2003-02-22 22:47:15 +00:00
Havoc Pennington
61d5423b5d change max workspaces to 36 #81855
2003-02-22  Havoc Pennington  <hp@pobox.com>

	* src/prefs.c (MAX_REASONABLE_WORKSPACES): change max workspaces
	to 36 #81855
2003-02-22 22:43:13 +00:00
Havoc Pennington
d85012ecfd fix to unfocus window only when you leave the window frame, not when you
2003-02-22  Havoc Pennington  <hp@pobox.com>

	* src/display.c (event_callback): fix to unfocus window only when
	you leave the window frame, not when you leave the window itself,
	unless window has no frame. #100248 fix from Orien Vandenbergh
2003-02-22 22:19:19 +00:00
Havoc Pennington
fb9ad1eb13 when tabbing backward, we are still tabbing *from* the most recently used
2003-02-22  Havoc Pennington  <hp@pobox.com>

	* src/display.c (meta_display_get_tab_next): when tabbing
	backward, we are still tabbing *from* the most recently used
	window, not from the least recently used window.

	* src/keybindings.c (struct _MetaKeyBinding): make keycode
	unsigned to match XEvent

	Patch for #84999 based on patch from Mark McLoughlin

	* src/prefs.c: add an add_shift field to MetaKeyPref to
	add shift when grabbing the given keybinding.

	* src/keybindings.c (rebuild_screen_binding_table)
	(rebuild_window_binding_table): refactor to share code,
	and honor add_shift field in MetaKeyPref
2003-02-22 20:31:51 +00:00
Havoc Pennington
8764b89942 add window size/position popup 2003-02-21 20:21:38 +00:00
Havoc Pennington
48bc82e82f don't create constraints between windows on different screens, #106086
2003-02-20  Havoc Pennington  <hp@redhat.com>

	* src/stack.c (create_constraints): don't create constraints
	between windows on different screens, #106086 tracked down
	by Arvind
2003-02-21 17:51:48 +00:00
Arvind Samptur
e8d63890fc add bug to keep dialogs above entire app group. 2003-02-17 06:12:02 +00:00
Arvind Samptur
6ed08019c2 A small writeup on how to use dialogs in metacity. Approved by Havoc. 2003-02-17 05:00:40 +00:00
Arvind Samptur
00d6f549f9 : Update the workspace names from gconf and set the NET_DESKTOP_NAMES
2003-02-14  Arvind Samptur <arvind.samptur@wipro.com>
        * src/screen.c: (meta_screen_new) : Update the workspace
        names from gconf and set the NET_DESKTOP_NAMES atom.
        Renamed update_workspace_names() to set_workspace_names().
        Fixes #105498
2003-02-14 07:03:46 +00:00
Havoc Pennington
02a491c1bc require GTK+ 2.2.0
2003-02-13  Havoc Pennington  <hp@redhat.com>

	* configure.in: require GTK+ 2.2.0

	* src/ui.c (meta_ui_init): remove hackaround for Pango X core
	fonts backend
2003-02-13 23:16:49 +00:00
Christian Rose
ed25155fc1 Some fixes for problems catched in translation review.
2003-02-12  Christian Rose  <menthos@menthos.com>

	* sv.po: Some fixes for problems catched in translation review.
2003-02-11 23:24:07 +00:00
Fatih Demir
e65a70ded9 Heh 2003-02-10 23:36:34 +00:00
Fatih Demir
3b49b81ff5 Update. branch 2003-02-09 17:01:12 +00:00
Fatih Demir
bdcc6cb20d Updated 2003-02-08 21:37:11 +00:00
Kwok-Koon Cheung
e616f930d3 add missing ALL_LINGUAS 2003-02-05 15:11:46 +00:00
Abel Cheung
536d51183c Fix header. Fix positional parameters.
2003-02-05  Abel Cheung  <maddog@linux.org.hk>

	* en_GB.po: Fix header.
	* ko.po, pt_BR.po: Fix positional parameters.
2003-02-05 15:10:26 +00:00
Abel Cheung
6a3c1fbe57 Updated traditional Chinese translation.
2003-02-05  Abel Cheung  <maddog@linux.org.hk>

	* zh_TW.po: Updated traditional Chinese translation.
2003-02-05 15:06:40 +00:00
Yuri Syrota
2cca0f0eac Updated Ukrainian translation 2003-02-05 08:09:20 +00:00
Akira TAGOH
cdb4e2541c fix a typo and missing option. (#105186)
2003-02-05  Akira TAGOH  <tagoh@gnome.gr.jp>

	* src/main.c (usage): fix a typo and missing option. (#105186)
2003-02-05 04:56:19 +00:00
Havoc Pennington
9b03b75aaf nuke subdir ChangeLog, there can be only one true ChangeLog.
2003-02-04  Havoc Pennington  <hp@redhat.com>

	* src/themes/Simple/ChangeLog: nuke subdir ChangeLog,
	there can be only one true ChangeLog.

2003-01-30  Havoc Pennington  <hp@redhat.com>

	* src/keybindings.c (process_event): match handlers to key events
	using key codes, not key syms
2003-02-05 03:58:17 +00:00
Daniel Yacob
f5072b7f3a Updating Amharic translation. 2003-02-03 17:40:01 +00:00
Jonathan Blandford
b60bb724aa add Simple to the list of themes.
Thu Jan 30 22:55:16 2003  Jonathan Blandford  <jrb@redhat.com>

	* src/themes/Makefile.am (THEMES): add Simple to the list of
	themes.

	* src/metacity.schemas.in: change default theme to Simple.
2003-01-31 03:57:01 +00:00
Seth Nickell
7d7f8aab93 Change name in theme file to "Simple".
2003-01-30  Seth Nickell  <snickell@stanford.edu>

	* metacity-theme-1.xml:

	Change name in theme file to "Simple".
2003-01-31 03:44:05 +00:00
Marius Andreiana
3b133195fd updated ( thanks to Mugurel Tudor )
2003-01-30  Marius Andreiana <marius galuna.ro>

	* ro.po: updated ( thanks to Mugurel Tudor )
2003-01-30 12:38:14 +00:00
Havoc Pennington
18990530b0 don't create workspaces menu items if only 1 workspace. Fix for #101952
2003-01-29  Havoc Pennington  <hp@pobox.com>

	* src/menu.c (meta_window_menu_new): don't create workspaces
	menu items if only 1 workspace. Fix for #101952 from
	Orien Vandenbergh
2003-01-29 05:22:19 +00:00
Bill Haneman
b424364710 Reinstated visual-bell patch, fix for bug 99886. 2003-01-28 15:07:43 +00:00
Christophe Merlet
4fb05e54ab Updated French translation. 2003-01-25 22:04:53 +00:00
Christophe Merlet
3ee5ad8b12 Updated french translation. 2003-01-25 21:57:01 +00:00
Havoc Pennington
b73ea5eb0a When checking if a window is fullscreen size, only require it to be at the
2003-01-25  Havoc Pennington  <hp@pobox.com>

	* src/stack.c (window_is_fullscreen_size): When checking if a
	window is fullscreen size, only require it to be at the origin
	of the work area, not at the origin of the screen/xinerama.
	Still require it to be full screen in width x height.
	May fix xine in the case where the user has a top panel.

	* src/window.c (constrain_position): restore the ability for
	undecorated windows to position themselves overlapping the top
	panel, but don't let decorated windows do so. Oh the hacks...
2003-01-25 16:58:43 +00:00
Kjartan Maraas
e710d9f1b8 Updated Norwegian (bokmal) translation.
2003-01-25  Kjartan Maraas  <kmaraas@gnome.org>

	* no.po: Updated Norwegian (bokmal) translation.
2003-01-25 08:56:51 +00:00
He Qiangqiang
ae07c8677d Updated Simplified Chinese translation by Xiong Jiang
2003-01-23  He Qiangqiang  <carton@linux.net.cn>

        * zh_CN.po: Updated Simplified Chinese translation by
        Xiong Jiang <jxiong@offtopic.org>.
2003-01-23 15:05:31 +00:00
Dmitry Mastrukov
2a24562f45 ru.po: Updated Russian translation from Russian team <gnome-cyr@gnome.org>. 2003-01-23 09:32:32 +00:00
Abel Cheung
b7d27d9114 Updated traditional Chinese translation.
2003-01-23  Abel Cheung  <maddog@linux.org.hk>

	* zh_TW.po: Updated traditional Chinese translation.
2003-01-23 03:53:18 +00:00
Havoc Pennington
5169a06dd0 small code snippet to fix startup sequences that set legacy class/name
2003-01-08  Havoc Pennington  <hp@pobox.com>

	* src/screen.c (meta_screen_apply_startup_properties): small code
	snippet to fix startup sequences that set legacy class/name
2003-01-23 01:53:18 +00:00
Havoc Pennington
e868a001f9 do not read sizeof(long) off the X connection. The X protocol does not
2003-01-22  Havoc Pennington  <hp@redhat.com>

	* src/async-getprop.c (async_get_property_handler): do not read
	sizeof(long) off the X connection. The X protocol does not vary
	by architecture. Fixes longstanding hang on all 64-bit platforms.
2003-01-22 23:13:24 +00:00
Havoc Pennington
a8526454b0 fix conditional so we get metacity-properties.c in the distribution
2003-01-22  Havoc Pennington  <hp@redhat.com>

	* src/tools/Makefile.am: fix conditional so we get
	metacity-properties.c in the distribution #103071
2003-01-22 19:40:04 +00:00
Havoc Pennington
fabc5507f3 be robust against the panel's lame "set a negative number for struts"
2003-01-22  Havoc Pennington  <hp@pobox.com>

	* src/window.c (update_struts): be robust against the panel's
	lame "set a negative number for struts" thing, even though
	we'll also fix the panel.
2003-01-22 05:17:29 +00:00
Havoc Pennington
82bd20911c Fix for the "mangles focus window when switching workspaces and using
2003-01-21  Havoc Pennington  <hp@pobox.com>

        Fix for the "mangles focus window when switching workspaces
	and using mouse focus" bug

	* src/stack.c (meta_stack_get_default_focus_window_at_point): new
	function

	* src/screen.c (meta_screen_focus_mouse_window): new function
	(meta_screen_focus_default_window): new function

	* src/workspace.c (meta_workspace_activate): use the
	new meta_screen_focus_default_window()

2003-01-17  Havoc Pennington  <hp@pobox.com>

	* src/window.c (meta_window_handle_mouse_grab_op_event): fix event
	compression code to use GDK algorithm suggested by Owen, should be
	more efficient.
2003-01-22 04:54:04 +00:00
Christian Rose
95d747269b Added "mn" to ALL_LINGUAS. Added Mongolian translation by Ochirbat Batzaya
2003-01-22  Christian Rose  <menthos@menthos.com>

	* configure.in: Added "mn" to ALL_LINGUAS.
	* po/mn.po: Added Mongolian translation by
	Ochirbat Batzaya <buuvei@yahoo.com>.
2003-01-22 02:36:57 +00:00
Havoc Pennington
d02dbd62e9 only hop window to the current workspace if the window was previously
2003-01-21  Havoc Pennington  <hp@redhat.com>

	* src/display.c (event_callback): only hop window to the current
	workspace if the window was previously minimized. Should keep
	mozilla from popping windows over to your current workspace.

2003-01-20  Havoc Pennington  <hp@redhat.com>

        Attempt to fix #85916

	* src/keybindings.c (primary_modifier_still_pressed): new function
	(handle_workspace_switch): handle modifier release prior to
	getting the grab
	(do_choose_window): handle modifier release prior to getting the
	grab

	* src/keybindings.c (grab_keyboard): properly return failure
	if the GrabKeyboard doesn't work
2003-01-21 22:40:25 +00:00
Dmitry Mastrukov
bcb9de9198 ru.po: Updated Russian translation from Russian team <gnome-cyr@gnome.org>. 2003-01-21 14:24:58 +00:00
Yuri Syrota
3558657e53 Updated Ukrainian translation 2003-01-21 12:03:35 +00:00
Kjartan Maraas
1187edeadb Updated Norwegian (bokmal) translation.
2003-01-21  Kjartan Maraas  <kmaraas@gnome.org>

	* no.po: Updated Norwegian (bokmal) translation.
2003-01-21 10:44:02 +00:00
Christian Neumair
0c684c6f35 Updated German translation. 2003-01-20 16:04:12 +00:00
Dmitry Mastrukov
c1b863ee75 ru.po: Updated Russian translation from Russian team <gnome-cyr@gnome.org>. 2003-01-20 11:32:45 +00:00
Dmitry Mastrukov
8922b0ecc6 ru.po: Updated Russian translation from Russian team <gnome-cyr@gnome.org>. 2003-01-20 10:05:14 +00:00
Dmitry Mastrukov
6cd916ea39 ru.po: Updated Russian translation from Russian team <gnome-cyr@gnome.org>. 2003-01-20 09:18:01 +00:00
Havoc Pennington
4b18f64914 add note about how this is the unstable branch, set version to 2.5.0
2003-01-19  Havoc Pennington  <hp@pobox.com>

	* configure.in: add note about how this is the unstable branch,
	set version to 2.5.0
2003-01-19 23:07:30 +00:00
Abel Cheung
1e6a8a31d1 Updated traditional Chinese translation, and replaced copyright symbol
2003-01-19  Abel Cheung  <maddog@linux.org.hk>

	* zh_TW.po: Updated traditional Chinese translation, and replaced
	  copyright symbol with correct one.
2003-01-19 21:21:34 +00:00
Andraz Tori
9e7a26500c Updated Slovenian translation 2003-01-19 13:43:05 +00:00
Andraz Tori
5d862ac29b Added sl to ALL_LINGUAS 2003-01-19 13:42:41 +00:00
Gustavo Noronha Silva
25b9a9e37d translation update 2003-01-17 04:00:55 +00:00
Seth Nickell
da7918554e First checkin. 2003-01-17 00:19:24 +00:00
Seth Nickell
e45eda148b Initial revision 2003-01-17 00:19:24 +00:00
Vincent van Adrighem
b24308eab1 Dutch translation updated by Tino Meinen.
2003-01-16  Vincent van Adrighem  <V.vanAdrighem@dirck.mine.nu>

	* nl.po: Dutch translation updated by Tino Meinen.
2003-01-16 22:52:21 +00:00
Vincent van Adrighem
366399eb0c Dutch translation updated by Tino Meinen.
2003-01-16  Vincent van Adrighem  <V.vanAdrighem@dirck.mine.nu>

	* nl.po: Dutch translation updated by Tino Meinen.
2003-01-16 17:16:44 +00:00
Havoc Pennington
25615f929e recalc_window_features() after making these changes, should fix #103317
2003-01-14  Havoc Pennington  <hp@pobox.com>

	* src/window.c (meta_window_maximize, meta_window_unmaximize)
	(meta_window_make_fullscreen, meta_window_unmake_fullscreen):
	recalc_window_features() after making these changes, should fix
	#103317
2003-01-16 03:20:34 +00:00
Rob Adams
667a056066 Increase the number of run_command bindings in screen_bindings from 12 to
2003-01-14  Rob Adams <robadams@ucla.edu>

	* src/prefs.c: Increase the number of run_command bindings in
	screen_bindings from 12 to 32.

	* src/prefs.h: Increase the number of META_KEYBINDING_COMMAND_N
	macros from 12 to 32.

	* src/keybindings.c: Increase the number of run_command handlers
	from 12 to 32.
2003-01-15 02:39:07 +00:00
Yanko Kaneti
c2fbb37c8c Full Bulgarian translation by Alexander Shopov <al_shopov@yahoo.com>.
2003-01-14  Yanko Kaneti <yaneti@declera.com>

	* bg.po: Full Bulgarian translation by
	Alexander Shopov <al_shopov@yahoo.com>.
2003-01-15 00:18:41 +00:00
Daniel Yacob
45269e0e2d Updating Amharic translation. 2003-01-14 17:33:31 +00:00
Havoc Pennington
8f7eda43a8 implement compression of motion events (drop all but the most recently
2003-01-11  Havoc Pennington  <hp@pobox.com>

	* src/window.c (meta_window_handle_mouse_grab_op_event): implement
	compression of motion events (drop all but the most recently
	received), guessing at fixes for #103009
2003-01-11 19:32:12 +00:00
Havoc Pennington
339a86150b add ability to --disable-shape
2003-01-11  Havoc Pennington  <hp@pobox.com>

	* configure.in: add ability to --disable-shape
2003-01-11 18:09:12 +00:00
Kjartan Maraas
374e5d400d Updated Norwegian (bokmal) translation.
2003-01-11  Kjartan Maraas  <kmaraas@gnome.org>

	* no.po: Updated Norwegian (bokmal) translation.
2003-01-11 15:51:52 +00:00
Akira TAGOH
0e5727eeb3 fix the behavior of --enable-*.
2003-01-11  Akira TAGOH  <tagoh@gnome.gr.jp>

	* configure.in: fix the behavior of --enable-*.
2003-01-11 09:32:31 +00:00
Havoc Pennington
9073724c2b revert that change, I got the wrong .desktop file. doh.
2003-01-10  Havoc Pennington  <hp@redhat.com>

	* src/Makefile.am (desktopfiles_in_files): revert that change, I
	got the wrong .desktop file. doh.
2003-01-10 20:45:34 +00:00
Havoc Pennington
92c8ba0497 don't install .desktop file for properties dialog if we aren't
2003-01-10  Havoc Pennington  <hp@redhat.com>

	* src/Makefile.am (desktopfiles_DATA): don't install .desktop file
	for properties dialog if we aren't building/installing the
	properties dialog.
2003-01-10 20:43:47 +00:00
Vincent van Adrighem
efb26cb769 Dutch translation updated by Tino Meinen.
2003-01-10  Vincent van Adrighem  <V.vanAdrighem@dirck.mine.nu>

	* nl.po: Dutch translation updated by Tino Meinen.
2003-01-10 16:18:19 +00:00
Andras Timar
050e55c9d7 Updated Hungarian translation.
2003-01-10  Andras Timar  <timar@gnome.hu>

	* hu.po: Updated Hungarian translation.
2003-01-10 13:59:37 +00:00
Yukihiro Nakai
e402f41b33 ja.po: Minor fix. 2003-01-10 05:19:49 +00:00
Havoc Pennington
859c1e752d 2.4.13 2003-01-10 05:02:20 +00:00
James M. Cape
198398ba88 Use a line for the titlebar text bg.
2003-01-09  James M. Cape  <jcape@ignore-your.tv>

	* src/themes/Esco/metacity-theme-1.xml: Use a line for the titlebar
	text bg.
2003-01-10 02:00:21 +00:00
Havoc Pennington
5d2f307735 argh, we were making all dialogs skip taskbar; when did that get added.
2003-01-09  Havoc Pennington  <hp@redhat.com>

	* src/window.c (recalc_window_features): argh, we were making all
	dialogs skip taskbar; when did that get added.  Fix to match
	libwnck, only skip taskbar when the dialog is transient for some
	other app window.
2003-01-09 23:28:01 +00:00
Havoc Pennington
70bd23278b change Windows+click back to Alt+click, Windows+click just surprised
2003-01-09  Havoc Pennington  <hp@redhat.com>

	* src/metacity.schemas.in: change Windows+click back to Alt+click,
	Windows+click just surprised everybody and didn't work half the
	time. Maya users can configure it, and GTK DND can change its
	default.
2003-01-09 22:48:07 +00:00
Vincent van Adrighem
76bfdcf038 Dutch translation updated by Tino Meinen.
2003-01-09  Vincent van Adrighem  <V.vanAdrighem@dirck.mine.nu>

	* nl.po: Dutch translation updated by Tino Meinen.
2003-01-09 12:44:17 +00:00
Havoc Pennington
8e14da1759 assign Alt+F12 to shade window, per #102658
2003-01-08  Havoc Pennington  <hp@pobox.com>

	* src/metacity.schemas.in: assign Alt+F12 to shade window,
	per #102658
2003-01-09 04:50:13 +00:00
Pauli Virtanen
24ecc29f49 Fixed a string that had an invalid printf format.
2003-01-08  Pauli Virtanen  <pauli.virtanen@hut.fi>

	* fi.po: Fixed a string that had an invalid printf format.
2003-01-08 20:55:26 +00:00
Abel Cheung
4a23782f51 Updated traditional Chinese translation.
2003-01-09  Abel Cheung  <maddog@linux.org.hk>

	* zh_TW.po: Updated traditional Chinese translation.
2003-01-08 20:47:44 +00:00
Havoc Pennington
b619f9baa8 fix off-by-one, patch from readams@hmc.edu, #102806
2003-01-07  Havoc Pennington  <hp@pobox.com>

	* src/screen.c (update_num_workspaces): fix off-by-one, patch from
	readams@hmc.edu, #102806
2003-01-08 04:23:18 +00:00
Daniel Yacob
878d6df404 Updated Amharic translation. 2003-01-07 16:09:06 +00:00
Vincent van Adrighem
5e5ebc7914 Dutch translation added by Tino Meinen.
2003-01-06  Vincent van Adrighem  <V.vanAdrighem@dirck.mine.nu>

	* nl.po: Dutch translation added by Tino Meinen.
2003-01-06 11:05:37 +00:00
Arvind Samptur
e2155c8fee don't apply offscreen height difference. This would get the window under
2003-01-06  Arvind Samptur <arvind.samptur@wipro.com>
        * src/window.c: (constrain_position) don't apply
        offscreen height difference. This would get the
        window under the panel on a resize or a move.
        Fixes #102418
2003-01-06 04:40:11 +00:00
Havoc Pennington
036747fba5 invert vertical_workspaces cases (we want to go down each column if it's
2003-01-05  Havoc Pennington  <hp@pobox.com>

	* src/screen.c (meta_screen_calc_workspace_layout): invert
	vertical_workspaces cases (we want to go down each column if
	it's vertical, and across each row if horizontal). Patch
	from readams@hmc.edu
2003-01-06 02:59:19 +00:00
Pablo Saratxaga
a8f93c454a updated Vietnamese file,
fixed various erros in Brazilian file,
added missing 'mk' to ALL_LINGUAS
2003-01-05 22:43:41 +00:00
Havoc Pennington
aad72e575d put in the HAVE_GTK_MULTIHEAD conditionals so we build with GTK 2.0
2003-01-05  Havoc Pennington  <hp@pobox.com>

	* src/frames.c (meta_frames_apply_shapes): put in the
	HAVE_GTK_MULTIHEAD conditionals so we build with GTK 2.0
2003-01-05 19:15:58 +00:00
Havoc Pennington
b799630ba5 focus new windows even in mouse focus mode, #89981, patch from
2003-01-05  Havoc Pennington  <hp@pobox.com>

	* src/window.c (meta_window_show): focus new windows even in
	mouse focus mode, #89981, patch from readams@hmc.edu
2003-01-05 18:39:55 +00:00
Havoc Pennington
90748385c2 redo using new calc_workspace_layout to fix #98302
2003-01-05  Havoc Pennington  <hp@pobox.com>

	* src/workspace.c (meta_workspace_get_neighbor): redo using new
	calc_workspace_layout to fix #98302

	* src/util.c (topic_name): shorten default prefix

	* src/screen.c (meta_screen_calc_workspace_layout): enhance this
	to handle all the funky layouts and calculate more information
	than before
2003-01-05 18:36:01 +00:00
Pauli Virtanen
1d22cb8518 Added "fi" (Finnish).
2003-01-05  Pauli Virtanen <pauli.virtanen@hut.fi>

	* configure.in (ALL_LINGUAS): Added "fi" (Finnish).
2003-01-05 16:03:10 +00:00
Pauli Virtanen
4832cc6d63 Added Finnish translation.
2003-01-05  Pauli Virtanen <pauli.virtanen@hut.fi>

	* fi.po: Added Finnish translation.
2003-01-05 15:59:59 +00:00
Stanislav Visnovsky
f8226bf1bb Updated Slovak translation.
2003-01-05  Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>

	* sk.po: Updated Slovak translation.
2003-01-05 13:26:31 +00:00
Havoc Pennington
6cfcc01334 handle the client having a shape mask, fixes #101806
2003-01-05  Havoc Pennington  <hp@pobox.com>

	* src/frames.c (meta_frames_apply_shapes): handle
	the client having a shape mask, fixes #101806

	* src/core.c (meta_core_get_client_xwindow): new function

	* src/frame.c, src/frame.h: keep a flag for whether we need to
	update the frame shape

	* src/window.c (meta_window_new): select for ShapeNotify

	* src/display.h, src/display.c: actually query the shape
	extension, instead of just using it all over the place.

	* src/prefs.c (update_application_based): don't let people turn on
	application_based, as it just causes funky bugs. We can reenable
	the pref when/if it ever does something useful.
2003-01-05 07:51:02 +00:00
Havoc Pennington
f8b2f6ca5c include the Xrandr header file
2003-01-03  Havoc Pennington  <hp@redhat.com>

	* src/display.c: include the Xrandr header file

	* src/window.c (meta_window_fill_horizontal)
	(meta_window_fill_vertical): maximize to work area, not entire
	screen. doh.
2003-01-03 19:06:53 +00:00
Kjartan Maraas
d9a2207ebe Updated Norwegian (bokmal) translation.
2003-01-03  Kjartan Maraas  <kmaraas@gnome.org>

	* no.po: Updated Norwegian (bokmal) translation.
2003-01-03 14:53:11 +00:00
Gil Osher
1be097628f *** empty log message *** 2003-01-03 13:59:04 +00:00
Chyla Zbigniew
c51a55b0e5 Updated Polish translation by GNOME PL Team <translators@gnome.pl> 2003-01-02 14:38:16 +00:00
Daniel Yacob
f88852cff6 Updating Amharic translation. 2002-12-30 13:56:14 +00:00
Kostas Papadimas
8d266f5550 Updated the Greek translation 2002-12-29 16:12:07 +00:00
Ole Laursen
b9e86197f2 Updated Danish translation.
2002-12-25  Ole Laursen  <olau@hardworking.dk>

	* da.po: Updated Danish translation.
2002-12-25 17:35:41 +00:00
Ivan Stojmirov
b9e4faa1aa Added Macedonian translation 2002-12-25 11:35:21 +00:00
Kostas Papadimas
625b7a25b0 Updated the Greek translation 2002-12-25 09:54:58 +00:00
Yuri Syrota
0e6b393896 Updated Ukrainian translation 2002-12-24 11:26:22 +00:00
Yuri Syrota
109761e973 Updated Ukrainian translation 2002-12-24 10:11:16 +00:00
Yuri Syrota
fd5557f44c Updated Ukrainian translation 2002-12-24 08:41:31 +00:00
Ross Burton
79d28b4709 DTD fixes 2002-12-23 11:31:24 +00:00
Daniel Yacob
5cf84e6702 Updated Amharic translation. 2002-12-23 03:40:00 +00:00
Peteris Krisjanis
f218216a2c 2002-12-22 Artis Trops <hornet@navigator.lv> * lv.po: Updated Latvian translation. 2002-12-22 18:20:25 +00:00
Daniel Yacob
5f99b61f07 Updated Amharic translation. 2002-12-22 04:42:16 +00:00
Christian Neumair
a5fa06ebb1 Updated German translation. 2002-12-20 20:49:51 +00:00
Miloslav Trmac
a0d3c8e20b Update Czech translation 2002-12-20 12:15:17 +00:00
Havoc Pennington
1ece207400 Reverted visual bell patch, #99886
2002-12-19  Havoc Pennington  <hp@pobox.com>

	* Reverted visual bell patch, #99886
2002-12-19 20:20:59 +00:00
Havoc Pennington
91641c2cf3 select ColormapChangeMask on toplevel windows, maybe a partial fix for
2002-12-18  Havoc Pennington  <hp@redhat.com>

	* src/window.c (meta_window_new): select ColormapChangeMask
	on toplevel windows, maybe a partial fix for #101478

2002-12-17  Havoc Pennington  <hp@pobox.com>

	* src/display.c (meta_display_begin_grab_op): don't use "(null)"
	for null pointers, use "none", so I can distinguish
	glibc-generated (null) which is a bug.
	(key_event_description): ditto
	(meta_display_begin_grab_op): ditto

	* src/window.c (update_sm_hints): ditto

	* src/keybindings.c (reload_modmap): ditto
	(meta_display_process_key_event): ditto
2002-12-19 20:18:54 +00:00
Hasbullah Bin Pit
4045ee474d Updated Malay Translation. pening kepala tengok metacity ni
002-12-19  Hasbullah Bin Pit <sebol@ikhlas.com>

        * ms.po: Updated Malay Translation.
pening kepala tengok metacity ni
2002-12-19 15:52:48 +00:00
Yanko Kaneti
e3b364c055 Added Bulgarian (bg).
2002-12-19  Yanko Kaneti <yaneti@declera.com>

	* configure.in: (ALL_LINGUAS) Added Bulgarian (bg).

po/

	* bg.po (added): Added start of Bulgarian translation by
	Alexander Shopov <al_shopov@yahoo.com>.
2002-12-19 12:50:54 +00:00
Havoc Pennington
89c31c43ca select ColormapChangeMask on toplevel windows, maybe a partial fix for
2002-12-18  Havoc Pennington  <hp@redhat.com>

	* src/window.c (meta_window_new): select ColormapChangeMask
	on toplevel windows, maybe a partial fix for #101478
2002-12-18 22:16:58 +00:00
Pablo Gonzalo del Campo
0d1e643e1c Updated Spanish translation.
2002-12-18  Pablo Gonzalo del Campo <pablodc@bigfoot.com>

	* es.po: Updated Spanish translation.
2002-12-18 16:28:41 +00:00
Hidetoshi Tajima
f6b4f11ebe added support for border only windows. #100984.
* src/themes/AgingGorilla/metacity-theme-1.xml: added support for
	border only windows. #100984.
2002-12-18 01:51:35 +00:00
Havoc Pennington
908198c25d s/focussed/focused/
2002-12-17  Havoc Pennington  <hp@pobox.com>

	* src/metacity.schemas.in: s/focussed/focused/
2002-12-17 18:36:24 +00:00
Havoc Pennington
f4cb740aac add a comma to message #101401
2002-12-17  Havoc Pennington  <hp@pobox.com>

	* src/xprops.c (validate_or_free_results): add a comma to message #101401
2002-12-17 18:26:08 +00:00
Miloslav Trmac
a2d0235d68 Update Czech translation 2002-12-17 13:36:19 +00:00
Christian Rose
bda692174a Updated Swedish translation.
2002-12-17  Christian Rose  <menthos@menthos.com>

	* sv.po: Updated Swedish translation.
2002-12-17 08:45:14 +00:00
Bill Haneman
e7e47a8b85 Added visual bell feature, fix for 99886. 2002-12-17 01:08:29 +00:00
Christian Rose
32a8bf50b7 Updated Swedish translation.
2002-12-17  Christian Rose  <menthos@menthos.com>

	* sv.po: Updated Swedish translation.
2002-12-17 01:04:18 +00:00
Christian Neumair
b0818f97f2 Updated German translation. 2002-12-16 23:07:10 +00:00
Havoc Pennington
ea45e43082 argh, screwed that up. get WM_NAME as VALUE_TEXT_PROPERTY #101383
2002-12-16  Havoc Pennington  <hp@pobox.com>

	* src/window-props.c (init_wm_name): argh, screwed that up. get
	WM_NAME as VALUE_TEXT_PROPERTY #101383
2002-12-16 22:09:05 +00:00
Havoc Pennington
1ad94dec1c use META_PROP_VALUE_STRING_AS_UTF8 so we convert old Latin-1 WM_NAME to
2002-12-16  Havoc Pennington  <hp@pobox.com>

	* src/window-props.c: use META_PROP_VALUE_STRING_AS_UTF8 so
	we convert old Latin-1 WM_NAME to UTF-8

	* src/xprops.h (enum): add META_PROP_VALUE_STRING_AS_UTF8 to get a
	latin1 string then convert.
2002-12-16 22:01:15 +00:00
Miloslav Trmac
995aef2577 Update Czech translation 2002-12-16 19:31:40 +00:00
Ole Laursen
5817e204b4 Updated Danish translation.
2002-12-16  Ole Laursen  <olau@hardworking.dk>

	* da.po: Updated Danish translation.
2002-12-16 16:30:52 +00:00
Daniel Yacob
50b5a2b8d8 Adding am to LINGUAS. 2002-12-16 14:33:27 +00:00
Havoc Pennington
8a9a4aba77 get window name before anything else.
2002-12-15  Havoc Pennington  <hp@pobox.com>

	* src/window.c (meta_window_new): get window name before anything
	else.

	* src/xprops.c (validate_or_free_results): instead of suggesting
	how to get window title etc. with xprop, just print out the
	window title. much better.
2002-12-15 21:59:38 +00:00
Havoc Pennington
4ad2d1a048 make the warning about strange property contents blame the application and
2002-12-15  Havoc Pennington  <hp@pobox.com>

	* src/xprops.c (validate_or_free_results): make the warning about
	strange property contents blame the application and explain how to
	use xprop to diagnose which app is causing the problem.
2002-12-15 18:55:08 +00:00
Havoc Pennington
07296490b4 don't pass NULL string to gconf_client_set_string #101237
2002-12-15  Havoc Pennington  <hp@pobox.com>

	* src/prefs.c (meta_prefs_change_workspace_name): don't pass NULL
	string to gconf_client_set_string #101237
2002-12-15 18:51:29 +00:00
Kjartan Maraas
d3b2764ff6 Updated Norwegian (bokmål) translation.
2002-12-14  Kjartan Maraas  <kmaraas@gnome.org>

	* no.po: Updated Norwegian (bokmål) translation.
2002-12-14 21:03:01 +00:00
Daniel Yacob
6c51b8ae6a For real this time. 2002-12-14 04:23:37 +00:00
Daniel Yacob
4fdc3667a3 Adding Amharic translation. 2002-12-14 04:23:16 +00:00
Havoc Pennington
fd8c3514d6 only install .desktop file for metacity-properties if we actually install
2002-12-13  Havoc Pennington  <hp@redhat.com>

	* src/tools/Makefile.am (Desktop_in_files): only install .desktop
	file for metacity-properties if we actually install
	metacity-properties

	* src/display.c (event_callback): not focusing on button 2 click
	was crack, revert that change.
2002-12-13 22:20:31 +00:00
Christian Rose
c2700863ca Updated Swedish translation.
2002-12-13  Christian Rose  <menthos@menthos.com>

	* sv.po: Updated Swedish translation.
2002-12-13 03:59:56 +00:00
Ole Laursen
18d32248ab Updated Danish translation.
2002-12-12  Ole Laursen  <olau@hardworking.dk>

	* da.po: Updated Danish translation.
2002-12-12 20:15:01 +00:00
Christian Neumair
d8a59d7cd1 Updated German translation, added src/tools/metacity-message.c to
POTFILES.in.
2002-12-11 17:07:08 +00:00
Evandro Fernandes Giovanini
4213beea4b Updated Brazilian Portuguese translation.
2002-12-11  Evandro Fernandes Giovanini <evandrofg@ig.com.br>

        * pt_BR.po: Updated Brazilian Portuguese translation.
2002-12-11 03:41:20 +00:00
Havoc Pennington
967777b965 add myself here, bug #100789
2002-12-09  Havoc Pennington  <hp@pobox.com>

	* AUTHORS: add myself here, bug #100789

	* src/display.c (meta_display_set_grab_op_cursor): drop
	PointerMotionHintMask

	* src/window.c (meta_window_handle_mouse_grab_op_event): don't use
	XQueryPointer, as we aren't using PointerMotionHint now

	* src/display.c (event_callback): rearrange a bit of code
	for slight speedup and clarity

	* src/window.c (update_resize)
	(meta_window_handle_mouse_grab_op_event): implement
	usage of the _METACITY_UPDATE_COUNTER
	(meta_window_handle_mouse_grab_op_event): fix code that
	used event->xbutton with a motion event

	* src/display.c (meta_display_open): add new atoms, and
	initialize Xsync if we have it
	(grab_op_is_resizing): new function
	(meta_display_begin_grab_op): create an alarm monitoring
	window's _METACITY_UPDATE_COUNTER
	(meta_spew_event): conditionalize this on WITH_VERBOSE_MODE
	and print alarm events.

	* src/window.c (meta_window_new): fetch _METACITY_UPDATE_COUNTER

	* configure.in (HAVE_XSYNC): check for Xsync extension
2002-12-10 03:23:04 +00:00
Soeren Sandmann
ba18c630b7 Handle crossing events during resizing. (#93384).
Mon Dec  9 22:09:56 2002  Soeren Sandmann  <sandmann@daimi.au.dk>

	* src/display.c, src/window.c: Handle crossing events during
	resizing. (#93384).
2002-12-09 21:07:27 +00:00
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
Havoc Pennington
817c357335 2.4.3 2002-10-29 06:31:54 +00:00
Ole Laursen
f5bf830754 Updated Danish translation.
2002-10-28  Ole Laursen  <olau@hardworking.dk>

	* da.po: Updated Danish translation.
2002-10-28 21:57:19 +00:00
Havoc Pennington
b3a1122b2a use meta_prop_get_size_hints
2002-10-28  Havoc Pennington  <hp@redhat.com>

	* src/window.c (update_size_hints): use meta_prop_get_size_hints

	* src/xprops.c: add support for getting XSizeHints
2002-10-28 20:22:22 +00:00
Peteris Krisjanis
c7d9042e5d 2002-10-28 Peteris Krisjanis <peteris.krisjanis@os.lv> * lv.po: Updated Latvian translation 2002-10-28 14:08:21 +00:00
Peteris Krisjanis
4512f8317a 2002-10-28 Peteris Krisjanis <peteris.krisjanis@os.lv> Updated Latvian translation 2002-10-28 14:08:15 +00:00
Havoc Pennington
effec94613 store the window menu on the display and blow it away when a window
2002-10-28  Havoc Pennington  <hp@pobox.com>

	* src/window.c, src/display.c: store the window menu on the
	display and blow it away when a window closes, so we don't
	get funny stuck menus. Patch from Martin Garton #87514
2002-10-28 05:35:30 +00:00
Anders Carlsson
c9c67387ce Make XRandr detection work better.
2002-10-27  Anders Carlsson  <andersca@gnu.org>

	* configure.in: Make XRandr detection work better.
2002-10-27 15:15:27 +00:00
Havoc Pennington
81089c2d8c move meta_window_shutdown_group() much earlier in the destroy process. May
2002-10-27  Havoc Pennington  <hp@pobox.com>

	* src/window.c (meta_window_free): move
	meta_window_shutdown_group() much earlier in the destroy process.
	May fix #96928 tracked down by Kjartan Maraas and Martin Garton.

	* src/group.c (meta_window_get_group): never add window to a group
	after we've started unmanaging the window
2002-10-27 14:45:29 +00:00
Havoc Pennington
04c9c3e058 include config.h
2002-10-26  Havoc Pennington  <hp@pobox.com>

	* src/iconcache.c: include config.h

	* src/group.c: include config.h

	* src/frame.c: include config.h

	* src/core.c: include config.h so it doesn't crash all over the
	place due to #ifdef HAVE_STARTUP_NOTIFICATION

	* src/util.c (meta_print_backtrace): export from this file

	* src/main.c (log_handler): print backtrace here
2002-10-27 03:03:32 +00:00
Havoc Pennington
4d5cc9d0bb make windows randomly transient for each other
2002-10-26  Havoc Pennington  <hp@pobox.com>

	* src/wm-tester/main.c (evil_timeout): make windows randomly
	transient for each other http://bugzilla.gnome.org/show_bug.cgi?id=96928
2002-10-26 21:56:50 +00:00
Havoc Pennington
0d88e93787 new function (meta_prop_get_wm_hints): new function
2002-10-26  Havoc Pennington  <hp@pobox.com>

	* src/xprops.c (meta_prop_get_text_property): new function
	(meta_prop_get_wm_hints): new function
	(meta_prop_get_class_hint): new function
2002-10-26 16:40:50 +00:00
Havoc Pennington
5a8af8c2fb use multi-value-get on a couple of properties for testing
2002-10-26  Havoc Pennington  <hp@pobox.com>

	* src/window.c (meta_window_new): use multi-value-get on a couple
	of properties for testing

	* src/xprops.c (meta_prop_get_values): implement multi-value-get

	* src/window.c (update_mwm_hints): XFree motif hints as we changed
	it to use Xmalloc

	* src/xprops.c: massively rework this to set up a
	get-multiple-properties-at-once API.

	* src/async-getprop.c (ag_Xmalloc): new function
2002-10-26 07:37:11 +00:00
Havoc Pennington
e8097a6f8f fix build 2002-10-26 01:49:03 +00:00
Havoc Pennington
cb27f0c4be Add "busy cursor on app startup" support, conditionally - works only if
2002-10-25  Havoc Pennington  <hp@pobox.com>

        Add "busy cursor on app startup" support, conditionally - works
	only if libstartup-notification is found, and in practice requires
	a GTK patch that's not in yet.

	* src/screen.c: monitor startup events and set busy cursor if
	appropriate

	* src/display.c (meta_display_open): create SnDisplay

	* configure.in: check for startup notification,
	and add the cute "configure summary" at the end
2002-10-25 23:35:50 +00:00
Havoc Pennington
c3a5c4c169 if only one right-corner button, use right_right_background not
2002-10-24  Havoc Pennington  <hp@redhat.com>

	* src/theme.c (meta_frame_layout_calc_geometry): if only one
	right-corner button, use right_right_background not
	right_left_background
2002-10-24 20:47:19 +00:00
Christian Rose
bc46b2f0e0 Added missing file. Updated Swedish translation.
2002-10-24  Christian Rose  <menthos@menthos.com>

	* POTFILES.in: Added missing file.
	* sv.po: Updated Swedish translation.
2002-10-24 19:15:19 +00:00
Pablo Saratxaga
ce657d7807 updated Vietnamese file 2002-10-24 09:25:30 +00:00
Havoc Pennington
9702903343 make public
2002-10-24  Havoc Pennington  <hp@pobox.com>

	* src/window.c (meta_window_get_icon_geometry): make public

	* src/screen.c (meta_screen_ensure_tab_popup): put the alt+tab
	highlight-window indicator on the icon, not the window itself,
	if the window is minimized.
2002-10-24 05:21:51 +00:00
Havoc Pennington
15a05467bd put minimized windows at the end of Alt+Tab, #89416
2002-10-24  Havoc Pennington  <hp@pobox.com>

	* src/display.c (meta_display_get_tab_list): put minimized windows
	at the end of Alt+Tab, #89416
2002-10-24 05:15:28 +00:00
Havoc Pennington
0041f49d3f initialize the left button background rectangles.
2002-10-23  Havoc Pennington  <hp@redhat.com>

	* src/theme.c (meta_frame_layout_calc_geometry): initialize the
	left button background rectangles.
2002-10-23 19:46:44 +00:00
Ole Laursen
0cfb05a661 Updated Danish translation.
2002-10-22  Ole Laursen  <olau@hardworking.dk>

	* da.po: Updated Danish translation.
2002-10-22 18:06:27 +00:00
Havoc Pennington
c6b475b251 Optimizations for managing new windows (do not all take effect if
2002-10-21  Havoc Pennington  <hp@redhat.com>

	Optimizations for managing new windows (do not all take effect if
	METACITY_DEBUG=1). Bug #96404

	* src/keybindings.c (meta_change_keygrab): use error trap nesting
	and conditionalize on meta_is_verbose() to avoid a ton of XSync

	* src/display.c (meta_change_button_grab): ditto

	Throughout: move to new error trap setup to save on XSync calls,
	new setup is:

	* src/errors.c (meta_error_trap_push_with_return): new function,
	an error trap that needs to care about return value and thus
	sync even if an outer trap still exists
	(meta_error_trap_pop_with_return): new function
	(meta_error_trap_pop): add "last_request_was_roundtrip"
	argument allowing us to avoid XSync() if we just did
	a GetProperty or whatever.

	* src/util.c (meta_warning): flush the warning file descriptor

	* src/Makefile.am (INCLUDES): define G_LOG_DOMAIN
2002-10-21 21:44:35 +00:00
Kjartan Maraas
37a1e6f57b Updated Norwegian (bokml) translation.
2002-10-21  Kjartan Maraas  <kmaraas@gnome.org>

	* no.po: Updated Norwegian (bokml) translation.
2002-10-21 11:00:52 +00:00
Havoc Pennington
0c5cacf7cc put multihead stuff in HAVE_GTK_MULTIHEAD, reported by John Palmieri
2002-10-20  Havoc Pennington  <hp@pobox.com>

	* src/ui.c (meta_image_window_new): put multihead stuff in
	HAVE_GTK_MULTIHEAD, reported by John Palmieri
2002-10-20 17:17:16 +00:00
Havoc Pennington
95e5a13131 check above->mapped before deciding if it overlaps the window being
2002-10-20  Havoc Pennington  <hp@pobox.com>

	* src/keybindings.c (handle_raise_or_lower): check above->mapped
	before deciding if it overlaps the window being raiselowered,
	fix from Stephane Chauveau
2002-10-20 15:22:40 +00:00
Jeremy Katz
c1a88f5457 make Xrandr check less noisy
2002-10-19  Jeremy Katz  <katzj@redhat.com>

       * configure.in: make Xrandr check less noisy
2002-10-19 16:18:00 +00:00
Havoc Pennington
70b6a57003 call meta_image_window_new in multihead-safe way
2002-10-18  Havoc Pennington  <hp@redhat.com>

	* src/effects.c (meta_effects_draw_box_animation): call
	meta_image_window_new in multihead-safe way

	* src/ui.c (meta_image_window_new): multihead safety
2002-10-18 22:46:37 +00:00
Havoc Pennington
915c2db3b9 only create the resize popup if width_inc or height_inc are > 1
2002-10-18  Havoc Pennington  <hp@redhat.com>

	* src/window.c (meta_window_refresh_resize_popup): only create the
	resize popup if width_inc or height_inc are > 1

	* src/resizepopup.c: Clear out all the weird tickmark cruft,
	saves us about 2.5K of binary size, whee
	(meta_ui_resize_popup_new): take display/screen arguments and make
	multihead-safe #94349
2002-10-18 22:37:01 +00:00
Havoc Pennington
eb647577c3 don't start the cycle process if the binding for switching windows has no
2002-10-18  Havoc Pennington  <hp@redhat.com>

	* src/keybindings.c (do_choose_window): don't start the cycle
	process if the binding for switching windows has no modifier bits,
	just focus the window immediately.

	* src/prefs.c, src/keybindings.c: add a keybinding to move between
	windows that goes in the opposite direction.  This is mostly
	useful if you want to bind unmodified keys to the switch windows
	functions, e.g. if you have "Forward" and "Back" keys on your
	keyboard. Patch from Shilad Sen <shilad sourcelight com>
2002-10-18 22:19:05 +00:00
Havoc Pennington
1094410ff8 add "what happens when you double click the titlebar" setting, patch from
2002-10-18  Havoc Pennington  <hp@redhat.com>

	* src/prefs.c, src/frames.c: add "what happens when you double
	click the titlebar" setting, patch from Sean Middleditch bug
	#95625.  This is basically an "add Windows emulation mode" patch.
2002-10-18 21:22:27 +00:00
Havoc Pennington
6e90c238e8 move window-click to Super+click not Alt+click by default. Super should be
2002-10-18  Havoc Pennington  <hp@redhat.com>

	* src/metacity.schemas.in: move window-click to Super+click not
	Alt+click by default. Super should be the Windows key on keyboards
	that have one and are so configured.  Prepare for the FAQ on this.
2002-10-18 19:07:42 +00:00
Havoc Pennington
44a63a9911 fix min aspect handling, patch from Martin Garton #94943
2002-10-18  Havoc Pennington  <hp@redhat.com>

	* src/window.c (constrain_size): fix min aspect handling,
	patch from Martin Garton #94943
2002-10-18 18:58:05 +00:00
Andras Timar
149e8d12cd Added hu to ALL_LINGUAS.
2002-10-18  Andras Timar  <timar@gnome.hu>

        * configure.in: Added hu to ALL_LINGUAS.
2002-10-18 14:25:48 +00:00
Andras Timar
9888f0434d Added Hungarian translation.
2002-10-17  Andras Timar  <timar@gnome.hu>

        * hu.po: Added Hungarian translation.
2002-10-18 14:23:43 +00:00
Havoc Pennington
370982b812 replace the old apply_constraints with wacky new approach involving
2002-10-18  Havoc Pennington  <hp@pobox.com>

	* src/stack.c (constrain_stacking): replace the old
	apply_constraints with wacky new approach involving graphing all
	the constraints then walking the graph.  Fixes #94876 and probably
	other stacking bugs as well, thanks to Arvind for tracking down
	the issue.

	(compute_layer): add FIXME and reference to bug #96140
2002-10-18 06:05:09 +00:00
Christophe Merlet
5c5de1c6b3 Updated French translation. 2002-10-17 19:56:39 +00:00
Havoc Pennington
5ba2fa893f don't place transient-for-whole-group windows above _each other_, only
2002-10-17  Havoc Pennington  <hp@redhat.com>

	* src/stack.c (apply_constraints): don't place
	transient-for-whole-group windows above _each other_, only
	above other windows in the group that aren't themselves
	transient-for-whole-group. Should help with part of #94876
2002-10-17 16:36:50 +00:00
Havoc Pennington
4eb8a93c83 debug enhancements 2002-10-17 16:20:50 +00:00
Havoc Pennington
3da0b1c7d9 fix memory leak of group_windows, and don't use the variable name "tmp"
2002-10-17  Havoc Pennington  <hp@redhat.com>

	* src/stack.c (apply_constraints): fix memory leak of
	group_windows, and don't use the variable name "tmp" twice. Shadow
	variables bad.
2002-10-17 16:07:50 +00:00
Havoc Pennington
aa62466091 add code to create big stacks of dialogs transient for each other, for
2002-10-17  Havoc Pennington  <hp@redhat.com>

	* src/tools/metacity-window-demo.c (dialog_cb): add code to create
	big stacks of dialogs transient for each other, for testing.
2002-10-17 16:04:53 +00:00
Havoc Pennington
337812d51d workspaces are all per-screen now, fix accordingly
2002-10-16  Havoc Pennington  <hp@redhat.com>

	* src/workspace.c: workspaces are all per-screen now, fix
	accordingly

	* src/core.c: fix multihead workspace stuff

	* src/keybindings.c: multihead-rama

	* src/screen.c (meta_screen_show_desktop): new functions to
	replace display equivalents

	* src/display.c (meta_display_get_workspace_by_screen_index): get
	rid of this
	(meta_display_get_workspace_by_index): get rid of this
	(event_callback): handle _NET_SHOWING_DESKTOP message per-screen

	* src/screen.c (meta_screen_get_workspace_by_index): new function

	* src/screen.h (struct _MetaScreen): move workspace list, and
	showing_desktop flag, to be per-screen

	* src/window.c (window_query_root_pointer): return whether pointer
	is on window's screen
	(meta_window_handle_mouse_grab_op_event): don't use coordinates
	from other screens when updating a window operation on the current
	screen. I can't believe no one has reported this...
2002-10-16 20:12:24 +00:00
Havoc Pennington
17ac646f70 update window layer when above/below state is changed. Fixed by Ross
2002-10-16  Havoc Pennington  <hp@pobox.com>

	* src/window.c (meta_window_client_message): update window layer
	when above/below state is changed. Fixed by Ross Burton.
2002-10-16 14:53:19 +00:00
Christian Neumair
e3cfa163d0 Updated German translation. 2002-10-16 14:40:36 +00:00
Yukihiro Nakai
9657b6cebe ja.po: Minor fix 2002-10-16 10:02:29 +00:00
Bastien Nocera
90b8a5a20b added, more colours for your theme, time to upgrade!
2002-10-16  Bastien Nocera  <hadess@hadess.net>

        * en_GB.po: added, more colours for your theme, time to upgrade!
2002-10-15 23:20:33 +00:00
Kjartan Maraas
54c50e96e7 Updated Norwegian (bokml) translation.
2002-10-15  Kjartan Maraas  <kmaraas@gnome.org>

	* no.po: Updated Norwegian (bokml) translation.
2002-10-15 20:24:34 +00:00
Federico Mena Quintero
8c2e8ddf5c Ignore EnterNotify events when the detail field is set to NotifyInferior.
2002-10-14  Federico Mena Quintero  <federico@ximian.com>

	* src/display.c (event_callback): Ignore EnterNotify events when
	the detail field is set to NotifyInferior.  Fixes #95747.
2002-10-15 14:46:12 +00:00
Ole Laursen
9740b3f1df Updated Danish translation.
2002-10-15  Ole Laursen  <olau@hardworking.dk>

	* da.po: Updated Danish translation.
2002-10-15 13:36:31 +00:00
Hasbullah Bin Pit
0c57ebca70 Updated Malay Translation.
2002-10-13  Hasbullah Bin Pit <sebol@ikhlas.com>

        * ms.po: Updated Malay Translation.
2002-10-14 17:21:38 +00:00
Havoc Pennington
ae577d7724 button layout key
2002-10-12  Havoc Pennington  <hp@pobox.com>

	* src/metacity.schemas.in: button layout key

	* src/prefs.c: Add button layout gconf key
	(change_notify): use some "else if" instead of "if" where we
	should have been
2002-10-12 17:44:55 +00:00
Havoc Pennington
82e5cb578c don't raise window on button 2 click, only on button 1 and button 3.
2002-10-11  Havoc Pennington  <hp@redhat.com>

	* src/display.c (event_callback): don't raise window on button 2
	click, only on button 1 and button 3.

	* src/frames.c (meta_frames_button_press_event): lower on button 2
	press on frame

	* src/core.c (meta_core_user_lower): new function
2002-10-11 18:42:40 +00:00
Stanislav Brabec
4ba0ce89c4 Updated Czech translation from Miloslav Trmac <mitr@volny.cz>.
2002-10-11  Stanislav Brabec  <sbrabec@suse.cz>

	* cs.po: Updated Czech translation from Miloslav Trmac
	<mitr@volny.cz>.
2002-10-11 10:32:15 +00:00
Havoc Pennington
0df65b9f9f make the checks here allow windows larger than the screen in addition to
2002-10-11  Havoc Pennington  <hp@pobox.com>

	* src/stack.c (window_is_fullscreen_size): make the checks here
	allow windows larger than the screen in addition to
	exactly-screen-size

	* src/window.c (meta_window_configure_request): delete the "try to
	auto-enter-fullscreen-state" hack here, because it was broken, and
	the changes to the stacking code to move screen-size focused
	windows to the fullscreen layer should work better.
	(meta_window_new): remove auto-fullscreen hack from here too
2002-10-11 05:26:07 +00:00
Chyla Zbigniew
30e3cf5050 Updated Polish translation by GNOME PL Team <translators@gnome.pl> 2002-10-10 11:15:53 +00:00
Havoc Pennington
25ca0e21db also keep utility/menu/toolbar windows above their whole group.
2002-10-09  Havoc Pennington  <hp@pobox.com>

	* src/stack.c (apply_constraints): also keep utility/menu/toolbar
	windows above their whole group.

	(get_standalone_layer): don't use META_LAYER_FOCUSED_WINDOW, but
	only use META_LAYER_FULLSCREEN while the fullscreen window has
	focus.  Also, put screen-sized windows in the fullscreen layer,
	even if we didn't dare to actually put them in the fullscreen
	state.
2002-10-09 23:19:14 +00:00
Havoc Pennington
f08337d939 Add a modifier key preference for the Alt+click stuff. Can be set to
2002-10-07  Havoc Pennington  <hp@redhat.com>

        Add a modifier key preference for the Alt+click stuff.
	Can be set to "disabled" as well.

	* src/run-metacity.sh: load .Xmodmap in the Xnest if it exists

	* src/display.c (meta_display_ungrab_window_buttons): ungrab
	AnyModifier in case the modifier changed since we grabbed
	(meta_display_open): rearrange code to use meta_display_close() to
	mop up when we can't find any screens, avoiding the need to
	keep the bail-out code in sync with meta_display_close.

	* src/keybindings.c (devirtualize_modifiers): move this function
	to a public place in display.c

	* src/metacity.schemas.in: add setting for the modifier key
	to use for Alt+left/middle/right click.

	* src/prefs.c (update_binding): add a missing newline to a warning
	(meta_prefs_get_mouse_button_mods): new function

	* src/ui.c (meta_ui_parse_modifier): new function
2002-10-07 23:14:40 +00:00
Havoc Pennington
372dc090fd don't include unportable Xproto.h, fix from Glynn Foster.
2002-10-07  Havoc Pennington  <hp@pobox.com>

	* src/async-getprop.c: don't include unportable Xproto.h, fix from
	Glynn Foster.
2002-10-07 14:30:36 +00:00
Havoc Pennington
81b6316081 rig the benchmark a bit ;-) 2002-10-06 19:50:31 +00:00
Havoc Pennington
fc4a0aef0d change to add only one _XAsyncHandler per display, speeding things up a
2002-10-06  Havoc Pennington  <hp@pobox.com>

	* src/async-getprop.c: change to add only one _XAsyncHandler per
	display, speeding things up a bit.
2002-10-06 17:53:29 +00:00
Havoc Pennington
a1bb0e0015 Add wacky hack suggested by Keith Packard to get X properties
2002-10-06  Havoc Pennington  <hp@pobox.com>

	* src/async-getprop.c: Add wacky hack suggested by Keith Packard
	to get X properties asynchronously. Not actually used by metacity
	yet, but thinking about it.
2002-10-06 09:04:39 +00:00
Chyla Zbigniew
b8e5a4d707 Updated Polish translation by GNOME PL Team <translators@gnome.pl> 2002-10-05 22:39:08 +00:00
Havoc Pennington
979392efa5 actually link to RANDR_LIBS
2002-10-04  Havoc Pennington  <hp@redhat.com>

	* configure.in: actually link to RANDR_LIBS
2002-10-04 19:12:49 +00:00
Havoc Pennington
9de7b59e93 do XRRUpdateConfiguration() if we have RandR extension, else poke in
2002-10-04  Havoc Pennington  <hp@redhat.com>

	* src/display.c (event_callback): do XRRUpdateConfiguration()
	if we have RandR extension, else poke in Xlib's screen struct to
	update the screen size.

	* configure.in: fix a bogus overwrite of cppflags,
	add a check for RandR extension
2002-10-04 18:31:54 +00:00
Arvind Samptur
0388149904 call meta_window_unstick before adding window to workspace.
2002-10-04  Arvind Samptur <arvind.samptur@wipro.com>
        * src/window.c (meta_window_change_workspace): call meta_window_unstick
        before adding window to workspace.
        (menu_callback): call meta_workspace_activate before meta_window_change_workspace.
        This would avoid us running an extra loop for determining the window workspace list.

        Patches from Jeyasudha and Arvind. Fixes #92575
2002-10-04 14:49:00 +00:00
Havoc Pennington
7b0cd87838 only specify the middle backgrounds, let left/right fall back to middle
2002-10-03  Havoc Pennington  <hp@pobox.com>

	* src/themes/Esco/metacity-theme-1.xml: only specify the
	middle backgrounds, let left/right fall back to middle

	* src/theme.c (get_button): fall back to middle_background draw
	routines when missing the left/right button backgrounds.
	(button_rect): fix to handle drawing middle button backgrounds
	(meta_frame_style_draw): draw middle background once per middle
	button
2002-10-04 02:59:07 +00:00
Havoc Pennington
7641c6f952 Button-reordering patch. Has all the code except actually installing a
2002-10-03  Havoc Pennington  <hp@pobox.com>

        Button-reordering patch. Has all the code except actually
	installing a gconf schema and reading the gconf key in prefs.c.
	metacity-theme-viewer displays the button layouts for testing
	themes.

	* src/preview-widget.c (meta_preview_size_request): make up a
	width/height if no child widget

	* src/prefs.c (meta_prefs_get_button_layout): new function

	* src/frames.c: get the button layout from prefs and
	use it when drawing

	* src/theme.c (meta_frame_layout_calc_geometry): enhance to be
	able to lay out buttons in different arrangements
	(button_rect): draw the new button background rectangles
	(meta_theme_draw_frame): require a button layout argument
	(meta_theme_calc_geometry): pass in the button layout

	* src/preview-widget.h: mod to handle button layouts

	* src/theme-viewer.c: mod to handle button layouts
2002-10-04 02:28:57 +00:00
170 changed files with 79438 additions and 20991 deletions

View File

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

View File

@@ -0,0 +1 @@
Havoc Pennington <hp@redhat.com>

1728
ChangeLog

File diff suppressed because it is too large Load Diff

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

63
NEWS
View File

@@ -1 +1,62 @@
See README.
2.5.0
===
Thanks to Rob Adams, Owen Taylor, Frederic Crozat, Arvind Samptur,
Bill Haneman, Akira Tagoh for help with fixes in this release.
- many new translations
- fix an infinite loop while holding a server grab triggered by
some recent Qt versions doing weird stuff
- fix bug where Alt+rightclick repeatedly on titlebar resulted
in zillions of menus
- fix Alt+Tab to *actually* put minimized windows at the end,
though this was always intended
- rewrite size/positions constraint code (currently known
to be quite buggy, e.g. xmms is hosed)
- enforce size of at least 1x1 on windows
- reduce latency of managing new windows still further
by using async properties code in more places
- don't grab keybindings on docks, so gnome-panel
can handle them
- suck in the panel's screenshot and run dialog global
bindings
- lots of improvements to window placement
- sync max number of workspaces with pager applet
- fix to keep focus when inside window frame in
strict mouse focus mode
- make it possible to start a reverse tab with
shift+alt+tab (vs. alt+tab then shift)
- fix a multihead issue with constraints between two
windows on different heads
- require GTK+ 2.2.0 and fontconfig
- default theme is now Simple
- add visual bell feature
- incorporate many fixes from 2.4.34
- other stuff
2.4.13
===
- we were making all dialogs skip the taskbar, even non-transient
ones, though this was supposedly fixed a while ago. Now really
fixed.
- change back to Alt+click by default for the window drag feature.
- assign Alt+F12 to shade window
- fix not deleting enough workspaces when the number
was reduced via the pager config dialog (readams@hmc.edu)
- don't allow windows under the top panel ever, even if they
are tall windows (Arvind)
- fix up the window layout for directional workspace nav,
so you always stop at the edges and always end up
where you expect (hp, with tweaks from readams@hmc.edu)
- focus new windows in mouse focus mode (readams@hmc.edu)
- support xeyes, oclock, etc. by applying shape mask
to the window manager frame (yeah it resizes slow, deal)
- fix vertical/horizontal maximize
- handle crossing events resizing for more opaque resize goodness
(Soeren)
- add wacky _METACITY_UPDATE_COUNTER experimental extension
to do nice opaque resizing (does nothing without a GTK patch)
- fix a crash setting workspace names
- fix internationalized WM_NAME reading

300
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.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 shortcuts,
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,83 @@ METACITY FEATURES
- does basic colormap handling
- and much more! well, maybe not a lot more.
HOW TO ADD EXTERNAL FEATURES
===
You can write a metacity "plugin" such as a pager, window list, icon
box, task menu, or even things like "window matching" using the
Extended Window Manager Hints. See http://www.freedesktop.org for the
EWMH specification. An easy-to-use library called "libwnck" is
available that uses the EWMH and is specifically designed for writing
WM accessories.
You might be interested in existing accessories such as "Devil's Pie"
by Ross Burton, which add features to Metacity (or other
EWMH-compliant WMs).
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 +340,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 +462,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,16 +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

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,18 @@
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.2)
# releases on a branch add a 4th version like 2.4.21.1
AM_INIT_AUTOMAKE(metacity, 2.5.0)
# 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 +20,6 @@ AC_PROG_INTLTOOL([0.21])
AC_PROG_CC
AC_ISC_POSIX
AC_HEADER_STDC
AC_ARG_PROGRAM
AM_PROG_LIBTOOL
changequote(,)dnl
@@ -82,24 +83,84 @@ if test "x$GCC" = "xyes"; then
fi
changequote([,])dnl
METACITY_PC_MODULES='gtk+-2.0 >= 2.2.0 pango >= 1.2.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=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=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=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=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=auto)
AC_ARG_ENABLE(xsync, [ --disable-xsync disable metacity's use of the XSync extension],,enable_xsync=auto)
AC_ARG_ENABLE(shape, [ --disable-shape disable metacity's use of the shaped window extension],,enable_shape=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 it ja ko lv ms no pl pt pt_BR ro ru sk sv tr uk vi zh_CN zh_TW"
ALL_LINGUAS="am az be bg ca cs da de el en_GB es fa fi fr ga gl he hu it ja ko lv mk ml mn ms nl no pl pt pt_BR ro ru sl 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, gtk+-2.0 >= 2.0.0 gconf-2.0 >= 1.1.9)
PKG_CHECK_MODULES(METACITY_MESSAGE, gtk+-2.0 >= 2.0.0)
PKG_CHECK_MODULES(METACITY_WINDOW_DEMO, gtk+-2.0 >= 2.0.0)
PKG_CHECK_MODULES(METACITY_PROPS, gtk+-2.0 >= 2.0.0 gconf-2.0 >= 1.1.9 libglade-2.0)
PKG_CHECK_MODULES(METACITY_MESSAGE, gtk+-2.0 >= 2.2.0)
PKG_CHECK_MODULES(METACITY_WINDOW_DEMO, gtk+-2.0 >= 2.2.0)
if $PKG_CONFIG --atleast-version 2.1.0 gtk+-2.0; then
AC_DEFINE(HAVE_GTK_MULTIHEAD,,[gtk+ with multihead support found])
if test x$enable_config_dialog = xyes; then
PKG_CHECK_MODULES(METACITY_PROPS, gtk+-2.0 >= 2.2.0 gconf-2.0 >= 1.1.9 libglade-2.0)
fi
if $PKG_CONFIG --atleast-version 1.2.0 pangoxft; then
echo "pangoxft found"
else
AC_MSG_ERROR("Pango 1.2.0 or greater based on Xft2 is required")
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"
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"
fi
PKG_CHECK_MODULES(METACITY, $METACITY_PC_MODULES)
AC_PATH_XTRA
ALL_X_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
@@ -108,6 +169,8 @@ ALL_X_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
metacity_save_cppflags="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
use_solaris_xinerama=no
use_xfree_xinerama=no
case "$host" in
*-*-solaris*)
# Check for solaris
@@ -120,8 +183,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
@@ -137,8 +200,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)
@@ -150,41 +213,108 @@ esac
CPPFLAGS="$metacity_save_cppflags"
SHAPE_LIBS=
found_shape=false
found_shape=no
AC_CHECK_LIB(Xext, XShapeQueryExtension,
[AC_CHECK_HEADERS(X11/extensions/shape.h,
SHAPE_LIBS=-lXext found_shape=true)],
[AC_CHECK_HEADER(X11/extensions/shape.h,
SHAPE_LIBS=-lXext found_shape=yes)],
, $ALL_X_LIBS)
if test "$found_shape" = "true"; then
AC_DEFINE(HAVE_SHAPE)
if test x$enable_shape = xno; then
found_shape=no
fi
CPPFLAGS="$save_CPPFLAGS"
if test x$enable_shape = xyes; then
if test "$found_shape" = "no"; then
AC_MSG_ERROR([--enable-shape forced and Shape not found])
exit 1
fi
fi
METACITY_LIBS="$SHAPE_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $METACITY_LIBS"
if test "x$found_shape" = "xyes"; then
AC_DEFINE(HAVE_SHAPE, , [Have the shape extension library])
fi
found_xkb=no
AC_CHECK_LIB(X11, XkbQueryExtension,
[AC_CHECK_HEADER(X11/XKBlib.h,
found_xkb=yes)],
, $ALL_X_LIBS)
if test "x$found_xkb" = "xyes"; then
AC_DEFINE(HAVE_XKB, , [Have keyboard extension library])
fi
RANDR_LIBS=
found_randr=no
AC_CHECK_LIB(Xrandr, XRRUpdateConfiguration,
[AC_CHECK_HEADER(X11/extensions/Xrandr.h,
RANDR_LIBS=-lXrandr found_randr=yes,,
[#include <X11/Xlib.h>])],
, -lXrender $ALL_X_LIBS)
if test "x$found_randr" = "xyes"; then
AC_DEFINE(HAVE_RANDR, , [Have the Xrandr extension library])
fi
XSYNC_LIBS=
found_xsync=no
AC_CHECK_LIB(Xext, XSyncQueryExtension,
[AC_CHECK_HEADER(X11/extensions/sync.h,
found_xsync=yes,,
[#include <X11/Xlib.h>])],
, $ALL_X_LIBS)
if test x$enable_xsync = xno; then
found_xsync=no
fi
if test x$enable_xsync = xyes; then
if test "$found_xsync" = "no"; then
AC_MSG_ERROR([--enable-xsync forced and XSync not found])
exit 1
fi
fi
if test "x$found_xsync" = "xyes"; then
XSYNC_LIBS=-lXext
AC_DEFINE(HAVE_XSYNC, , [Have the Xsync extension library])
fi
METACITY_LIBS="$XSYNC_LIBS $RANDR_LIBS $SHAPE_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $METACITY_LIBS"
METACITY_MESSAGE_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $METACITY_MESSAGE_LIBS"
METACITY_WINDOW_DEMO_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $METACITY_WINDOW_DEMO_LIBS"
METACITY_PROPS_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $METACITY_PROPS_LIBS"
found_sm=false
found_sm=no
case "$METACITY_LIBS" in
*-lSM*)
found_sm=true
found_sm=yes
;;
*)
AC_CHECK_LIB(SM, SmcSaveYourselfDone,
[AC_CHECK_HEADERS(X11/SM/SMlib.h,
METACITY_LIBS="-lSM -lICE $METACITY_LIBS" found_sm=true)],
METACITY_LIBS="-lSM -lICE $METACITY_LIBS" found_sm=no)],
, $METACITY_LIBS)
;;
esac
if test "$found_sm" = "true"; then
AC_DEFINE(HAVE_SM)
if test x$enable_sm = xno; then
found_sm=no
fi
AM_CONDITIONAL(HAVE_SM, test "$found_sm" = "true")
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, , [Building with SM support])
fi
AM_CONDITIONAL(HAVE_SM, test "$found_sm" = "yes")
HOST_ALIAS=$host_alias
AC_SUBST(HOST_ALIAS)
@@ -203,20 +333,61 @@ 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}
GConf: ${enable_gconf}
XFree86 Xinerama: ${use_xfree_xinerama}
Solaris Xinerama: ${use_solaris_xinerama}
Startup notification: ${have_startup_notification}
Session management: ${found_sm}
Shape extension: ${found_shape}
Resize-and-rotate: ${found_randr}
Xsync: ${found_xsync}
Deprecated config dialog: ${enable_config_dialog}
"
echo "This is the UNSTABLE branch of metacity, use 2.4.x for stable (gnome-2-2 branch in CVS)"

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 dialogs.txt

32
doc/dialogs.txt Normal file
View File

@@ -0,0 +1,32 @@
Dialogs which have no transient parent or root window being
their tranisent parent are the ones which will be visible in
the tasklist.
All such dialogs will be *always* on top of the window
group i.e they would transients for the whole group.
1) Modal dialogs
* If you wish to open another window from a modal dialog
open *only* a modal dialog and set it's transient parent.
2) Normal dialog
without transient parent
* If you wish to open another window from a normal dialog
open either a normal dialog or a modal dialog only.
Set the transient parent for the child dialog if you do not
want them to be transient for all the other windows in the group.
with transient parent
* If you wish to open another window from a normal dialog
you could open any type of window.

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) #IMPLIED
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 EMPTY>
<!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,452 @@
2003-03-27 Christophe Merlet <redfox@redfoxcenter.org>
* fr.po: Updated French translation.
2003-03-13 Christian Rose <menthos@menthos.com>
* ml.po: Added Malayalam translation by
FSF-India <locale@gnu.org.in>.
2003-03-11 Paul Duffy <dubhthach@zion.nuigalway.ie>
* ga.po: Added Irish translation
2003-03-10 Roozbeh Pournader <roozbeh@sharif.edu>
* fa.po: Added Persian translation.
2003-02-26 Dmitry G. Mastrukov <dmitry@taurussoft.org>
* be.po: Added Belarusian translation
from Belarusian team <i18n@infonet.by>.
2003-02-25 Pablo Gonzalo del Campo <pablodc@bigfoot.com>
* es.po: Fixed a translation string to match with libwnck.
2003-02-22 Rob Adams <robadams@ucla.edu>
* *.po: change toggle_maximized to toggle_maximize and
toggle_shaded to toggle_shade in action_double_click_titlebar long
description to match the values used by metacity
2003-02-12 Christian Rose <menthos@menthos.com>
* sv.po: Some fixes for problems catched in translation review.
2003-02-11 Fatih Demir <kabalak@gtranslator.org>
* tr.po: Branchy.
2003-02-09 Fatih Demir <kabalak@gtranslator.org>
* tr.po: Take over from branch...
2003-02-08 Fatih Demir <kabalak@gtranslator.org>
* tr.po: Committed updated Turkish translation by Sinan.
2003-02-05 Abel Cheung <maddog@linux.org.hk>
* en_GB.po: Fix header.
* ko.po, pt_BR.po: Fix positional parameters.
2003-02-05 Abel Cheung <maddog@linux.org.hk>
* zh_TW.po: Updated traditional Chinese translation.
2003-02-03 Daniel Yacob <locales@geez.org>
* am.po: Updated Amharic translation.
2003-01-30 Marius Andreiana <marius galuna.ro>
* ro.po: updated ( thanks to Mugurel Tudor )
2003-01-25 Christophe Merlet <redfox@redfoxcenter.org>
* fr.po: Updated French translation from
Guy Clotilde <guy.clotilde@wanadoo.fr>.
2003-01-25 Kjartan Maraas <kmaraas@gnome.org>
* no.po: Updated Norwegian (bokmal) translation.
2003-01-23 He Qiangqiang <carton@linux.net.cn>
* zh_CN.po: Updated Simplified Chinese translation by
Xiong Jiang <jxiong@offtopic.org>.
2003-01-23 Dmitry G. Mastrukov <dmitry@taurussoft.org>
* ru.po: updated Russian translation
from Russian team <gnome-cyr@gnome.org>.
2003-01-23 Abel Cheung <maddog@linux.org.hk>
* zh_TW.po: Updated traditional Chinese translation.
2003-01-22 Christian Rose <menthos@menthos.com>
* mn.po: Added Mongolian translation by
Ochirbat Batzaya <buuvei@yahoo.com>.
2003-01-21 Dmitry G. Mastrukov <dmitry@taurussoft.org>
* ru.po: updated Russian translation
from Russian team <gnome-cyr@gnome.org>.
2003-01-21 Kjartan Maraas <kmaraas@gnome.org>
* no.po: Updated Norwegian (bokmal) translation.
2003-01-20 Christian Neumair <chris@gnome-de.org>
* de.po: Updated German translation.
2003-01-20 Dmitry G. Mastrukov <dmitry@taurussoft.org>
* ru.po: updated Russian translation
from Russian team <gnome-cyr@gnome.org>.
2003-01-20 Dmitry G. Mastrukov <dmitry@taurussoft.org>
* ru.po: updated Russian translation
from Russian team <gnome-cyr@gnome.org>.
2003-01-20 Dmitry G. Mastrukov <dmitry@taurussoft.org>
* ru.po: updated Russian translation
from Russian team <gnome-cyr@gnome.org>.
2003-01-19 Abel Cheung <maddog@linux.org.hk>
* zh_TW.po: Updated traditional Chinese translation, and replaced
copyright symbol with correct one.
2003-01-17 Gustavo Noronha Silva <kov@debian.org>
* pt_BR.po: translation update
2003-01-16 Vincent van Adrighem <V.vanAdrighem@dirck.mine.nu>
* nl.po: Dutch translation updated by Tino Meinen.
2003-01-16 Vincent van Adrighem <V.vanAdrighem@dirck.mine.nu>
* nl.po: Dutch translation updated by Tino Meinen.
2003-01-14 Yanko Kaneti <yaneti@declera.com>
* bg.po: Full Bulgarian translation by
Alexander Shopov <al_shopov@yahoo.com>.
2003-01-11 Kjartan Maraas <kmaraas@gnome.org>
* no.po: Updated Norwegian (bokmal) translation.
2003-01-10 Vincent van Adrighem <V.vanAdrighem@dirck.mine.nu>
* nl.po: Dutch translation updated by Tino Meinen.
2003-01-10 Andras Timar <timar@gnome.hu>
* hu.po: Updated Hungarian translation.
2003-01-10 Yukihiro Nakai <nakai@gnome.gr.jp>
* ja.po: Minor fix.
2003-01-09 Vincent van Adrighem <V.vanAdrighem@dirck.mine.nu>
* nl.po: Dutch translation updated by Tino Meinen.
2003-01-08 Pauli Virtanen <pauli.virtanen@hut.fi>
* fi.po: Fixed a string that had an invalid printf format.
2003-01-09 Abel Cheung <maddog@linux.org.hk>
* zh_TW.po: Updated traditional Chinese translation.
2003-01-07 Daniel Yacob <locales@geez.org>
* am.po: Updated Amharic translation.
2003-01-06 Vincent van Adrighem <V.vanAdrighem@dirck.mine.nu>
* nl.po: Dutch translation added by Tino Meinen.
2003-01-05 Pablo Saratxaga <pablo@mandrakesoft.com>
* vi.po: Updated Vietnamese file
* pt_BR.po: fixed syntax errors
2003-01-05 Pauli Virtanen <pauli.virtanen@hut.fi>
* fi.po: Added Finnish translation.
2003-01-05 Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>
* sk.po: Updated Slovak translation.
2003-01-03 Kjartan Maraas <kmaraas@gnome.org>
* no.po: Updated Norwegian (bokmal) translation.
2003-01-02 Zbigniew Chyla <cyba@gnome.pl>
* pl.po: Updated Polish translation by
GNOME PL Team <translators@gnome.pl>.
2002-12-29 Daniel Yacob <locales@geez.org>
* am.po: Updated Amharic translation.
2002-12-29 Kostas Papadimas <pkst@gmx.net>
* el.po: Updated Greek translation.
2002-12-25 Ole Laursen <olau@hardworking.dk>
* da.po: Updated Danish translation.
2002-12-25 Kostas Papadimas <pkst@gmx.net>
* el.po: Updated Greek translation.
2002-12-22 Daniel Yacob <locales@geez.org>
* am.po: Updated Amharic translation.
2002-12-22 Artis Trops <hornet@navigator.lv>
* lv.po: Updated Latvian translation.
2002-12-21 Daniel Yacob <locales@geez.org>
* am.po: Updated Amharic translation.
2002-12-20 Christian Neumair <chris@gnome-de.org>
* de.po: Updated German translation.
2002-12-20 Miloslav Trmac <mitr@volny.cz>
* cs.po: Updated Czech translation.
2002-12-19 Hasbullah Bin Pit <sebol@ikhlas.com>
* ms.po: Updated Malay Translation.
2002-12-19 Yanko Kaneti <yaneti@declera.com>
* bg.po (added): Added start of Bulgarian translation by
Alexander Shopov <al_shopov@yahoo.com>.
2002-12-18 Pablo Gonzalo del Campo <pablodc@bigfoot.com>
* es.po: Updated Spanish translation.
2002-12-17 Miloslav Trmac <mitr@volny.cz>
* cs.po: Updated Czech translation.
2002-12-17 Christian Rose <menthos@menthos.com>
* sv.po: Updated Swedish translation.
2002-12-17 Christian Rose <menthos@menthos.com>
* sv.po: Updated Swedish translation.
2002-12-16 Christian Neumair <chris@gnome-de.org>
* de.po: Updated German translation.
2002-12-16 Miloslav Trmac <mitr@volny.cz>
* cs.po: Updated Czech translation.
2002-12-16 Ole Laursen <olau@hardworking.dk>
* da.po: Updated Danish translation.
2002-12-14 Kjartan Maraas <kmaraas@gnome.org>
* no.po: Updated Norwegian (bokmål) translation.
2002-12-13 Daniel Yacob <locales@geez.org>
* am.po: Added Amharic translation.
2002-12-13 Christian Rose <menthos@menthos.com>
* sv.po: Updated Swedish translation.
2002-12-12 Ole Laursen <olau@hardworking.dk>
* da.po: Updated Danish translation.
2002-12-11 Christian Neumair <chris@gnome-de.org>
* POTFILES.in: Added src/tools/metacity-message.c.
* de.po: Updated German translation.
2002-12-11 Evandro Fernandes Giovanini <evandrofg@ig.com.br>
* pt_BR.po: Updated Brazilian Portuguese translation.
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.
2002-10-28 Peteris Krisjanis <peteris.krisjanis@os.lv>
* lv.po: Updated Latvian translation.
2002-10-24 Christian Rose <menthos@menthos.com>
* POTFILES.in: Added missing file.
* sv.po: Updated Swedish translation.
2002-10-24 Pablo Saratxaga <pablo@mandrakesoft.com>
* vi.po: Updated Vietnamese file
2002-10-22 Ole Laursen <olau@hardworking.dk>
* da.po: Updated Danish translation.
2002-10-21 Kjartan Maraas <kmaraas@gnome.org>
* no.po: Updated Norwegian (bokmål) translation.
2002-10-17 Andras Timar <timar@gnome.hu>
* hu.po: Added Hungarian translation.
2002-10-17 Christophe Merlet <christophe@merlet.net>
* fr.po: Updated French translation.
2002-10-16 Christian Neumair <chris@gnome-de.org>
* de.po: Updated German translation.
2002-10-16 Yukihiro Nakai <ynakai@redhat.com>
* ja.po: Minor fix
2002-10-16 Bastien Nocera <hadess@hadess.net>
* en_GB.po: added, more colours for your theme, time to upgrade!
2002-10-15 Kjartan Maraas <kmaraas@gnome.org>
* no.po: Updated Norwegian (bokmål) translation.
2002-10-15 Ole Laursen <olau@hardworking.dk>
* da.po: Updated Danish translation.
2002-10-13 Hasbullah Bin Pit <sebol@ikhlas.com>
* ms.po: Updated Malay Translation.
2002-10-11 Stanislav Brabec <sbrabec@suse.cz>
* cs.po: Updated Czech translation from Miloslav Trmac
<mitr@volny.cz>.
2002-10-10 Zbigniew Chyla <cyba@gnome.pl>
* pl.po: Updated Polish translation by
GNOME PL Team <translators@gnome.pl>.
2002-10-06 Zbigniew Chyla <cyba@gnome.pl>
* pl.po: Updated Polish translation by
GNOME PL Team <translators@gnome.pl>.
2002-10-01 Stanislav Brabec <sbrabec@suse.cz>
* cs.po: Added Czech translation from Miloslav Trmac
@@ -37,7 +486,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>
@@ -214,7 +663,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>
@@ -271,7 +720,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>
@@ -320,7 +769,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>
@@ -398,7 +847,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>
@@ -423,7 +872,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>
@@ -470,7 +919,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>
@@ -496,7 +945,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>
@@ -524,11 +973,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>
@@ -536,19 +985,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>
@@ -560,7 +1009,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>
@@ -577,7 +1026,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>
@@ -593,7 +1042,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>
@@ -605,7 +1054,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>
@@ -617,7 +1066,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>
@@ -639,7 +1088,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>
@@ -656,17 +1105,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.
@@ -676,7 +1125,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

@@ -1,5 +1,6 @@
# List of source files containing translatable strings.
# Please keep this file sorted alphabetically.
src/tools/metacity-message.c
src/delete.c
src/display.c
src/errors.c
@@ -7,6 +8,7 @@ src/frames.c
src/keybindings.c
src/main.c
src/menu.c
src/metaaccellabel.c
src/metacity-dialog.c
src/metacity.desktop.in
src/metacity.schemas.in
@@ -19,6 +21,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

2430
po/am.po Normal file

File diff suppressed because it is too large Load Diff

1124
po/az.po

File diff suppressed because it is too large Load Diff

2999
po/be.po Normal file

File diff suppressed because it is too large Load Diff

2937
po/bg.po Normal file

File diff suppressed because it is too large Load Diff

1407
po/ca.po

File diff suppressed because it is too large Load Diff

1262
po/cs.po

File diff suppressed because it is too large Load Diff

1224
po/da.po

File diff suppressed because it is too large Load Diff

2176
po/de.po

File diff suppressed because it is too large Load Diff

2504
po/el.po

File diff suppressed because it is too large Load Diff

2441
po/en_GB.po Normal file

File diff suppressed because it is too large Load Diff

1939
po/es.po

File diff suppressed because it is too large Load Diff

2421
po/fa.po Normal file

File diff suppressed because it is too large Load Diff

2921
po/fi.po Normal file

File diff suppressed because it is too large Load Diff

2102
po/fr.po

File diff suppressed because it is too large Load Diff

2419
po/ga.po Normal file

File diff suppressed because it is too large Load Diff

1260
po/gl.po

File diff suppressed because it is too large Load Diff

2442
po/he.po Normal file

File diff suppressed because it is too large Load Diff

2424
po/hu.po Normal file

File diff suppressed because it is too large Load Diff

1230
po/it.po

File diff suppressed because it is too large Load Diff

1202
po/ja.po

File diff suppressed because it is too large Load Diff

1214
po/ko.po

File diff suppressed because it is too large Load Diff

1345
po/lv.po

File diff suppressed because it is too large Load Diff

2418
po/mk.po Normal file

File diff suppressed because it is too large Load Diff

2424
po/ml.po Normal file

File diff suppressed because it is too large Load Diff

2951
po/mn.po Normal file

File diff suppressed because it is too large Load Diff

1305
po/ms.po

File diff suppressed because it is too large Load Diff

2976
po/nl.po Normal file

File diff suppressed because it is too large Load Diff

1613
po/no.po

File diff suppressed because it is too large Load Diff

1300
po/pl.po

File diff suppressed because it is too large Load Diff

1130
po/pt.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1329
po/ro.po

File diff suppressed because it is too large Load Diff

1657
po/ru.po

File diff suppressed because it is too large Load Diff

1420
po/sk.po

File diff suppressed because it is too large Load Diff

2529
po/sl.po Normal file

File diff suppressed because it is too large Load Diff

1315
po/sv.po

File diff suppressed because it is too large Load Diff

2207
po/tr.po

File diff suppressed because it is too large Load Diff

2170
po/uk.po

File diff suppressed because it is too large Load Diff

1540
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

@@ -2,3 +2,17 @@
Focus windows on map: see http://bugzilla.gnome.org/show_bug.cgi?id=82921
Keep panel always on top: http://bugzilla.gnome.org/show_bug.cgi?id=81551
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
dialogs above entire app group: http://bugzilla.gnome.org/show_bug.cgi?id=88926
display window size/position: http://bugzilla.gnome.org/show_bug.cgi?id=85213,
http://bugzilla.gnome.org/show_bug.cgi?id=106645
configure click actions, alt+click:
http://bugzilla.gnome.org/show_bug.cgi?id=83210
system modal dialogs: http://bugzilla.gnome.org/show_bug.cgi?id=83357
workspace wrapping: http://bugzilla.gnome.org/show_bug.cgi?id=89315

View File

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

View File

@@ -1,14 +1,21 @@
lib_LTLIBRARIES = libmetacity-private.la
SUBDIRS=wm-tester tools themes
INCLUDES=@METACITY_CFLAGS@ -DMETACITY_LIBEXECDIR=\"$(libexecdir)\" -DHOST_ALIAS=\"@HOST_ALIAS@\" -DMETACITY_LOCALEDIR=\"$(prefix)/@DATADIRNAME@/locale\" -DMETACITY_PKGDATADIR=\"$(pkgdatadir)\" -DMETACITY_DATADIR=\"$(datadir)\"
INCLUDES=@METACITY_CFLAGS@ -DMETACITY_LIBEXECDIR=\"$(libexecdir)\" -DHOST_ALIAS=\"@HOST_ALIAS@\" -DMETACITY_LOCALEDIR=\"$(prefix)/@DATADIRNAME@/locale\" -DMETACITY_PKGDATADIR=\"$(pkgdatadir)\" -DMETACITY_DATADIR=\"$(datadir)\" -DG_LOG_DOMAIN=\"metacity\" -DSN_API_NOT_YET_FROZEN=1
EGGFILES= \
eggaccelerators.c \
eggaccelerators.h
metacity_SOURCES= \
async-getprop.c \
async-getprop.h \
bell.h \
bell.c \
common.h \
constraints.c \
constraints.h \
core.c \
core.h \
delete.c \
@@ -32,6 +39,9 @@ metacity_SOURCES= \
gradient.h \
group.c \
group.h \
group-private.h \
group-props.c \
group-props.h \
iconcache.c \
iconcache.h \
inlinepixbufs.h \
@@ -43,6 +53,7 @@ metacity_SOURCES= \
menu.h \
metaaccellabel.c \
metaaccellabel.h \
metacity-Xatomtype.h \
place.c \
place.h \
prefs.c \
@@ -69,13 +80,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 \
@@ -84,9 +97,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
@@ -94,19 +120,23 @@ 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
testasyncgetprop_SOURCES=async-getprop.h async-getprop.c testasyncgetprop.c
noinst_PROGRAMS=testgradient
noinst_PROGRAMS=testgradient testasyncgetprop
testgradient_LDADD= @METACITY_LIBS@
testasyncgetprop_LDADD= @METACITY_LIBS@
desktopfilesdir=$(datadir)/gnome/wm-properties
desktopfiles_in_files=metacity.desktop.in
desktopfiles_DATA = $(desktopfiles_in_files:.desktop.in=.desktop)
desktopfiles_files=$(desktopfiles_in_files:.desktop.in=.desktop)
desktopfiles_DATA = $(desktopfiles_files)
@INTLTOOL_DESKTOP_RULE@
schemadir = @GCONF_SCHEMA_FILE_DIR@
@@ -130,7 +160,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_files) \
$(IMAGES) $(schema_DATA) \
update-from-egg.sh \
$(desktopfiles_in_files) \
$(schema_in_files) \
libmetacity-private.pc.in
EGGDIR=$(srcdir)/../../libegg/libegg

649
src/async-getprop.c Normal file
View File

@@ -0,0 +1,649 @@
/* Asynchronous X property getting hack */
/*
* Copyright (C) 2002 Havoc Pennington
* Copyright (C) 1986, 1998 The Open Group
*
* Permission to use, copy, modify, distribute, and sell this software
* and its documentation for any purpose is hereby granted without
* fee, provided that the above copyright notice appear in all copies
* and that both that copyright notice and this permission notice
* appear in supporting documentation.
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* Except as contained in this notice, the name of The Open Group shall not be
* used in advertising or otherwise to promote the sale, use or other dealings
* in this Software without prior written authorization from The Open Group.
*/
#include <assert.h>
#undef DEBUG_SPEW
#ifdef DEBUG_SPEW
#include <stdio.h>
#endif
#include "async-getprop.h"
#define NEED_REPLIES
#include <X11/Xlibint.h>
#ifndef NULL
#define NULL ((void*)0)
#endif
typedef struct _ListNode ListNode;
typedef struct _AgPerDisplayData AgPerDisplayData;
struct _ListNode
{
ListNode *next;
};
struct _AgGetPropertyTask
{
ListNode node;
AgPerDisplayData *dd;
Window window;
Atom property;
unsigned long request_seq;
int error;
Atom actual_type;
int actual_format;
unsigned long n_items;
unsigned long bytes_after;
unsigned char *data;
Bool have_reply;
};
struct _AgPerDisplayData
{
ListNode node;
_XAsyncHandler async;
Display *display;
ListNode *pending_tasks;
ListNode *pending_tasks_tail;
ListNode *completed_tasks;
ListNode *completed_tasks_tail;
int n_tasks_pending;
int n_tasks_completed;
};
static ListNode *display_datas = NULL;
static ListNode *display_datas_tail = NULL;
static void
append_to_list (ListNode **head,
ListNode **tail,
ListNode *task)
{
task->next = NULL;
if (*tail == NULL)
{
assert (*head == NULL);
*head = task;
*tail = task;
}
else
{
(*tail)->next = task;
*tail = task;
}
}
static void
remove_from_list (ListNode **head,
ListNode **tail,
ListNode *task)
{
ListNode *prev;
ListNode *node;
prev = NULL;
node = *head;
while (node != NULL)
{
if (node == task)
{
if (prev)
prev->next = node->next;
else
*head = node->next;
if (node == *tail)
*tail = prev;
break;
}
prev = node;
node = node->next;
}
/* can't remove what's not there */
assert (node != NULL);
node->next = NULL;
}
static void
move_to_completed (AgPerDisplayData *dd,
AgGetPropertyTask *task)
{
remove_from_list (&dd->pending_tasks,
&dd->pending_tasks_tail,
&task->node);
append_to_list (&dd->completed_tasks,
&dd->completed_tasks_tail,
&task->node);
dd->n_tasks_pending -= 1;
dd->n_tasks_completed += 1;
}
static AgGetPropertyTask*
find_pending_by_request_sequence (AgPerDisplayData *dd,
unsigned long request_seq)
{
ListNode *node;
/* if the sequence is after our last pending task, we
* aren't going to find a match
*/
{
AgGetPropertyTask *task = (AgGetPropertyTask*) dd->pending_tasks_tail;
if (task != NULL)
{
if (task->request_seq < request_seq)
return NULL;
else if (task->request_seq == request_seq)
return task; /* why not check this */
}
}
/* Generally we should get replies in the order we sent
* requests, so we should usually be using the task
* at the head of the list, if we use any task at all.
* I'm not sure this is 100% guaranteed, if it is,
* it would be a big speedup.
*/
node = dd->pending_tasks;
while (node != NULL)
{
AgGetPropertyTask *task = (AgGetPropertyTask*) node;
if (task->request_seq == request_seq)
return task;
node = node->next;
}
return NULL;
}
static Bool
async_get_property_handler (Display *dpy,
xReply *rep,
char *buf,
int len,
XPointer data)
{
xGetPropertyReply replbuf;
xGetPropertyReply *reply;
AgGetPropertyTask *task;
AgPerDisplayData *dd;
int bytes_read;
dd = (AgPerDisplayData*) data;
#if 0
printf ("%s: seeing request seq %ld buflen %d\n", __FUNCTION__,
dpy->last_request_read, len);
#endif
task = find_pending_by_request_sequence (dd, dpy->last_request_read);
if (task == NULL)
return False;
assert (dpy->last_request_read == task->request_seq);
task->have_reply = True;
move_to_completed (dd, task);
/* read bytes so far */
bytes_read = SIZEOF (xReply);
if (rep->generic.type == X_Error)
{
xError errbuf;
task->error = rep->error.errorCode;
#ifdef DEBUG_SPEW
printf ("%s: error code = %d (ignoring error, eating %d bytes, generic.length = %ld)\n",
__FUNCTION__, task->error, (SIZEOF (xError) - bytes_read),
rep->generic.length);
#endif
/* We return True (meaning we consumed the reply)
* because otherwise it would invoke the X error handler,
* and an async API is useless if you have to synchronously
* trap X errors. Also GetProperty can always fail, pretty
* much, so trapping errors is always what you want.
*
* We have to eat all the error reply data here.
* (kind of a charade as we know sizeof(xError) == sizeof(xReply))
*
* Passing discard = True seems to break things; I don't understand
* why, because there should be no extra data in an error reply,
* right?
*/
_XGetAsyncReply (dpy, (char *)&errbuf, rep, buf, len,
(SIZEOF (xError) - bytes_read) >> 2, /* in 32-bit words */
False); /* really seems like it should be True */
return True;
}
#ifdef DEBUG_SPEW
printf ("%s: already read %d bytes reading %d more for total of %d; generic.length = %ld\n",
__FUNCTION__, bytes_read, (SIZEOF (xGetPropertyReply) - bytes_read) >> 2,
SIZEOF (xGetPropertyReply), rep->generic.length);
#endif
/* (kind of a silly as we know sizeof(xGetPropertyReply) == sizeof(xReply)) */
reply = (xGetPropertyReply *)
_XGetAsyncReply (dpy, (char *)&replbuf, rep, buf, len,
(SIZEOF (xGetPropertyReply) - bytes_read) >> 2, /* in 32-bit words */
False); /* False means expecting more data to follow,
* don't eat the rest of the reply
*/
bytes_read = SIZEOF (xGetPropertyReply);
#ifdef DEBUG_SPEW
printf ("%s: have reply propertyType = %ld format = %d n_items = %ld\n",
__FUNCTION__, reply->propertyType, reply->format, reply->nItems);
#endif
assert (task->data == NULL);
/* This is all copied from XGetWindowProperty(). Not sure we should
* LockDisplay(). Not sure I'm passing the right args to
* XGetAsyncData(). Not sure about a lot of things.
*/
/* LockDisplay (dpy); */
if (reply->propertyType != None)
{
long nbytes, netbytes;
/* this alignment macro from orbit2 */
#define ALIGN_VALUE(this, boundary) \
(( ((unsigned long)(this)) + (((unsigned long)(boundary)) -1)) & (~(((unsigned long)(boundary))-1)))
switch (reply->format)
{
/*
* One extra byte is malloced than is needed to contain the property
* data, but this last byte is null terminated and convenient for
* returning string properties, so the client doesn't then have to
* recopy the string to make it null terminated.
*/
case 8:
nbytes = reply->nItems;
/* there's padding to word boundary */
netbytes = ALIGN_VALUE (nbytes, 4);
if (nbytes + 1 > 0 &&
(task->data = (unsigned char *) Xmalloc ((unsigned)nbytes + 1)))
{
#ifdef DEBUG_SPEW
printf ("%s: already read %d bytes using %ld, more eating %ld more\n",
__FUNCTION__, bytes_read, nbytes, netbytes);
#endif
/* _XReadPad (dpy, (char *) task->data, netbytes); */
_XGetAsyncData (dpy, task->data, buf, len,
bytes_read, nbytes,
netbytes);
}
break;
case 16:
nbytes = reply->nItems * sizeof (short);
netbytes = reply->nItems << 1;
netbytes = ALIGN_VALUE (netbytes, 4); /* align to word boundary */
if (nbytes + 1 > 0 &&
(task->data = (unsigned char *) Xmalloc ((unsigned)nbytes + 1)))
{
#ifdef DEBUG_SPEW
printf ("%s: already read %d bytes using %ld more, eating %ld more\n",
__FUNCTION__, bytes_read, nbytes, netbytes);
#endif
/* _XRead16Pad (dpy, (short *) task->data, netbytes); */
_XGetAsyncData (dpy, task->data, buf, len,
bytes_read, nbytes, netbytes);
}
break;
case 32:
nbytes = reply->nItems * sizeof (CARD32);
netbytes = reply->nItems << 2;
if (nbytes + 1 > 0 &&
(task->data = (unsigned char *) Xmalloc ((unsigned)nbytes + 1)))
{
#ifdef DEBUG_SPEW
printf ("%s: already read %d bytes using %ld more, eating %ld more\n",
__FUNCTION__, bytes_read, nbytes, netbytes);
#endif
/* _XRead32 (dpy, (long *) task->data, netbytes); */
_XGetAsyncData (dpy, task->data, buf, len,
bytes_read, nbytes,
netbytes);
}
break;
default:
/*
* This part of the code should never be reached. If it is,
* the server sent back a property with an invalid format.
* This is a BadImplementation error.
*
* However this async GetProperty API doesn't report errors
* via the standard X mechanism, so don't do anything about
* it, other than store it in task->error.
*/
{
#if 0
xError error;
#endif
task->error = BadImplementation;
#if 0
error.sequenceNumber = task->request_seq;
error.type = X_Error;
error.majorCode = X_GetProperty;
error.minorCode = 0;
error.errorCode = BadImplementation;
_XError (dpy, &error);
#endif
}
nbytes = netbytes = 0L;
break;
}
if (task->data == NULL)
{
task->error = BadAlloc;
#ifdef DEBUG_SPEW
printf ("%s: already read %d bytes eating %ld\n",
__FUNCTION__, bytes_read, netbytes);
#endif
/* _XEatData (dpy, (unsigned long) netbytes); */
_XGetAsyncData (dpy, NULL, buf, len,
bytes_read, 0, netbytes);
/* UnlockDisplay (dpy); */
return BadAlloc; /* not Success */
}
(task->data)[nbytes] = '\0';
}
#ifdef DEBUG_SPEW
printf ("%s: have data\n", __FUNCTION__);
#endif
task->actual_type = reply->propertyType;
task->actual_format = reply->format;
task->n_items = reply->nItems;
task->bytes_after = reply->bytesAfter;
/* UnlockDisplay (dpy); */
return True;
}
static AgPerDisplayData*
get_display_data (Display *display,
Bool create)
{
ListNode *node;
AgPerDisplayData *dd;
node = display_datas;
while (node != NULL)
{
dd = (AgPerDisplayData*) node;
if (dd->display == display)
return dd;
node = node->next;
}
if (!create)
return NULL;
dd = Xcalloc (1, sizeof (AgPerDisplayData));
if (dd == NULL)
return NULL;
dd->display = display;
dd->async.next = display->async_handlers;
dd->async.handler = async_get_property_handler;
dd->async.data = (XPointer) dd;
dd->display->async_handlers = &dd->async;
append_to_list (&display_datas,
&display_datas_tail,
&dd->node);
return dd;
}
static void
maybe_free_display_data (AgPerDisplayData *dd)
{
if (dd->pending_tasks == NULL &&
dd->completed_tasks == NULL)
{
DeqAsyncHandler (dd->display, &dd->async);
remove_from_list (&display_datas, &display_datas_tail,
&dd->node);
XFree (dd);
}
}
AgGetPropertyTask*
ag_task_create (Display *dpy,
Window window,
Atom property,
long offset,
long length,
Bool delete,
Atom req_type)
{
AgGetPropertyTask *task;
xGetPropertyReq *req;
xError error;
AgPerDisplayData *dd;
/* Fire up our request */
LockDisplay (dpy);
dd = get_display_data (dpy, True);
if (dd == NULL)
{
UnlockDisplay (dpy);
return NULL;
}
GetReq (GetProperty, req);
req->window = window;
req->property = property;
req->type = req_type;
req->delete = delete;
req->longOffset = offset;
req->longLength = length;
error.sequenceNumber = dpy->request;
/* Queue up our async task */
task = Xcalloc (1, sizeof (AgGetPropertyTask));
if (task == NULL)
{
UnlockDisplay (dpy);
return NULL;
}
task->dd = dd;
task->window = window;
task->property = property;
task->request_seq = dpy->request;
append_to_list (&dd->pending_tasks,
&dd->pending_tasks_tail,
&task->node);
dd->n_tasks_pending += 1;
UnlockDisplay (dpy);
SyncHandle ();
return task;
}
static void
free_task (AgGetPropertyTask *task)
{
remove_from_list (&task->dd->completed_tasks,
&task->dd->completed_tasks_tail,
&task->node);
task->dd->n_tasks_completed -= 1;
maybe_free_display_data (task->dd);
XFree (task);
}
Status
ag_task_get_reply_and_free (AgGetPropertyTask *task,
Atom *actual_type,
int *actual_format,
unsigned long *nitems,
unsigned long *bytesafter,
unsigned char **prop)
{
Display *dpy;
*prop = NULL;
dpy = task->dd->display; /* Xlib macros require a variable named "dpy" */
if (task->error != Success)
{
Status s = task->error;
free_task (task);
return s;
}
if (!task->have_reply)
{
free_task (task);
return BadAlloc; /* not Success */
}
*actual_type = task->actual_type;
*actual_format = task->actual_format;
*nitems = task->n_items;
*bytesafter = task->bytes_after;
*prop = task->data; /* pass out ownership of task->data */
SyncHandle ();
free_task (task);
return Success;
}
Bool
ag_task_have_reply (AgGetPropertyTask *task)
{
return task->have_reply;
}
Atom
ag_task_get_property (AgGetPropertyTask *task)
{
return task->property;
}
Window
ag_task_get_window (AgGetPropertyTask *task)
{
return task->window;
}
Display*
ag_task_get_display (AgGetPropertyTask *task)
{
return task->dd->display;
}
AgGetPropertyTask*
ag_get_next_completed_task (Display *display)
{
AgPerDisplayData *dd;
dd = get_display_data (display, False);
if (dd == NULL)
return NULL;
#ifdef DEBUG_SPEW
printf ("%d pending %d completed\n",
dd->n_tasks_pending,
dd->n_tasks_completed);
#endif
return (AgGetPropertyTask*) dd->completed_tasks;
}
void*
ag_Xmalloc (unsigned long bytes)
{
return (void*) Xmalloc (bytes);
}
void*
ag_Xmalloc0 (unsigned long bytes)
{
return (void*) Xcalloc (bytes, 1);
}

65
src/async-getprop.h Normal file
View File

@@ -0,0 +1,65 @@
/* Asynchronous X property getting hack */
/*
* Copyright (C) 2002 Havoc Pennington
*
* Permission to use, copy, modify, distribute, and sell this software
* and its documentation for any purpose is hereby granted without
* fee, provided that the above copyright notice appear in all copies
* and that both that copyright notice and this permission notice
* appear in supporting documentation.
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* Except as contained in this notice, the name of The Open Group shall not be
* used in advertising or otherwise to promote the sale, use or other dealings
* in this Software without prior written authorization from The Open Group.
*/
#ifndef ASYNC_GETPROP_H
#define ASYNC_GETPROP_H
#include <X11/Xlib.h>
#include <X11/Xutil.h>
typedef struct _AgGetPropertyTask AgGetPropertyTask;
AgGetPropertyTask* ag_task_create (Display *display,
Window window,
Atom property,
long offset,
long length,
Bool delete,
Atom req_type);
Status ag_task_get_reply_and_free (AgGetPropertyTask *task,
Atom *actual_type,
int *actual_format,
unsigned long *nitems,
unsigned long *bytesafter,
unsigned char **prop);
Bool ag_task_have_reply (AgGetPropertyTask *task);
Atom ag_task_get_property (AgGetPropertyTask *task);
Window ag_task_get_window (AgGetPropertyTask *task);
Display* ag_task_get_display (AgGetPropertyTask *task);
AgGetPropertyTask* ag_get_next_completed_task (Display *display);
/* so other headers don't have to include internal Xlib goo */
void* ag_Xmalloc (unsigned long bytes);
void* ag_Xmalloc0 (unsigned long bytes);
#endif

250
src/bell.c Normal file
View File

@@ -0,0 +1,250 @@
/* Metacity visual bell */
/*
* Copyright (C) 2002 Sun Microsystems 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 "bell.h"
#include "screen.h"
#include "prefs.h"
static void
meta_bell_flash_screen (MetaDisplay *display,
MetaScreen *screen)
{
Window root = screen->xroot;
int width = screen->width;
int height = screen->height;
if (screen->flash_window == None)
{
Visual *visual = CopyFromParent;
XSetWindowAttributes xswa;
int depth = CopyFromParent;
xswa.save_under = True;
xswa.override_redirect = True;
/*
* TODO: use XGetVisualInfo and determine which is an
* overlay, if one is present, and use the Overlay visual
* for this window (for performance reasons).
* Not sure how to tell this yet...
*/
screen->flash_window = XCreateWindow (display->xdisplay, root,
0, 0, width, height,
0, depth,
InputOutput,
visual,
/* note: XSun doesn't like SaveUnder here */
CWSaveUnder | CWOverrideRedirect,
&xswa);
XSelectInput (display->xdisplay, screen->flash_window, ExposureMask);
XMapWindow (display->xdisplay, screen->flash_window);
XSync (display->xdisplay, False);
XFlush (display->xdisplay);
XUnmapWindow (display->xdisplay, screen->flash_window);
}
else
{
/* just draw something in the window */
GC gc = XCreateGC (display->xdisplay, screen->flash_window, 0, NULL);
XMapWindow (display->xdisplay, screen->flash_window);
XSetForeground (display->xdisplay, gc,
WhitePixel (display->xdisplay,
XScreenNumberOfScreen (screen->xscreen)));
XFillRectangle (display->xdisplay, screen->flash_window, gc,
0, 0, width, height);
XSetForeground (display->xdisplay, gc,
BlackPixel (display->xdisplay,
XScreenNumberOfScreen (screen->xscreen)));
XFillRectangle (display->xdisplay, screen->flash_window, gc,
0, 0, width, height);
XFlush (display->xdisplay);
XSync (display->xdisplay, False);
XUnmapWindow (display->xdisplay, screen->flash_window);
}
XFlush (display->xdisplay);
}
#ifdef HAVE_XKB
static void
meta_bell_flash_fullscreen (MetaDisplay *display,
XkbAnyEvent *xkb_ev)
{
XkbBellNotifyEvent *xkb_bell_ev = (XkbBellNotifyEvent *) xkb_ev;
MetaScreen *screen;
g_assert (xkb_ev->xkb_type == XkbBellNotify);
if (xkb_bell_ev->window != None)
{
screen = meta_display_screen_for_xwindow (display, xkb_bell_ev->window);
if (screen)
meta_bell_flash_screen (display, screen);
}
else
{
GSList *screen_list = display->screens;
while (screen_list)
{
screen = (MetaScreen *) screen_list->data;
meta_bell_flash_screen (display, screen);
screen_list = screen_list->next;
}
}
}
static gboolean
meta_bell_unflash_frame (gpointer data)
{
MetaFrame *frame = (MetaFrame *) data;
frame->is_flashing = 0;
meta_frame_queue_draw (frame);
return FALSE;
}
static void
meta_bell_flash_window_frame (MetaWindow *window)
{
g_assert (window->frame != NULL);
window->frame->is_flashing = 1;
meta_frame_queue_draw (window->frame);
g_timeout_add_full (G_PRIORITY_DEFAULT_IDLE, 100,
meta_bell_unflash_frame, window->frame, NULL);
}
static void
meta_bell_flash_frame (MetaDisplay *display,
XkbAnyEvent *xkb_ev)
{
XkbBellNotifyEvent *xkb_bell_event = (XkbBellNotifyEvent *) xkb_ev;
MetaWindow *window;
g_assert (xkb_ev->xkb_type == XkbBellNotify);
window = meta_display_lookup_x_window (display, xkb_bell_event->window);
if (!window && (display->focus_window->frame))
{
window = display->focus_window;
}
if (window)
{
meta_bell_flash_window_frame (window);
}
else /* revert to fullscreen flash if there's no focussed window */
{
meta_bell_flash_fullscreen (display, xkb_ev);
}
}
static void
meta_bell_visual_notify (MetaDisplay *display,
XkbAnyEvent *xkb_ev)
{
switch (meta_prefs_get_visual_bell_type ())
{
case META_VISUAL_BELL_FULLSCREEN_FLASH:
meta_bell_flash_fullscreen (display, xkb_ev);
break;
case META_VISUAL_BELL_FRAME_FLASH:
meta_bell_flash_frame (display, xkb_ev); /* does nothing yet */
break;
case META_VISUAL_BELL_INVALID:
/* do nothing */
break;
}
}
void
meta_bell_notify (MetaDisplay *display,
XkbAnyEvent *xkb_ev)
{
/* flash something */
if (meta_prefs_get_visual_bell ())
meta_bell_visual_notify (display, xkb_ev);
}
#endif
void
meta_bell_set_audible (MetaDisplay *display, gboolean audible)
{
#ifdef HAVE_XKB
XkbChangeEnabledControls (display->xdisplay,
XkbUseCoreKbd,
XkbAudibleBellMask,
audible ? XkbAudibleBellMask : 0);
#endif
}
gboolean
meta_bell_init (MetaDisplay *display)
{
#ifdef HAVE_XKB
int xkb_base_error_type, xkb_opcode;
if (!XkbQueryExtension (display->xdisplay, &xkb_opcode,
&display->xkb_base_event_type,
&xkb_base_error_type,
NULL, NULL))
{
display->xkb_base_event_type = -1;
g_message ("could not find XKB extension.");
return FALSE;
}
else
{
unsigned int mask = XkbBellNotifyMask;
gboolean visual_bell_auto_reset = FALSE;
/* TRUE if and when non-broken version is available */
XkbSelectEvents (display->xdisplay,
XkbUseCoreKbd,
XkbBellNotifyMask,
XkbBellNotifyMask);
XkbChangeEnabledControls (display->xdisplay,
XkbUseCoreKbd,
XkbAudibleBellMask,
meta_prefs_bell_is_audible ()
? XkbAudibleBellMask : 0);
if (visual_bell_auto_reset) {
XkbSetAutoResetControls (display->xdisplay,
XkbAudibleBellMask,
&mask,
&mask);
}
return TRUE;
}
#endif
return FALSE;
}
void
meta_bell_shutdown (MetaDisplay *display)
{
#ifdef HAVE_XKB
/* TODO: persist initial bell state in display, reset here */
XkbChangeEnabledControls (display->xdisplay,
XkbUseCoreKbd,
XkbAudibleBellMask,
XkbAudibleBellMask);
#endif
}
void
meta_bell_notify_frame_destroy (MetaFrame *frame)
{
if (frame->is_flashing)
g_idle_remove_by_data (frame);
}

34
src/bell.h Normal file
View File

@@ -0,0 +1,34 @@
/* Metacity visual bell */
/*
* Copyright (C) 2002 Sun Microsystems 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.
*/
#ifdef HAVE_XKB
#include <X11/XKBlib.h>
#endif
#include "display.h"
#include "frame.h"
#ifdef HAVE_XKB
void meta_bell_notify (MetaDisplay *display, XkbAnyEvent *xkb_ev);
#endif
void meta_bell_set_audible (MetaDisplay *display, gboolean audible);
gboolean meta_bell_init (MetaDisplay *display);
void meta_bell_shutdown (MetaDisplay *display);
void meta_bell_notify_frame_destroy (MetaFrame *frame);

View File

@@ -42,7 +42,8 @@ typedef enum
META_FRAME_MAXIMIZED = 1 << 9,
META_FRAME_ALLOWS_SHADE = 1 << 10,
META_FRAME_ALLOWS_MOVE = 1 << 11,
META_FRAME_FULLSCREEN = 1 << 12
META_FRAME_FULLSCREEN = 1 << 12,
META_FRAME_IS_FLASHING = 1 << 13
} MetaFrameFlags;
typedef enum
@@ -117,7 +118,6 @@ typedef enum
META_GRAB_OP_CLICKING_MENU
} MetaGrabOp;
typedef enum
{
META_CURSOR_DEFAULT,
@@ -130,7 +130,8 @@ typedef enum
META_CURSOR_NE_RESIZE,
META_CURSOR_NW_RESIZE,
META_CURSOR_MOVE_WINDOW,
META_CURSOR_RESIZE_WINDOW
META_CURSOR_RESIZE_WINDOW,
META_CURSOR_BUSY
} MetaCursor;
@@ -141,6 +142,13 @@ typedef enum
META_FOCUS_MODE_MOUSE
} MetaFocusMode;
typedef enum
{
META_ACTION_DOUBLE_CLICK_TITLEBAR_TOGGLE_SHADE,
META_ACTION_DOUBLE_CLICK_TITLEBAR_TOGGLE_MAXIMIZE,
META_ACTION_DOUBLE_CLICK_TITLEBAR_LAST
} MetaActionDoubleClickTitlebar;
typedef enum
{
META_FRAME_TYPE_NORMAL,
@@ -169,6 +177,32 @@ typedef enum
META_VIRTUAL_MOD5_MASK = 1 << 14
} MetaVirtualModifier;
/* Function a window button can have. Note, you can't add stuff here
* without extending the theme format to draw a new function and
* breaking all existing themes.
*/
typedef enum
{
META_BUTTON_FUNCTION_MENU,
META_BUTTON_FUNCTION_MINIMIZE,
META_BUTTON_FUNCTION_MAXIMIZE,
META_BUTTON_FUNCTION_CLOSE,
META_BUTTON_FUNCTION_LAST
} MetaButtonFunction;
#define MAX_BUTTONS_PER_CORNER META_BUTTON_FUNCTION_LAST
typedef struct _MetaButtonLayout MetaButtonLayout;
struct _MetaButtonLayout
{
/* buttons in the group on the left side */
MetaButtonFunction left_buttons[MAX_BUTTONS_PER_CORNER];
/* buttons in the group on the right side */
MetaButtonFunction right_buttons[MAX_BUTTONS_PER_CORNER];
};
/* should investigate changing these to whatever most apps use */
#define META_ICON_WIDTH 32
#define META_ICON_HEIGHT 32

File diff suppressed because it is too large Load Diff

View File

@@ -19,6 +19,7 @@
* 02111-1307, USA.
*/
#include <config.h>
#include "core.h"
#include "frame.h"
#include "workspace.h"
@@ -45,6 +46,22 @@ meta_core_get_client_size (Display *xdisplay,
*height = window->rect.height;
}
Window
meta_core_get_client_xwindow (Display *xdisplay,
Window frame_xwindow)
{
MetaDisplay *display;
MetaWindow *window;
display = meta_display_for_x_display (xdisplay);
window = meta_display_lookup_x_window (display, frame_xwindow);
if (window == NULL || window->frame == NULL)
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
return window->xwindow;
}
MetaFrameFlags
meta_core_get_frame_flags (Display *xdisplay,
Window frame_xwindow)
@@ -217,6 +234,22 @@ meta_core_user_raise (Display *xdisplay,
meta_window_raise (window);
}
void
meta_core_user_lower (Display *xdisplay,
Window frame_xwindow)
{
MetaDisplay *display;
MetaWindow *window;
display = meta_display_for_x_display (xdisplay);
window = meta_display_lookup_x_window (display, frame_xwindow);
if (window == NULL || window->frame == NULL)
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
meta_window_lower (window);
}
void
meta_core_user_focus (Display *xdisplay,
Window frame_xwindow,
@@ -306,6 +339,25 @@ meta_core_maximize (Display *xdisplay,
meta_window_maximize (window);
}
void
meta_core_toggle_maximize (Display *xdisplay,
Window frame_xwindow)
{
MetaDisplay *display;
MetaWindow *window;
display = meta_display_for_x_display (xdisplay);
window = meta_display_lookup_x_window (display, frame_xwindow);
if (window == NULL || window->frame == NULL)
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
if (window->maximized)
meta_window_unmaximize (window);
else
meta_window_maximize (window);
}
void
meta_core_unmaximize (Display *xdisplay,
Window frame_xwindow)
@@ -418,9 +470,8 @@ meta_core_change_workspace (Display *xdisplay,
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
meta_window_change_workspace (window,
meta_display_get_workspace_by_screen_index (display,
window->screen,
new_workspace));
meta_screen_get_workspace_by_index (window->screen,
new_workspace));
}
int
@@ -440,7 +491,7 @@ meta_core_get_active_workspace (Screen *xscreen)
screen = meta_screen_for_x_screen (xscreen);
return meta_workspace_screen_index (screen->active_workspace);
return meta_workspace_index (screen->active_workspace);
}
int
@@ -606,16 +657,20 @@ meta_core_get_menu_accelerator (MetaMenuOp menu_op,
}
}
char *
const char*
meta_core_get_workspace_name_with_index (Display *xdisplay,
int index)
Window xroot,
int index)
{
MetaDisplay *display;
MetaScreen *screen;
MetaWorkspace *workspace;
display = meta_display_for_x_display (xdisplay);
workspace = meta_display_get_workspace_by_index (display, index);
return (workspace != NULL) ? workspace->name : NULL;
screen = meta_display_screen_for_root (display, xroot);
g_assert (screen != NULL);
workspace = meta_screen_get_workspace_by_index (screen, index);
return workspace ? meta_workspace_get_name (workspace) : NULL;
}
gboolean

View File

@@ -31,6 +31,9 @@ void meta_core_get_client_size (Display *xdisplay,
int *width,
int *height);
Window meta_core_get_client_xwindow (Display *xdisplay,
Window frame_xwindow);
MetaFrameFlags meta_core_get_frame_flags (Display *xdisplay,
Window frame_xwindow);
MetaFrameType meta_core_get_frame_type (Display *xdisplay,
@@ -57,6 +60,8 @@ void meta_core_user_resize (Display *xdisplay,
void meta_core_user_raise (Display *xdisplay,
Window frame_xwindow);
void meta_core_user_lower (Display *xdisplay,
Window frame_xwindow);
void meta_core_user_focus (Display *xdisplay,
Window frame_xwindow,
@@ -75,6 +80,8 @@ void meta_core_get_size (Display *xdisplay,
void meta_core_minimize (Display *xdisplay,
Window frame_xwindow);
void meta_core_toggle_maximize (Display *xdisplay,
Window frame_xwindow);
void meta_core_unmaximize (Display *xdisplay,
Window frame_xwindow);
void meta_core_maximize (Display *xdisplay,
@@ -98,8 +105,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,
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 */
}
@@ -371,7 +369,7 @@ meta_window_delete (MetaWindow *window,
window->desc);
XKillClient (window->display->xdisplay, window->xwindow);
}
meta_error_trap_pop (window->display);
meta_error_trap_pop (window->display, FALSE);
meta_display_ping_window (window->display,
window,
@@ -438,7 +436,7 @@ meta_window_kill (MetaWindow *window)
window->desc);
meta_error_trap_push (window->display);
XKillClient (window->display->xdisplay, window->xwindow);
meta_error_trap_pop (window->display);
meta_error_trap_pop (window->display, FALSE);
}
void

File diff suppressed because it is too large Load Diff

View File

@@ -2,6 +2,7 @@
/*
* Copyright (C) 2001 Havoc Pennington
* 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
@@ -22,11 +23,23 @@
#ifndef META_DISPLAY_H
#define META_DISPLAY_H
#ifndef PACKAGE
#error "config.h not included"
#endif
#include <glib.h>
#include <X11/Xlib.h>
#include "eventqueue.h"
#include "common.h"
#ifdef HAVE_STARTUP_NOTIFICATION
#include <libsn/sn.h>
#endif
#ifdef HAVE_XSYNC
#include <X11/extensions/sync.h>
#endif
#define meta_XFree(p) do { if ((p)) XFree ((p)); } while (0)
/* this doesn't really belong here, oh well. */
@@ -49,6 +62,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);
@@ -123,7 +139,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;
@@ -149,6 +165,13 @@ 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;
Atom atom_metacity_update_counter;
Atom atom_sync_counter;
Atom atom_gnome_panel_action;
Atom atom_gnome_panel_action_main_menu;
Atom atom_gnome_panel_action_run_dialog;
/* This is the actual window from focus events,
* not the one we last set
@@ -162,14 +185,12 @@ struct _MetaDisplay
/* Most recently focused list. Always contains all
* live windows.
*/
GList *mru_list;
GList *workspaces;
GList *mru_list;
guint showing_desktop : 1;
guint static_gravity_works : 1;
/*< private-ish >*/
guint error_trap_synced_at_last_pop : 1;
MetaEventQueue *events;
GSList *screens;
GHashTable *window_ids;
@@ -204,6 +225,9 @@ struct _MetaDisplay
/* Pending autoraise */
guint autoraise_timeout_id;
/* Alt+click button grabs */
unsigned int window_grab_modifiers;
/* current window operation */
MetaGrabOp grab_op;
@@ -215,6 +239,8 @@ struct _MetaDisplay
int grab_initial_root_y;
int grab_current_root_x;
int grab_current_root_y;
int grab_latest_motion_x;
int grab_latest_motion_y;
gulong grab_mask;
guint grab_have_pointer : 1;
guint grab_have_keyboard : 1;
@@ -222,15 +248,22 @@ struct _MetaDisplay
MetaRectangle grab_current_window_pos;
MetaResizePopup *grab_resize_popup;
GTimeVal grab_last_moveresize_time;
Time grab_motion_notify_time;
#ifdef HAVE_XKB
int xkb_base_event_type;
#endif
#ifdef HAVE_XSYNC
/* alarm monitoring client's _METACITY_UPDATE_COUNTER */
XSyncAlarm grab_update_alarm;
#endif
/* Keybindings stuff */
MetaKeyBinding *screen_bindings;
int n_screen_bindings;
MetaKeyBinding *window_bindings;
int n_window_bindings;
int min_keycode;
int max_keycode;
unsigned int min_keycode;
unsigned int max_keycode;
KeySym *keymap;
int keysyms_per_keycode;
XModifierKeymap *modmap;
@@ -249,6 +282,34 @@ struct _MetaDisplay
/* Managed by group.c */
GHashTable *groups_by_leader;
/* 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
SnDisplay *sn_display;
#endif
#ifdef HAVE_XSYNC
int xsync_event_base;
int xsync_error_base;
#define META_DISPLAY_HAS_XSYNC(display) ((display)->xsync_event_base != 0)
#else
#define META_DISPLAY_HAS_XSYNC(display) FALSE
#endif
#ifdef HAVE_SHAPE
int shape_event_base;
int shape_error_base;
#define META_DISPLAY_HAS_SHAPE(display) ((display)->shape_event_base != 0)
#else
#define META_DISPLAY_HAS_SHAPE(display) FALSE
#endif
};
gboolean meta_display_open (const char *name);
@@ -285,12 +346,6 @@ GSList* meta_display_list_windows (MetaDisplay *display);
MetaDisplay* meta_display_for_x_display (Display *xdisplay);
GSList* meta_displays_list (void);
MetaWorkspace* meta_display_get_workspace_by_index (MetaDisplay *display,
int index);
MetaWorkspace* meta_display_get_workspace_by_screen_index (MetaDisplay *display,
MetaScreen *screen,
int index);
Cursor meta_display_create_x_cursor (MetaDisplay *display,
MetaCursor cursor);
@@ -329,10 +384,6 @@ void meta_display_increment_event_serial (MetaDisplay *display);
void meta_display_update_active_window_hint (MetaDisplay *display);
/* Show/hide the desktop (temporarily hide all windows) */
void meta_display_show_desktop (MetaDisplay *display);
void meta_display_unshow_desktop (MetaDisplay *display);
guint32 meta_display_get_current_time (MetaDisplay *display);
/* utility goo */
@@ -359,10 +410,10 @@ typedef enum
} MetaTabList;
GSList* meta_display_get_tab_list (MetaDisplay *display,
MetaTabList type,
MetaScreen *screen,
MetaWorkspace *workspace);
GList* meta_display_get_tab_list (MetaDisplay *display,
MetaTabList type,
MetaScreen *screen,
MetaWorkspace *workspace);
MetaWindow* meta_display_get_tab_next (MetaDisplay *display,
MetaTabList type,
@@ -378,8 +429,15 @@ MetaWindow* meta_display_get_tab_current (MetaDisplay *display,
int meta_resize_gravity_from_grab_op (MetaGrabOp op);
gboolean meta_grab_op_is_moving (MetaGrabOp op);
gboolean meta_grab_op_is_resizing (MetaGrabOp op);
gboolean meta_rectangle_intersect (MetaRectangle *src1,
MetaRectangle *src2,
MetaRectangle *dest);
void meta_display_devirtualize_modifiers (MetaDisplay *display,
MetaVirtualModifier modifiers,
unsigned int *mask);
#endif

View File

@@ -333,7 +333,9 @@ meta_effects_draw_box_animation (MetaScreen *screen,
}
else
{
context->image_window = meta_image_window_new (initial_rect->width,
context->image_window = meta_image_window_new (screen->display->xdisplay,
screen->number,
initial_rect->width,
initial_rect->height);
context->orig_pixbuf = pix;
meta_image_window_set (context->image_window,

View File

@@ -37,13 +37,19 @@ meta_errors_init (void)
XSetIOErrorHandler (x_io_error_handler);
}
void
meta_error_trap_push (MetaDisplay *display)
static void
meta_error_trap_push_internal (MetaDisplay *display,
gboolean need_sync)
{
/* GDK resets the error handler on each push */
int (* old_error_handler) (Display *,
XErrorEvent *);
if (need_sync)
{
XSync (display->xdisplay, False);
}
gdk_error_trap_push ();
/* old_error_handler will just be equal to x_error_handler
@@ -60,17 +66,22 @@ meta_error_trap_push (MetaDisplay *display)
}
display->error_traps += 1;
meta_topic (META_DEBUG_ERRORS, "%d traps remain\n", display->error_traps);
}
int
meta_error_trap_pop (MetaDisplay *display)
static int
meta_error_trap_pop_internal (MetaDisplay *display,
gboolean need_sync)
{
int result;
g_assert (display->error_traps > 0);
/* just use GDK trap, but we do the sync since GDK doesn't */
XSync (display->xdisplay, False);
if (need_sync)
{
XSync (display->xdisplay, False);
}
result = gdk_error_trap_pop ();
@@ -92,9 +103,75 @@ meta_error_trap_pop (MetaDisplay *display)
display->error_trap_handler = NULL;
}
meta_topic (META_DEBUG_ERRORS, "%d traps\n", display->error_traps);
return result;
}
void
meta_error_trap_push (MetaDisplay *display)
{
meta_error_trap_push_internal (display, FALSE);
}
void
meta_error_trap_pop (MetaDisplay *display,
gboolean last_request_was_roundtrip)
{
gboolean need_sync;
/* we only have to sync when popping the outermost trap */
need_sync = (display->error_traps == 1 && !last_request_was_roundtrip);
if (need_sync)
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;
meta_error_trap_pop_internal (display, need_sync);
}
void
meta_error_trap_push_with_return (MetaDisplay *display)
{
gboolean need_sync;
/* We don't sync on push_with_return if there are no traps
* currently, because we assume that any errors were either covered
* by a previous pop, or were fatal.
*
* More generally, we don't sync if we were synchronized last time
* we popped. This is known to be the case if there are no traps,
* but we also keep a flag so we know whether it's the case otherwise.
*/
if (!display->error_trap_synced_at_last_pop)
need_sync = TRUE;
else
need_sync = FALSE;
if (need_sync)
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);
}
int
meta_error_trap_pop_with_return (MetaDisplay *display,
gboolean last_request_was_roundtrip)
{
if (!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;
return meta_error_trap_pop_internal (display,
!last_request_was_roundtrip);
}
static int
x_error_handler (Display *xdisplay,
XErrorEvent *error)

View File

@@ -25,9 +25,15 @@
#include "util.h"
#include "display.h"
void meta_errors_init (void);
void meta_error_trap_push (MetaDisplay *display);
void meta_errors_init (void);
void meta_error_trap_push (MetaDisplay *display);
void meta_error_trap_pop (MetaDisplay *display,
gboolean last_request_was_roundtrip);
void meta_error_trap_push_with_return (MetaDisplay *display);
/* returns X error code, or 0 for no error */
int meta_error_trap_pop (MetaDisplay *display);
int meta_error_trap_pop_with_return (MetaDisplay *display,
gboolean last_request_was_roundtrip);
#endif

View File

@@ -19,7 +19,9 @@
* 02111-1307, USA.
*/
#include <config.h>
#include "frame.h"
#include "bell.h"
#include "errors.h"
#include "keybindings.h"
@@ -57,6 +59,8 @@ meta_window_ensure_frame (MetaWindow *window)
frame->current_cursor = 0;
frame->mapped = FALSE;
frame->need_reapply_frame_shape = TRUE;
frame->is_flashing = FALSE;
attrs.event_mask = EVENT_MASK;
@@ -124,7 +128,7 @@ meta_window_ensure_frame (MetaWindow *window)
window->rect.x,
window->rect.y);
/* FIXME handle this error */
meta_error_trap_pop (window->display);
meta_error_trap_pop (window->display, FALSE);
/* stick frame to the window */
window->frame = frame;
@@ -143,7 +147,9 @@ meta_window_ensure_frame (MetaWindow *window)
meta_ui_apply_frame_shape (frame->window->screen->ui,
frame->xwindow,
frame->rect.width,
frame->rect.height);
frame->rect.height,
frame->window->has_shape);
frame->need_reapply_frame_shape = FALSE;
meta_display_ungrab (window->display);
}
@@ -158,6 +164,7 @@ meta_window_destroy_frame (MetaWindow *window)
frame = window->frame;
meta_bell_notify_frame_destroy (frame);
meta_ui_remove_frame (window->screen->ui, frame->xwindow);
/* Unparent the client window; it may be destroyed,
@@ -180,7 +187,7 @@ meta_window_destroy_frame (MetaWindow *window)
/* FIXME where to put it back depends on the gravity */
window->frame->rect.x,
window->frame->rect.y);
meta_error_trap_pop (window->display);
meta_error_trap_pop (window->display, FALSE);
meta_display_unregister_x_window (window->display,
frame->xwindow);
@@ -254,6 +261,9 @@ meta_frame_get_flags (MetaFrame *frame)
if (frame->window->fullscreen)
flags |= META_FRAME_FULLSCREEN;
if (frame->is_flashing)
flags |= META_FRAME_IS_FLASHING;
return flags;
}
@@ -276,6 +286,20 @@ meta_frame_calc_geometry (MetaFrame *frame,
*geomp = geom;
}
static void
update_shape (MetaFrame *frame)
{
if (frame->need_reapply_frame_shape)
{
meta_ui_apply_frame_shape (frame->window->screen->ui,
frame->xwindow,
frame->rect.width,
frame->rect.height,
frame->window->has_shape);
frame->need_reapply_frame_shape = FALSE;
}
}
void
meta_frame_sync_to_window (MetaFrame *frame,
int resize_gravity,
@@ -283,8 +307,11 @@ meta_frame_sync_to_window (MetaFrame *frame,
gboolean need_resize)
{
if (!(need_move || need_resize))
return;
{
update_shape (frame);
return;
}
meta_topic (META_DEBUG_GEOMETRY,
"Syncing frame geometry %d,%d %dx%d (SE: %d,%d)\n",
frame->rect.x, frame->rect.y,
@@ -300,18 +327,17 @@ meta_frame_sync_to_window (MetaFrame *frame,
frame->rect.width,
frame->rect.height);
/* Done before the window resize, because doing it before means
* part of the window being resized becomes unshaped, which may
* be sort of hard to see with bg = None. If we did it after
* window resize, part of the window being resized would become
* shaped, which might be more visible.
*/
meta_ui_apply_frame_shape (frame->window->screen->ui,
frame->xwindow,
frame->rect.width,
frame->rect.height);
/* we need new shape if we're resized */
frame->need_reapply_frame_shape = TRUE;
}
/* Done before the window resize, because doing it before means
* part of the window being resized becomes unshaped, which may
* be sort of hard to see with bg = None. If we did it after
* window resize, part of the window being resized would become
* shaped, which might be more visible.
*/
update_shape (frame);
if (need_move && need_resize)
XMoveResizeWindow (frame->window->display->xdisplay,

View File

@@ -57,6 +57,8 @@ struct _MetaFrame
int bottom_height;
guint mapped : 1;
guint need_reapply_frame_shape : 1;
guint is_flashing : 1; /* used by the visual bell flash */
};
void meta_window_ensure_frame (MetaWindow *window);

View File

@@ -73,7 +73,9 @@ static void meta_frames_ensure_layout (MetaFrames *frames,
static MetaUIFrame* meta_frames_lookup_window (MetaFrames *frames,
Window xwindow);
static void meta_frames_font_changed (MetaFrames *frames);
static void meta_frames_font_changed (MetaFrames *frames);
static void meta_frames_button_layout_changed (MetaFrames *frames);
static GdkRectangle* control_rect (MetaFrameControl control,
MetaFrameGeometry *fgeom);
@@ -161,12 +163,19 @@ unsigned_long_hash (gconstpointer v)
}
static void
font_changed_callback (MetaPreference pref,
void *data)
prefs_changed_callback (MetaPreference pref,
void *data)
{
if (pref == META_PREF_TITLEBAR_FONT)
switch (pref)
{
case META_PREF_TITLEBAR_FONT:
meta_frames_font_changed (META_FRAMES (data));
break;
case META_PREF_BUTTON_LAYOUT:
meta_frames_button_layout_changed (META_FRAMES (data));
break;
default:
break;
}
}
@@ -185,7 +194,7 @@ meta_frames_init (MetaFrames *frames)
gtk_widget_set_double_buffered (GTK_WIDGET (frames), FALSE);
meta_prefs_add_listener (font_changed_callback, frames);
meta_prefs_add_listener (prefs_changed_callback, frames);
}
static void
@@ -237,7 +246,7 @@ meta_frames_finalize (GObject *object)
frames = META_FRAMES (object);
meta_prefs_remove_listener (font_changed_callback, frames);
meta_prefs_remove_listener (prefs_changed_callback, frames);
g_hash_table_destroy (frames->text_heights);
@@ -292,6 +301,31 @@ meta_frames_font_changed (MetaFrames *frames)
}
static void
queue_draw_func (gpointer key, gpointer value, gpointer data)
{
MetaUIFrame *frame;
MetaFrames *frames;
frames = META_FRAMES (data);
frame = value;
/* If a resize occurs it will cause a redraw, but the
* resize may not actually be needed so we always redraw
* in case of color change.
*/
gtk_style_set_background (GTK_WIDGET (frames)->style,
frame->window, GTK_STATE_NORMAL);
gdk_window_invalidate_rect (frame->window, NULL, FALSE);
}
static void
meta_frames_button_layout_changed (MetaFrames *frames)
{
g_hash_table_foreach (frames->frames,
queue_draw_func, frames);
}
static void
meta_frames_style_set (GtkWidget *widget,
GtkStyle *prev_style)
@@ -394,6 +428,7 @@ meta_frames_calc_geometry (MetaFrames *frames,
int width, height;
MetaFrameFlags flags;
MetaFrameType type;
MetaButtonLayout button_layout;
meta_core_get_client_size (gdk_display, frame->xwindow,
&width, &height);
@@ -402,12 +437,15 @@ meta_frames_calc_geometry (MetaFrames *frames,
type = meta_core_get_frame_type (gdk_display, frame->xwindow);
meta_frames_ensure_layout (frames, frame);
meta_prefs_get_button_layout (&button_layout);
meta_theme_calc_geometry (meta_theme_get_current (),
type,
frame->text_height,
flags,
width, height,
&button_layout,
fgeom);
}
@@ -457,6 +495,7 @@ meta_frames_manage_window (MetaFrames *frames,
frame->text_height = -1;
frame->title = NULL;
frame->expose_delayed = FALSE;
frame->shape_applied = FALSE;
frame->prelit_control = META_FRAME_CONTROL_NONE;
meta_core_grab_buttons (gdk_display, frame->xwindow);
@@ -626,7 +665,8 @@ void
meta_frames_apply_shapes (MetaFrames *frames,
Window xwindow,
int new_window_width,
int new_window_height)
int new_window_height,
gboolean window_has_shape)
{
#ifdef HAVE_SHAPE
/* Apply shapes as if window had new_window_width, new_window_height */
@@ -647,10 +687,25 @@ meta_frames_apply_shapes (MetaFrames *frames,
if (!(fgeom.top_left_corner_rounded ||
fgeom.top_right_corner_rounded ||
fgeom.bottom_left_corner_rounded ||
fgeom.bottom_right_corner_rounded))
fgeom.bottom_right_corner_rounded ||
window_has_shape))
{
XShapeCombineMask (gdk_display, frame->xwindow,
ShapeBounding, 0, 0, None, ShapeSet);
if (frame->shape_applied)
{
meta_topic (META_DEBUG_SHAPES,
"Unsetting shape mask on frame 0x%lx\n",
frame->xwindow);
XShapeCombineMask (gdk_display, frame->xwindow,
ShapeBounding, 0, 0, None, ShapeSet);
frame->shape_applied = FALSE;
}
else
{
meta_topic (META_DEBUG_SHAPES,
"Frame 0x%lx still doesn't need a shape mask\n",
frame->xwindow);
}
return; /* nothing to do */
}
@@ -766,12 +821,105 @@ meta_frames_apply_shapes (MetaFrames *frames,
XSubtractRegion (window_xregion, corners_xregion, window_xregion);
XShapeCombineRegion (gdk_display, frame->xwindow,
ShapeBounding, 0, 0, window_xregion, ShapeSet);
XDestroyRegion (corners_xregion);
if (window_has_shape)
{
/* The client window is oclock or something and has a shape
* mask. To avoid a round trip to get its shape region, we
* create a fake window that's never mapped, build up our shape
* on that, then combine. Wasting the window is assumed cheaper
* than a round trip, but who really knows for sure.
*/
XSetWindowAttributes attrs;
Window shape_window;
Window client_window;
Region client_xregion;
#ifdef HAVE_GTK_MULTIHEAD
GdkScreen *screen;
#endif
int screen_number;
meta_topic (META_DEBUG_SHAPES,
"Frame 0x%lx needs to incorporate client shape\n",
frame->xwindow);
#ifdef HAVE_GTK_MULTIHEAD
screen = gtk_widget_get_screen (GTK_WIDGET (frames));
screen_number = gdk_x11_screen_get_screen_number (screen);
#else
screen_number = DefaultScreen (gdk_display);
#endif
attrs.override_redirect = True;
shape_window = XCreateWindow (gdk_display,
RootWindow (gdk_display, screen_number),
-5000, -5000,
new_window_width,
new_window_height,
0,
CopyFromParent,
CopyFromParent,
CopyFromParent,
CWOverrideRedirect,
&attrs);
/* Copy the client's shape to the temporary shape_window */
client_window = meta_core_get_client_xwindow (gdk_display,
frame->xwindow);
XShapeCombineShape (gdk_display, shape_window, ShapeBounding,
fgeom.left_width,
fgeom.top_height,
client_window,
ShapeBounding,
ShapeSet);
/* Punch the client area out of the normal frame shape,
* then union it with the shape_window's existing shape
*/
client_xregion = XCreateRegion ();
xrect.x = fgeom.left_width;
xrect.y = fgeom.top_height;
xrect.width = new_window_width - fgeom.right_width - xrect.x;
xrect.height = new_window_height - fgeom.bottom_height - xrect.y;
XUnionRectWithRegion (&xrect, client_xregion, client_xregion);
XSubtractRegion (window_xregion, client_xregion, window_xregion);
XDestroyRegion (client_xregion);
XShapeCombineRegion (gdk_display, shape_window,
ShapeBounding, 0, 0, window_xregion, ShapeUnion);
/* Now copy shape_window shape to the real frame */
XShapeCombineShape (gdk_display, frame->xwindow, ShapeBounding,
0, 0,
shape_window,
ShapeBounding,
ShapeSet);
XDestroyWindow (gdk_display, shape_window);
}
else
{
/* No shape on the client, so just do simple stuff */
meta_topic (META_DEBUG_SHAPES,
"Frame 0x%lx has shaped corners\n",
frame->xwindow);
XShapeCombineRegion (gdk_display, frame->xwindow,
ShapeBounding, 0, 0, window_xregion, ShapeSet);
}
frame->shape_applied = TRUE;
XDestroyRegion (window_xregion);
XDestroyRegion (corners_xregion);
#endif
#endif /* HAVE_SHAPE */
}
void
@@ -1030,18 +1178,41 @@ meta_frames_button_press_event (GtkWidget *widget,
{
MetaFrameFlags flags;
flags = meta_core_get_frame_flags (gdk_display, frame->xwindow);
if (flags & META_FRAME_ALLOWS_SHADE)
switch (meta_prefs_get_action_double_click_titlebar ())
{
if (flags & META_FRAME_SHADED)
meta_core_unshade (gdk_display,
frame->xwindow);
else
meta_core_shade (gdk_display,
frame->xwindow);
}
case META_ACTION_DOUBLE_CLICK_TITLEBAR_TOGGLE_SHADE:
{
flags = meta_core_get_frame_flags (gdk_display, frame->xwindow);
if (flags & META_FRAME_ALLOWS_SHADE)
{
if (flags & META_FRAME_SHADED)
meta_core_unshade (gdk_display,
frame->xwindow);
else
meta_core_shade (gdk_display,
frame->xwindow);
}
}
break;
case META_ACTION_DOUBLE_CLICK_TITLEBAR_TOGGLE_MAXIMIZE:
{
MetaFrameFlags flags;
flags = meta_core_get_frame_flags (gdk_display, frame->xwindow);
if (flags & META_FRAME_ALLOWS_MAXIMIZE)
{
meta_core_toggle_maximize (gdk_display, frame->xwindow);
}
}
break;
case META_ACTION_DOUBLE_CLICK_TITLEBAR_LAST:
break;
}
return TRUE;
}
@@ -1169,8 +1340,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;
@@ -1190,6 +1360,10 @@ meta_frames_button_press_event (GtkWidget *widget,
event->y_root);
}
}
else if (event->button == 2)
{
meta_core_user_lower (gdk_display, frame->xwindow);
}
else if (event->button == 3)
{
meta_core_show_window_menu (gdk_display,
@@ -1524,6 +1698,7 @@ meta_frames_paint_to_drawable (MetaFrames *frames,
GdkRectangle *areas;
int n_areas;
int screen_width, screen_height;
MetaButtonLayout button_layout;
widget = GTK_WIDGET (frames);
@@ -1656,10 +1831,12 @@ meta_frames_paint_to_drawable (MetaFrames *frames,
/* Now draw remaining portion of region */
gdk_region_get_rectangles (edges, &areas, &n_areas);
meta_prefs_get_button_layout (&button_layout);
i = 0;
while (i < n_areas)
{
{
if (GDK_IS_WINDOW (drawable))
gdk_window_begin_paint_rect (drawable, &areas[i]);
@@ -1673,6 +1850,7 @@ meta_frames_paint_to_drawable (MetaFrames *frames,
w, h,
frame->layout,
frame->text_height,
&button_layout,
button_states,
mini_icon, icon);
@@ -1787,14 +1965,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;
@@ -1806,16 +1987,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))
{
@@ -1824,83 +2008,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

View File

@@ -72,7 +72,8 @@ struct _MetaUIFrame
int text_height;
char *title; /* NULL once we have a layout */
guint expose_delayed : 1;
guint shape_applied : 1;
/* FIXME get rid of this, it can just be in the MetaFrames struct */
MetaFrameControl prelit_control;
};
@@ -127,7 +128,8 @@ void meta_frames_unflicker_bg (MetaFrames *frames,
void meta_frames_apply_shapes (MetaFrames *frames,
Window xwindow,
int new_window_width,
int new_window_height);
int new_window_height,
gboolean window_has_shape);
void meta_frames_queue_draw (MetaFrames *frames,
Window xwindow);

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

@@ -19,24 +19,23 @@
* 02111-1307, USA.
*/
#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;
@@ -53,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;
}
@@ -65,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,
@@ -77,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);
}
}
@@ -84,16 +103,26 @@ meta_group_unref (MetaGroup *group)
MetaGroup*
meta_window_get_group (MetaWindow *window)
{
if (window->cached_group == NULL &&
window->xgroup_leader != None) /* some windows have no group */
if (window->unmanaging)
return NULL;
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)
{
@@ -102,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);
@@ -128,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)
@@ -186,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

@@ -19,6 +19,7 @@
* 02111-1307, USA.
*/
#include <config.h>
#include "iconcache.h"
#include "ui.h"
#include "errors.h"
@@ -231,7 +232,7 @@ read_rgb_icon (MetaDisplay *display,
gulong *best_mini;
int mini_w, mini_h;
meta_error_trap_push (display);
meta_error_trap_push_with_return (display);
type = None;
data = NULL;
result = XGetWindowProperty (display->xdisplay,
@@ -241,7 +242,7 @@ read_rgb_icon (MetaDisplay *display,
False, XA_CARDINAL, &type, &format, &nitems,
&bytes_after, ((guchar **)&data));
err = meta_error_trap_pop (display);
err = meta_error_trap_pop_with_return (display, TRUE);
if (err != Success ||
result != Success)
@@ -406,7 +407,7 @@ try_pixmap_and_mask (MetaDisplay *display,
w, h);
}
meta_error_trap_pop (display);
meta_error_trap_pop (display, FALSE);
if (mask)
{
@@ -470,7 +471,7 @@ get_kwm_win_icon (MetaDisplay *display,
*pixmap = None;
*mask = None;
meta_error_trap_push (display);
meta_error_trap_push_with_return (display);
icons = NULL;
result = XGetWindowProperty (display->xdisplay, xwindow,
display->atom_kwm_win_icon,
@@ -480,7 +481,7 @@ get_kwm_win_icon (MetaDisplay *display,
&type, &format, &nitems,
&bytes_after, (guchar **)&icons);
err = meta_error_trap_pop (display);
err = meta_error_trap_pop_with_return (display, TRUE);
if (err != Success ||
result != Success)
return;

File diff suppressed because it is too large Load Diff

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

@@ -55,12 +55,13 @@ log_handler (const gchar *log_domain,
gpointer user_data)
{
meta_warning ("Log level %d: %s\n", log_level, message);
meta_print_backtrace ();
}
static void
usage (void)
{
g_print (_("metacity [--disable-sm] [--sm-save-file=FILENAME] [--display=DISPLAY] [--replace] [--version]\n"));
g_print (_("metacity [--sm-disable] [--sm-client-id=ID] [--sm-save-file=FILENAME] [--display=DISPLAY] [--replace] [--version]\n"));
exit (1);
}
@@ -270,6 +271,22 @@ main (int argc, char **argv)
#else
meta_topic (META_DEBUG_XINERAMA, " (not using Solaris Xinerama)\n");
#endif
#ifdef HAVE_XSYNC
meta_verbose ("Compiled with sync extension\n");
#else
meta_verbose ("Compiled without sync extension\n");
#endif
#ifdef HAVE_RANDR
meta_verbose ("Compiled with randr extension\n");
#else
meta_verbose ("Compiled without randr extension\n");
#endif
#ifdef HAVE_STARTUP_NOTIFICATION
meta_verbose ("Compiled with startup notification\n");
#else
meta_verbose ("Compiled without startup notification\n");
#endif
/* Load prefs */
meta_prefs_init ();
@@ -284,6 +301,9 @@ main (int argc, char **argv)
g_log_set_handler (NULL,
G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION,
log_handler, NULL);
g_log_set_handler (G_LOG_DOMAIN,
G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION,
log_handler, NULL);
g_log_set_handler ("Gtk",
G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION,
log_handler, NULL);
@@ -312,6 +332,9 @@ main (int argc, char **argv)
/* Try some panic stuff, this is lame but we really
* don't want users to lose their WM :-/
*/
if (!meta_ui_have_a_theme ())
meta_ui_set_current_theme ("Simple", FALSE);
if (!meta_ui_have_a_theme ())
meta_ui_set_current_theme ("Atlanta", FALSE);

View File

@@ -131,30 +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,
int index)
Window xroot,
int index)
{
char *name;
unsigned int number;
const char *name;
int number;
name = meta_core_get_workspace_name_with_index (display, index);
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
{
@@ -163,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*
@@ -308,13 +316,26 @@ meta_window_menu_new (MetaFrames *frames,
meta_verbose ("Creating %d-workspace menu current space %d\n",
n_workspaces, active_workspace);
if (n_workspaces > 0)
if (n_workspaces > 1)
{
GtkWidget *mi;
Display *display;
Window xroot;
display = gdk_x11_drawable_get_xdisplay (GTK_WIDGET (frames)->window);
display = gdk_x11_drawable_get_xdisplay(GTK_WIDGET(frames)->window);
#ifdef HAVE_GTK_MULTIHEAD
{
GdkScreen *screen;
screen = gdk_drawable_get_screen (GTK_WIDGET (frames)->window);
xroot = GDK_DRAWABLE_XID (gdk_screen_get_root_window (screen));
}
#else
{
xroot = gdk_x11_get_default_root_xwindow ();
}
#endif
i = 0;
while (i < n_workspaces)
{
@@ -327,7 +348,7 @@ meta_window_menu_new (MetaFrames *frames,
i + 1,
&key, &mods);
name = get_workspace_name_with_accel (display, i);
name = get_workspace_name_with_accel (display, xroot, i);
if (ops & META_MENU_OP_UNSTICK)
label = g_strdup_printf (_("Only on %s"), name);
else

134
src/metacity-Xatomtype.h Normal file
View File

@@ -0,0 +1,134 @@
/* $Xorg: Xatomtype.h,v 1.4 2001/02/09 02:03:38 xorgcvs Exp $ */
/***********************************************************
Copyright 1987, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
#ifndef _XATOMTYPE_H_
#define _XATOMTYPE_H_
/*
* This files defines crock C structures for calling XGetWindowProperty and
* XChangeProperty. All fields must be longs as the semantics of property
* routines will handle conversion to and from actual 32 bit objects. If your
* compiler doesn't treat &structoflongs the same as &arrayoflongs[0], you
* will have some work to do.
*/
#define BOOL long
#define SIGNEDINT long
#define UNSIGNEDINT unsigned long
#define RESOURCEID unsigned long
/* this structure may be extended, but do not change the order */
typedef struct {
UNSIGNEDINT flags;
SIGNEDINT x, y, width, height; /* need to cvt; only for pre-ICCCM */
SIGNEDINT minWidth, minHeight; /* need to cvt */
SIGNEDINT maxWidth, maxHeight; /* need to cvt */
SIGNEDINT widthInc, heightInc; /* need to cvt */
SIGNEDINT minAspectX, minAspectY; /* need to cvt */
SIGNEDINT maxAspectX, maxAspectY; /* need to cvt */
SIGNEDINT baseWidth,baseHeight; /* need to cvt; ICCCM version 1 */
SIGNEDINT winGravity; /* need to cvt; ICCCM version 1 */
} xPropSizeHints;
#define OldNumPropSizeElements 15 /* pre-ICCCM */
#define NumPropSizeElements 18 /* ICCCM version 1 */
/* this structure may be extended, but do not change the order */
/* RGB properties */
typedef struct {
RESOURCEID colormap;
UNSIGNEDINT red_max;
UNSIGNEDINT red_mult;
UNSIGNEDINT green_max;
UNSIGNEDINT green_mult;
UNSIGNEDINT blue_max;
UNSIGNEDINT blue_mult;
UNSIGNEDINT base_pixel;
RESOURCEID visualid; /* ICCCM version 1 */
RESOURCEID killid; /* ICCCM version 1 */
} xPropStandardColormap;
#define OldNumPropStandardColormapElements 8 /* pre-ICCCM */
#define NumPropStandardColormapElements 10 /* ICCCM version 1 */
/* this structure may be extended, but do not change the order */
typedef struct {
UNSIGNEDINT flags;
BOOL input; /* need to convert */
SIGNEDINT initialState; /* need to cvt */
RESOURCEID iconPixmap;
RESOURCEID iconWindow;
SIGNEDINT iconX; /* need to cvt */
SIGNEDINT iconY; /* need to cvt */
RESOURCEID iconMask;
UNSIGNEDINT windowGroup;
} xPropWMHints;
#define NumPropWMHintsElements 9 /* number of elements in this structure */
/* this structure defines the icon size hints information */
typedef struct {
SIGNEDINT minWidth, minHeight; /* need to cvt */
SIGNEDINT maxWidth, maxHeight; /* need to cvt */
SIGNEDINT widthInc, heightInc; /* need to cvt */
} xPropIconSize;
#define NumPropIconSizeElements 6 /* number of elements in this structure */
/* this structure defines the window manager state information */
typedef struct {
SIGNEDINT state; /* need to cvt */
RESOURCEID iconWindow;
} xPropWMState;
#define NumPropWMStateElements 2 /* number of elements in struct */
#undef BOOL
#undef SIGNEDINT
#undef UNSIGNEDINT
#undef RESOURCEID
#endif /* _XATOMTYPE_H_ */

View File

@@ -1,6 +1,11 @@
[Desktop Entry]
_Name=Metacity
Exec=metacity
# name of loadable control center module
X-GNOME-WMSettingsModule=metacity
# name we put on the WM spec check window
X-GNOME-WMName=Metacity
# back compat only
X-GnomeWMSettingsLibrary=metacity
[Window Manager]

View File

@@ -3,6 +3,45 @@
<!-- General preferences -->
<schema>
<key>/schemas/apps/metacity/general/mouse_button_modifier</key>
<applyto>/apps/metacity/general/mouse_button_modifier</applyto>
<owner>metacity</owner>
<type>string</type>
<default>&lt;Alt&gt;</default>
<locale name="C">
<short>Modifier to use for modified window click actions</short>
<long>
Clicking a window while holding down this modifier key
will move the window (left click), resize the window
(middle click), or show the window menu (right click).
Modifier is expressed as "&lt;Alt&gt;" or "&lt;Super&gt;"
for example.
</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/metacity/general/button_layout</key>
<applyto>/apps/metacity/general/button_layout</applyto>
<owner>metacity</owner>
<type>string</type>
<default>menu:minimize,maximize,close</default>
<locale name="C">
<short>Arrangement of buttons on the titlebar</short>
<long>
Arrangement of buttons on the titlebar. The
value should be a string, such as
"menu:minimize,maximize,close"; the colon separates the
left corner of the window from the right corner, and
the button names are comma-separated. Duplicate buttons
are not allowed. Unknown button names are silently ignored
so that buttons can be added in future metacity versions
without breaking older versions.
</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/metacity/general/focus_mode</key>
<applyto>/apps/metacity/general/focus_mode</applyto>
@@ -22,6 +61,23 @@
</locale>
</schema>
<schema>
<key>/schemas/apps/metacity/general/action_double_click_titlebar</key>
<applyto>/apps/metacity/general/action_double_click_titlebar</applyto>
<owner>metacity</owner>
<type>string</type>
<default>toggle_shade</default>
<locale name="C">
<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
maximize/unmaximize the window.
</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/metacity/general/auto_raise</key>
<applyto>/apps/metacity/general/auto_raise</applyto>
@@ -58,7 +114,7 @@
<applyto>/apps/metacity/general/theme</applyto>
<owner>metacity</owner>
<type>string</type>
<default>Atlanta</default>
<default>Simple</default>
<locale name="C">
<short>Current theme</short>
<long>
@@ -121,6 +177,86 @@
</locale>
</schema>
<schema>
<key>/apps/metacity/visual_bell</key>
<applyto>/apps/metacity/general/visual_bell</applyto>
<owner>metacity</owner>
<type>bool</type>
<default>false</default>
<locale name="C">
<short>Enable Visual Bell</short>
<long>Turns on a visual indication when an application or the system
issues a 'bell' or 'beep'; useful for the hard-of-hearing and for use
in noisy environments, or when 'audible bell' is off.
</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/metacity/general/audible_bell</key>
<applyto>/apps/metacity/general/audible_bell</applyto>
<owner>metacity</owner>
<type>bool</type>
<default>true</default>
<locale name="C">
<short>System Bell is Audible</short>
<long>Determines whether applications or the system can generate audible
'beeps'; may be used in conjunction with 'visual bell' to
allow silent 'beeps'.
</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/metacity/general/visual_bell_type</key>
<applyto>/apps/metacity/general/visual_bell_type</applyto>
<owner>metacity</owner>
<type>string</type>
<default>fullscreen</default>
<locale name="C">
<short>Visual Bell Type</short>
<long>
Tells Metacity how to implement the visual indication that
the system bell or another application 'bell' indicator has
been rung. Currently there are two valid values, "fullscreen",
which causes a fullscreen white-black flash, and "frame_flash" which
causes the titlebar of the application which sent the bell signal to
flash. If the application which sent the bell is unknown (as is
usually the case for the default "system beep"), the currently
focused window's titlebar is flashed.
</long>
</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>
@@ -232,7 +368,7 @@ you set
<applyto>/apps/metacity/window_keybindings/toggle_shaded</applyto>
<owner>metacity</owner>
<type>string</type>
<default>disabled</default>
<default>&lt;Alt&gt;F12</default>
<locale name="C">
<short>Toggle shaded state</short>
<long>
@@ -341,7 +477,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.
@@ -738,7 +874,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
@@ -803,6 +939,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 -->
@@ -814,11 +995,12 @@ 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.
(Traditionally &lt;Alt&gt;Tab)
(Traditionally &lt;Alt&gt;Tab) Holding the "shift" key
while using this binding reverses the direction of movement.
The format looks like "&lt;Control&gt;a" or
"&lt;Shift&gt;&lt;Alt&gt;F1.
@@ -831,7 +1013,32 @@ you set
</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/metacity/global_keybindings/switch_windows_backward</key>
<applyto>/apps/metacity/global_keybindings/switch_windows_backward</applyto>
<owner>metacity</owner>
<type>string</type>
<default>disabled</default>
<locale name="C">
<short>Move focus backwards between windows using popup display</short>
<long>
The keybinding used to move focus backwards between windows, using
a popup window. Holding "shift" together with this
binding makes the direction go forward again.
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/global_keybindings/switch_panels</key>
<applyto>/apps/metacity/global_keybindings/switch_panels</applyto>
@@ -839,7 +1046,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.
@@ -856,6 +1063,30 @@ you set
</locale>
</schema>
<schema>
<key>/schemas/apps/metacity/global_keybindings/switch_panels_backward</key>
<applyto>/apps/metacity/global_keybindings/switch_panels_backward</applyto>
<owner>metacity</owner>
<type>string</type>
<default>disabled</default>
<locale name="C">
<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.
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/global_keybindings/cycle_windows</key>
<applyto>/apps/metacity/global_keybindings/cycle_windows</applyto>
@@ -863,11 +1094,12 @@ 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.
(Traditionally &lt;Alt&gt;Escape)
(Traditionally &lt;Alt&gt;Escape) Holding the "shift" key
while using this binding reverses the direction of movement.
The format looks like "&lt;Control&gt;a" or
"&lt;Shift&gt;&lt;Alt&gt;F1.
@@ -880,7 +1112,32 @@ you set
</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/metacity/global_keybindings/cycle_windows_backward</key>
<applyto>/apps/metacity/global_keybindings/cycle_windows_backward</applyto>
<owner>metacity</owner>
<type>string</type>
<default>disabled</default>
<locale name="C">
<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
binding makes the direction go forward again.
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/global_keybindings/cycle_panels</key>
<applyto>/apps/metacity/global_keybindings/cycle_panels</applyto>
@@ -888,7 +1145,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.
@@ -905,6 +1162,30 @@ you set
</locale>
</schema>
<schema>
<key>/schemas/apps/metacity/global_keybindings/cycle_panels_backward</key>
<applyto>/apps/metacity/global_keybindings/cycle_panels_backward</applyto>
<owner>metacity</owner>
<type>string</type>
<default>&lt;Control&gt;&lt;Alt&gt;Escape</default>
<locale name="C">
<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.
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/global_keybindings/show_desktop</key>
<applyto>/apps/metacity/global_keybindings/show_desktop</applyto>
@@ -1276,7 +1557,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.
@@ -1301,7 +1582,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.
@@ -1318,6 +1599,100 @@ you set
</locale>
</schema>
<schema>
<key>/schemas/apps/metacity/global_keybindings/panel_main_menu</key>
<applyto>/apps/metacity/global_keybindings/panel_main_menu</applyto>
<owner>metacity</owner>
<type>string</type>
<default>&lt;Alt&gt;F1</default>
<locale name="C">
<short>Show the panel menu</short>
<long>
The keybinding which shows the panel's main menu.
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/global_keybindings/panel_run_dialog</key>
<applyto>/apps/metacity/global_keybindings/panel_run_dialog</applyto>
<owner>metacity</owner>
<type>string</type>
<default>&lt;Alt&gt;F2</default>
<locale name="C">
<short>Show the panel run dialog</short>
<long>
The keybinding which display's the panel's "Run Program" dialog
box.
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/global_keybindings/run_command_screenshot</key>
<applyto>/apps/metacity/global_keybindings/run_command_screenshot</applyto>
<owner>metacity</owner>
<type>string</type>
<default>Print</default>
<locale name="C">
<short>Take a screenshot</short>
<long>
The keybinding which invokes the panel's screenshot utility.
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/global_keybindings/run_command_window_screenshot</key>
<applyto>/apps/metacity/global_keybindings/run_command_window_screenshot</applyto>
<owner>metacity</owner>
<type>string</type>
<default>&lt;Alt&gt;Print</default>
<locale name="C">
<short>Take a screenshot of a window</short>
<long>
The keybinding which invokes the panel's screenshot utility
to take a screenshot of a window.
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/global_keybindings/run_command</key>
<applyto>/apps/metacity/global_keybindings/run_command_1</applyto>
@@ -1355,6 +1730,38 @@ you set
<!-- commands to run with the run_command keybindings -->
<schema>
<key>/schemas/apps/metacity/keybinding_commands/command_screenshot</key>
<applyto>/apps/metacity/keybinding_commands/command_screenshot</applyto>
<owner>metacity</owner>
<type>string</type>
<default>gnome-panel-screenshot</default>
<locale name="C">
<short>The screenshot command</short>
<long>
The /apps/metacity/global_keybindings/run_command_screenshot
key defines a keybinding which causes the command specified
by this setting to be invoked.
</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/metacity/keybinding_commands/command_window_screenshot</key>
<applyto>/apps/metacity/keybinding_commands/command_window_screenshot</applyto>
<owner>metacity</owner>
<type>string</type>
<default>gnome-panel-screenshot --window</default>
<locale name="C">
<short>The window screenshot command</short>
<long>
The /apps/metacity/global_keybindings/run_command_window_screenshot
key defines a keybinding which causes the command specified
by this setting to be invoked.
</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/metacity/keybinding_commands/command</key>
<applyto>/apps/metacity/keybinding_commands/command_1</applyto>

View File

@@ -2,6 +2,8 @@
/*
* Copyright (C) 2001 Havoc Pennington
* Copyright (C) 2002, 2003 Red Hat, Inc.
* Copyright (C) 2003 Rob Adams
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -120,13 +122,13 @@ find_next_cascade (MetaWindow *window,
* cascade_x, cascade_y are the target position
* of NW corner of window frame.
*/
/* FIXME this is bogus because we get the current xinerama
* for the window based on its position, but we haven't
* placed it yet.
/* FIXME should use xinerama with mouse pointer
* (or better, xinerama where window was launched
* determined via startup notification)
*/
meta_window_get_work_area (window, TRUE, &work_area);
meta_window_get_work_area_for_xinerama (window, 0, &work_area);
cascade_x = MAX (0, work_area.x);
cascade_y = MAX (0, work_area.y);
@@ -363,14 +365,36 @@ topmost_cmp (gconstpointer a, gconstpointer b)
return 0;
}
static void
center_tile_rect_in_area (MetaRectangle *rect,
MetaRectangle *work_area)
{
int fluff;
/* The point here is to tile a window such that "extra"
* space is equal on either side (i.e. so a full screen
* of windows tiled this way would center the windows
* as a group)
*/
fluff = (work_area->width % rect->width) / 2;
rect->x = work_area->x + fluff;
fluff = (work_area->height % rect->height) / 3;
rect->y = work_area->y + fluff;
}
static gboolean
fit_rect_in_xinerama (MetaScreen *screen,
fit_rect_in_xinerama (MetaWindow *window,
MetaRectangle *rect)
{
int i;
int best_index;
int best_overlap;
MetaScreen *screen;
MetaRectangle work_area;
const MetaXineramaScreenInfo *xsi;
screen = window->screen;
/* Find xinerama with best fit, then
* shift rect to be entirely within it.
@@ -409,17 +433,17 @@ fit_rect_in_xinerama (MetaScreen *screen,
/* some overlap had to be better than -1 */
g_assert (best_index >= 0);
xsi = &screen->xinerama_infos[best_index];
meta_window_get_work_area_for_xinerama (window, best_index, &work_area);
if (rect->x < xsi->x_origin)
rect->x = xsi->x_origin;
if (rect->y < xsi->y_origin)
rect->y = xsi->y_origin;
if ((rect->x < work_area.x) || (rect->y < work_area.y) ||
(rect->x >= work_area.x + work_area.width) ||
(rect->y >= work_area.y + work_area.height))
center_tile_rect_in_area (rect, &work_area);
/* Now return whether we are entirely within the xinerama screen */
return
((rect->x + rect->width) < (xsi->x_origin + xsi->width)) &&
((rect->y + rect->height) < (xsi->y_origin + xsi->height));
/* Now return whether we are entirely within the work area */
return
((rect->x + rect->width) < (work_area.x + work_area.width)) &&
((rect->y + rect->height) < (work_area.y + work_area.height));
}
/* Find the leftmost, then topmost, empty area on the workspace
@@ -446,12 +470,12 @@ find_first_fit (MetaWindow *window,
* the bottom of each existing window, and then to the right
* of each existing window, aligned with the left/top of the
* existing window in each of those cases.
*/
*/
int retval;
GList *sorted;
GList *tmp;
MetaRectangle rect;
MetaRectangle work_area;
int i;
retval = FALSE;
@@ -466,11 +490,16 @@ find_first_fit (MetaWindow *window,
rect.height += fgeom->top_height + fgeom->bottom_height;
}
/* Try origin of first Xinerama */
rect.x = window->screen->xinerama_infos[0].x_origin;
rect.y = window->screen->xinerama_infos[0].y_origin;
/* Try center-tiling on first xinerama */
/* FIXME should use xinerama with mouse pointer
* (or better, xinerama where window was launched
* determined via startup notification)
*/
meta_window_get_work_area_for_xinerama (window, 0, &work_area);
if (fit_rect_in_xinerama (window->screen, &rect) &&
center_tile_rect_in_area (&rect, &work_area);
if (fit_rect_in_xinerama (window, &rect) &&
!rectangle_overlaps_some_window (&rect, windows))
{
*new_x = rect.x;
@@ -497,13 +526,13 @@ find_first_fit (MetaWindow *window,
{
MetaWindow *w = tmp->data;
MetaRectangle outer_rect;
meta_window_get_outer_rect (w, &outer_rect);
meta_window_get_outer_rect (w, &outer_rect);
rect.x = outer_rect.x;
rect.y = outer_rect.y + outer_rect.height;
if (fit_rect_in_xinerama (window->screen, &rect) &&
if (fit_rect_in_xinerama (window, &rect) &&
!rectangle_overlaps_some_window (&rect, sorted))
{
*new_x = rect.x;
@@ -513,12 +542,12 @@ find_first_fit (MetaWindow *window,
*new_x += fgeom->left_width;
*new_y += fgeom->top_height;
}
retval = TRUE;
goto out;
}
tmp = tmp->next;
}
@@ -531,13 +560,13 @@ find_first_fit (MetaWindow *window,
{
MetaWindow *w = tmp->data;
MetaRectangle outer_rect;
meta_window_get_outer_rect (w, &outer_rect);
rect.x = outer_rect.x + outer_rect.width;
rect.y = outer_rect.y;
if (fit_rect_in_xinerama (window->screen, &rect) &&
if (fit_rect_in_xinerama (window, &rect) &&
!rectangle_overlaps_some_window (&rect, sorted))
{
*new_x = rect.x;
@@ -547,23 +576,24 @@ find_first_fit (MetaWindow *window,
*new_x += fgeom->left_width;
*new_y += fgeom->top_height;
}
retval = TRUE;
goto out;
}
tmp = tmp->next;
}
}
/* Origin of each Xinerama screen which isn't the first */
tmp = tmp->next;
}
/* Try center-tile on each Xinerama screen which isn't the first */
i = 1;
while (i < window->screen->n_xinerama_infos)
{
rect.x = window->screen->xinerama_infos[i].x_origin;
rect.y = window->screen->xinerama_infos[i].y_origin;
if (fit_rect_in_xinerama (window->screen, &rect) &&
meta_window_get_work_area_for_xinerama (window, i, &work_area);
center_tile_rect_in_area (&rect, &work_area);
if (fit_rect_in_xinerama (window, &rect) &&
!rectangle_overlaps_some_window (&rect, windows))
{
*new_x = rect.x;
@@ -578,6 +608,7 @@ find_first_fit (MetaWindow *window,
goto out;
}
++i;
}
@@ -602,17 +633,18 @@ constrain_placement (MetaWindow *window,
int nw_x, nw_y;
int offscreen_w, offscreen_h;
MetaRectangle outer_rect;
meta_window_get_outer_rect (window, &outer_rect);
/* FIXME this is bogus because we get the current xinerama
* for the window based on its position, but we haven't
* placed it yet.
*/
meta_window_get_work_area (window, TRUE, &work_area);
meta_window_get_work_area_current_xinerama (window, &work_area);
nw_x = work_area.x;
nw_y = work_area.y;
if (window->frame)
{
nw_x += fgeom->left_width;
@@ -849,6 +881,7 @@ meta_window_place (MetaWindow *window,
constrain_placement (window, fgeom, x, y, &x, &y);
done_no_constraints:
*new_x = x;
*new_y = y;
}
@@ -946,13 +979,11 @@ get_vertical_edges (MetaWindow *window,
edges = g_new (int, n_edges);
/* workspace/screen edges */
meta_window_get_work_area (window, FALSE, &work_area);
meta_window_get_work_area_current_xinerama (window, &work_area);
edges[i] = work_area.x;
++i;
edges[i] =
work_area.x +
work_area.width;
edges[i] = work_area.x + work_area.width;
++i;
edges[i] = 0;
++i;
@@ -1019,13 +1050,11 @@ get_horizontal_edges (MetaWindow *window,
edges = g_new (int, n_edges);
/* workspace/screen edges */
meta_window_get_work_area (window, FALSE, &work_area);
meta_window_get_work_area_current_xinerama (window, &work_area);
edges[i] = work_area.y;
++i;
edges[i] =
work_area.y +
work_area.height;
edges[i] = work_area.y + work_area.height;
++i;
edges[i] = 0;
++i;

File diff suppressed because it is too large Load Diff

View File

@@ -28,7 +28,9 @@
typedef enum
{
META_PREF_MOUSE_BUTTON_MODS,
META_PREF_FOCUS_MODE,
META_PREF_ACTION_DOUBLE_CLICK_TITLEBAR,
META_PREF_AUTO_RAISE,
META_PREF_AUTO_RAISE_DELAY,
META_PREF_THEME,
@@ -38,7 +40,12 @@ typedef enum
META_PREF_WINDOW_KEYBINDINGS,
META_PREF_SCREEN_KEYBINDINGS,
META_PREF_DISABLE_WORKAROUNDS,
META_PREF_COMMANDS
META_PREF_COMMANDS,
META_PREF_BUTTON_LAYOUT,
META_PREF_WORKSPACE_NAMES,
META_PREF_VISUAL_BELL,
META_PREF_AUDIBLE_BELL,
META_PREF_VISUAL_BELL_TYPE
} MetaPreference;
typedef void (* MetaPrefsChangedFunc) (MetaPreference pref,
@@ -52,6 +59,7 @@ void meta_prefs_remove_listener (MetaPrefsChangedFunc func,
void meta_prefs_init (void);
const char* meta_preference_to_string (MetaPreference pref);
MetaVirtualModifier meta_prefs_get_mouse_button_mods (void);
MetaFocusMode meta_prefs_get_focus_mode (void);
const char* meta_prefs_get_theme (void);
/* returns NULL if GTK default should be used */
@@ -66,74 +74,111 @@ const char* meta_prefs_get_command (int i);
char* meta_prefs_get_gconf_key_for_command (int i);
void meta_prefs_get_button_layout (MetaButtonLayout *button_layout);
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"
#define META_KEYBINDING_WORKSPACE_3 "switch_to_workspace_3"
#define META_KEYBINDING_WORKSPACE_4 "switch_to_workspace_4"
#define META_KEYBINDING_WORKSPACE_5 "switch_to_workspace_5"
#define META_KEYBINDING_WORKSPACE_6 "switch_to_workspace_6"
#define META_KEYBINDING_WORKSPACE_7 "switch_to_workspace_7"
#define META_KEYBINDING_WORKSPACE_8 "switch_to_workspace_8"
#define META_KEYBINDING_WORKSPACE_9 "switch_to_workspace_9"
#define META_KEYBINDING_WORKSPACE_10 "switch_to_workspace_10"
#define META_KEYBINDING_WORKSPACE_11 "switch_to_workspace_11"
#define META_KEYBINDING_WORKSPACE_12 "switch_to_workspace_12"
#define META_KEYBINDING_WORKSPACE_LEFT "switch_to_workspace_left"
#define META_KEYBINDING_WORKSPACE_RIGHT "switch_to_workspace_right"
#define META_KEYBINDING_WORKSPACE_UP "switch_to_workspace_up"
#define META_KEYBINDING_WORKSPACE_DOWN "switch_to_workspace_down"
#define META_KEYBINDING_SWITCH_WINDOWS "switch_windows"
#define META_KEYBINDING_SWITCH_PANELS "switch_panels"
#define META_KEYBINDING_CYCLE_WINDOWS "cycle_windows"
#define META_KEYBINDING_CYCLE_PANELS "cycle_panels"
#define META_KEYBINDING_SHOW_DESKTOP "show_desktop"
#define META_KEYBINDING_COMMAND_1 "run_command_1"
#define META_KEYBINDING_COMMAND_2 "run_command_2"
#define META_KEYBINDING_COMMAND_3 "run_command_3"
#define META_KEYBINDING_COMMAND_4 "run_command_4"
#define META_KEYBINDING_COMMAND_5 "run_command_5"
#define META_KEYBINDING_COMMAND_6 "run_command_6"
#define META_KEYBINDING_COMMAND_7 "run_command_7"
#define META_KEYBINDING_COMMAND_8 "run_command_8"
#define META_KEYBINDING_COMMAND_9 "run_command_9"
#define META_KEYBINDING_COMMAND_10 "run_command_10"
#define META_KEYBINDING_COMMAND_11 "run_command_11"
#define META_KEYBINDING_COMMAND_12 "run_command_12"
#define META_KEYBINDING_WORKSPACE_1 "switch_to_workspace_1"
#define META_KEYBINDING_WORKSPACE_2 "switch_to_workspace_2"
#define META_KEYBINDING_WORKSPACE_3 "switch_to_workspace_3"
#define META_KEYBINDING_WORKSPACE_4 "switch_to_workspace_4"
#define META_KEYBINDING_WORKSPACE_5 "switch_to_workspace_5"
#define META_KEYBINDING_WORKSPACE_6 "switch_to_workspace_6"
#define META_KEYBINDING_WORKSPACE_7 "switch_to_workspace_7"
#define META_KEYBINDING_WORKSPACE_8 "switch_to_workspace_8"
#define META_KEYBINDING_WORKSPACE_9 "switch_to_workspace_9"
#define META_KEYBINDING_WORKSPACE_10 "switch_to_workspace_10"
#define META_KEYBINDING_WORKSPACE_11 "switch_to_workspace_11"
#define META_KEYBINDING_WORKSPACE_12 "switch_to_workspace_12"
#define META_KEYBINDING_WORKSPACE_LEFT "switch_to_workspace_left"
#define META_KEYBINDING_WORKSPACE_RIGHT "switch_to_workspace_right"
#define META_KEYBINDING_WORKSPACE_UP "switch_to_workspace_up"
#define META_KEYBINDING_WORKSPACE_DOWN "switch_to_workspace_down"
#define META_KEYBINDING_SWITCH_WINDOWS "switch_windows"
#define META_KEYBINDING_SWITCH_WINDOWS_BACKWARD "switch_windows_backward"
#define META_KEYBINDING_SWITCH_PANELS "switch_panels"
#define META_KEYBINDING_SWITCH_PANELS_BACKWARD "switch_panels_backward"
#define META_KEYBINDING_CYCLE_WINDOWS "cycle_windows"
#define META_KEYBINDING_CYCLE_WINDOWS_BACKWARD "cycle_windows_backward"
#define META_KEYBINDING_CYCLE_PANELS "cycle_panels"
#define META_KEYBINDING_CYCLE_PANELS_BACKWARD "cycle_panels_backward"
#define META_KEYBINDING_SHOW_DESKTOP "show_desktop"
#define META_KEYBINDING_PANEL_MAIN_MENU "panel_main_menu"
#define META_KEYBINDING_PANEL_RUN_DIALOG "panel_run_dialog"
#define META_KEYBINDING_COMMAND_1 "run_command_1"
#define META_KEYBINDING_COMMAND_2 "run_command_2"
#define META_KEYBINDING_COMMAND_3 "run_command_3"
#define META_KEYBINDING_COMMAND_4 "run_command_4"
#define META_KEYBINDING_COMMAND_5 "run_command_5"
#define META_KEYBINDING_COMMAND_6 "run_command_6"
#define META_KEYBINDING_COMMAND_7 "run_command_7"
#define META_KEYBINDING_COMMAND_8 "run_command_8"
#define META_KEYBINDING_COMMAND_9 "run_command_9"
#define META_KEYBINDING_COMMAND_10 "run_command_10"
#define META_KEYBINDING_COMMAND_11 "run_command_11"
#define META_KEYBINDING_COMMAND_12 "run_command_12"
#define META_KEYBINDING_COMMAND_13 "run_command_13"
#define META_KEYBINDING_COMMAND_14 "run_command_14"
#define META_KEYBINDING_COMMAND_15 "run_command_15"
#define META_KEYBINDING_COMMAND_16 "run_command_16"
#define META_KEYBINDING_COMMAND_17 "run_command_17"
#define META_KEYBINDING_COMMAND_18 "run_command_18"
#define META_KEYBINDING_COMMAND_19 "run_command_19"
#define META_KEYBINDING_COMMAND_20 "run_command_20"
#define META_KEYBINDING_COMMAND_21 "run_command_21"
#define META_KEYBINDING_COMMAND_22 "run_command_22"
#define META_KEYBINDING_COMMAND_23 "run_command_23"
#define META_KEYBINDING_COMMAND_24 "run_command_24"
#define META_KEYBINDING_COMMAND_25 "run_command_25"
#define META_KEYBINDING_COMMAND_26 "run_command_26"
#define META_KEYBINDING_COMMAND_27 "run_command_27"
#define META_KEYBINDING_COMMAND_28 "run_command_28"
#define META_KEYBINDING_COMMAND_29 "run_command_29"
#define META_KEYBINDING_COMMAND_30 "run_command_30"
#define META_KEYBINDING_COMMAND_31 "run_command_31"
#define META_KEYBINDING_COMMAND_32 "run_command_32"
#define META_KEYBINDING_COMMAND_SCREENSHOT "run_command_screenshot"
#define META_KEYBINDING_COMMAND_WIN_SCREENSHOT "run_command_window_screenshot"
/* Window bindings */
#define META_KEYBINDING_WINDOW_MENU "activate_window_menu"
#define META_KEYBINDING_TOGGLE_FULLSCREEN "toggle_fullscreen"
#define META_KEYBINDING_TOGGLE_MAXIMIZE "toggle_maximized"
#define META_KEYBINDING_MAXIMIZE "maximize"
#define META_KEYBINDING_UNMAXIMIZE "unmaximize"
#define META_KEYBINDING_TOGGLE_SHADE "toggle_shaded"
#define META_KEYBINDING_MINIMIZE "minimize"
#define META_KEYBINDING_CLOSE "close"
#define META_KEYBINDING_BEGIN_MOVE "begin_move"
#define META_KEYBINDING_BEGIN_RESIZE "begin_resize"
#define META_KEYBINDING_TOGGLE_STICKY "toggle_on_all_workspaces"
#define META_KEYBINDING_MOVE_WORKSPACE_1 "move_to_workspace_1"
#define META_KEYBINDING_MOVE_WORKSPACE_2 "move_to_workspace_2"
#define META_KEYBINDING_MOVE_WORKSPACE_3 "move_to_workspace_3"
#define META_KEYBINDING_MOVE_WORKSPACE_4 "move_to_workspace_4"
#define META_KEYBINDING_MOVE_WORKSPACE_5 "move_to_workspace_5"
#define META_KEYBINDING_MOVE_WORKSPACE_6 "move_to_workspace_6"
#define META_KEYBINDING_MOVE_WORKSPACE_7 "move_to_workspace_7"
#define META_KEYBINDING_MOVE_WORKSPACE_8 "move_to_workspace_8"
#define META_KEYBINDING_MOVE_WORKSPACE_9 "move_to_workspace_9"
#define META_KEYBINDING_MOVE_WORKSPACE_10 "move_to_workspace_10"
#define META_KEYBINDING_MOVE_WORKSPACE_11 "move_to_workspace_11"
#define META_KEYBINDING_MOVE_WORKSPACE_12 "move_to_workspace_12"
#define META_KEYBINDING_MOVE_WORKSPACE_LEFT "move_to_workspace_left"
#define META_KEYBINDING_MOVE_WORKSPACE_RIGHT "move_to_workspace_right"
#define META_KEYBINDING_MOVE_WORKSPACE_UP "move_to_workspace_up"
#define META_KEYBINDING_MOVE_WORKSPACE_DOWN "move_to_workspace_down"
#define META_KEYBINDING_RAISE_OR_LOWER "raise_or_lower"
#define META_KEYBINDING_RAISE "raise"
#define META_KEYBINDING_LOWER "lower"
#define META_KEYBINDING_WINDOW_MENU "activate_window_menu"
#define META_KEYBINDING_TOGGLE_FULLSCREEN "toggle_fullscreen"
#define META_KEYBINDING_TOGGLE_MAXIMIZE "toggle_maximized"
#define META_KEYBINDING_MAXIMIZE "maximize"
#define META_KEYBINDING_UNMAXIMIZE "unmaximize"
#define META_KEYBINDING_TOGGLE_SHADE "toggle_shaded"
#define META_KEYBINDING_MINIMIZE "minimize"
#define META_KEYBINDING_CLOSE "close"
#define META_KEYBINDING_BEGIN_MOVE "begin_move"
#define META_KEYBINDING_BEGIN_RESIZE "begin_resize"
#define META_KEYBINDING_TOGGLE_STICKY "toggle_on_all_workspaces"
#define META_KEYBINDING_MOVE_WORKSPACE_1 "move_to_workspace_1"
#define META_KEYBINDING_MOVE_WORKSPACE_2 "move_to_workspace_2"
#define META_KEYBINDING_MOVE_WORKSPACE_3 "move_to_workspace_3"
#define META_KEYBINDING_MOVE_WORKSPACE_4 "move_to_workspace_4"
#define META_KEYBINDING_MOVE_WORKSPACE_5 "move_to_workspace_5"
#define META_KEYBINDING_MOVE_WORKSPACE_6 "move_to_workspace_6"
#define META_KEYBINDING_MOVE_WORKSPACE_7 "move_to_workspace_7"
#define META_KEYBINDING_MOVE_WORKSPACE_8 "move_to_workspace_8"
#define META_KEYBINDING_MOVE_WORKSPACE_9 "move_to_workspace_9"
#define META_KEYBINDING_MOVE_WORKSPACE_10 "move_to_workspace_10"
#define META_KEYBINDING_MOVE_WORKSPACE_11 "move_to_workspace_11"
#define META_KEYBINDING_MOVE_WORKSPACE_12 "move_to_workspace_12"
#define META_KEYBINDING_MOVE_WORKSPACE_LEFT "move_to_workspace_left"
#define META_KEYBINDING_MOVE_WORKSPACE_RIGHT "move_to_workspace_right"
#define META_KEYBINDING_MOVE_WORKSPACE_UP "move_to_workspace_up"
#define META_KEYBINDING_MOVE_WORKSPACE_DOWN "move_to_workspace_down"
#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
{
@@ -155,10 +200,16 @@ typedef enum _MetaKeyBindingAction
META_KEYBINDING_ACTION_WORKSPACE_UP,
META_KEYBINDING_ACTION_WORKSPACE_DOWN,
META_KEYBINDING_ACTION_SWITCH_WINDOWS,
META_KEYBINDING_ACTION_SWITCH_WINDOWS_BACKWARD,
META_KEYBINDING_ACTION_SWITCH_PANELS,
META_KEYBINDING_ACTION_SWITCH_PANELS_BACKWARD,
META_KEYBINDING_ACTION_CYCLE_WINDOWS,
META_KEYBINDING_ACTION_CYCLE_WINDOWS_BACKWARD,
META_KEYBINDING_ACTION_CYCLE_PANELS,
META_KEYBINDING_ACTION_CYCLE_PANELS_BACKWARD,
META_KEYBINDING_ACTION_SHOW_DESKTOP,
META_KEYBINDING_ACTION_PANEL_MAIN_MENU,
META_KEYBINDING_ACTION_PANEL_RUN_DIALOG,
META_KEYBINDING_ACTION_COMMAND_1,
META_KEYBINDING_ACTION_COMMAND_2,
META_KEYBINDING_ACTION_COMMAND_3,
@@ -178,6 +229,8 @@ typedef struct
const char *name;
unsigned int keysym;
MetaVirtualModifier modifiers;
/* for keybindings that can have shift or not like Alt+Tab */
gboolean add_shift;
} MetaKeyPref;
void meta_prefs_get_screen_bindings (const MetaKeyPref **bindings,
@@ -191,6 +244,18 @@ void meta_prefs_get_window_binding (const char *name,
unsigned int *keysym,
MetaVirtualModifier *modifiers);
typedef enum
{
META_VISUAL_BELL_INVALID = 0,
META_VISUAL_BELL_FULLSCREEN_FLASH,
META_VISUAL_BELL_FRAME_FLASH
} MetaVisualBellType;
gboolean meta_prefs_get_visual_bell (void);
gboolean meta_prefs_bell_is_audible (void);
MetaVisualBellType meta_prefs_get_visual_bell_type (void);
#endif

View File

@@ -79,8 +79,24 @@ meta_preview_class_init (MetaPreviewClass *class)
static void
meta_preview_init (MetaPreview *preview)
{
int i;
GTK_WIDGET_SET_FLAGS (preview, GTK_NO_WINDOW);
i = 0;
while (i < MAX_BUTTONS_PER_CORNER)
{
preview->button_layout.left_buttons[i] = META_BUTTON_FUNCTION_LAST;
preview->button_layout.right_buttons[i] = META_BUTTON_FUNCTION_LAST;
++i;
}
preview->button_layout.left_buttons[0] = META_BUTTON_FUNCTION_MENU;
preview->button_layout.right_buttons[0] = META_BUTTON_FUNCTION_MINIMIZE;
preview->button_layout.right_buttons[1] = META_BUTTON_FUNCTION_MAXIMIZE;
preview->button_layout.right_buttons[2] = META_BUTTON_FUNCTION_CLOSE;
preview->type = META_FRAME_TYPE_NORMAL;
preview->flags =
META_FRAME_ALLOWS_DELETE |
@@ -218,7 +234,7 @@ meta_preview_expose (GtkWidget *widget,
if (client_width < 0)
client_width = 1;
if (client_height < 0)
client_height = 1;
client_height = 1;
if (preview->theme)
{
@@ -235,6 +251,7 @@ meta_preview_expose (GtkWidget *widget,
client_width, client_height,
preview->layout,
preview->text_height,
&preview->button_layout,
button_states,
meta_preview_get_mini_icon (),
meta_preview_get_icon ());
@@ -267,6 +284,13 @@ meta_preview_size_request (GtkWidget *widget,
req->width += child_requisition.width;
req->height += child_requisition.height;
}
else
{
#define NO_CHILD_WIDTH 80
#define NO_CHILD_HEIGHT 20
req->width += NO_CHILD_WIDTH;
req->height += NO_CHILD_HEIGHT;
}
req->width += GTK_CONTAINER (widget)->border_width * 2;
req->height += GTK_CONTAINER (widget)->border_width * 2;
@@ -369,6 +393,17 @@ meta_preview_set_frame_flags (MetaPreview *preview,
gtk_widget_queue_resize (GTK_WIDGET (preview));
}
void
meta_preview_set_button_layout (MetaPreview *preview,
const MetaButtonLayout *button_layout)
{
g_return_if_fail (META_IS_PREVIEW (preview));
preview->button_layout = *button_layout;
gtk_widget_queue_draw (GTK_WIDGET (preview));
}
#include "inlinepixbufs.h"
GdkPixbuf*

View File

@@ -52,6 +52,7 @@ struct _MetaPreview
int top_height;
int bottom_height;
MetaButtonLayout button_layout;
};
struct _MetaPreviewClass
@@ -63,14 +64,17 @@ struct _MetaPreviewClass
GtkType meta_preview_get_type (void) G_GNUC_CONST;
GtkWidget* meta_preview_new (void);
void meta_preview_set_theme (MetaPreview *preview,
MetaTheme *theme);
void meta_preview_set_title (MetaPreview *preview,
const char *title);
void meta_preview_set_frame_type (MetaPreview *preview,
MetaFrameType type);
void meta_preview_set_frame_flags (MetaPreview *preview,
MetaFrameFlags flags);
void meta_preview_set_theme (MetaPreview *preview,
MetaTheme *theme);
void meta_preview_set_title (MetaPreview *preview,
const char *title);
void meta_preview_set_frame_type (MetaPreview *preview,
MetaFrameType type);
void meta_preview_set_frame_flags (MetaPreview *preview,
MetaFrameFlags flags);
void meta_preview_set_button_layout (MetaPreview *preview,
const MetaButtonLayout *button_layout);
GdkPixbuf* meta_preview_get_icon (void);
GdkPixbuf* meta_preview_get_mini_icon (void);

View File

@@ -26,23 +26,17 @@
#include <gtk/gtklabel.h>
#include <gtk/gtkframe.h>
#include <gtk/gtkmain.h>
#include <gdk/gdkx.h>
struct _MetaResizePopup
{
GtkWidget *size_window;
GtkWidget *size_label;
GSList *vertical_tick_windows;
GSList *horizontal_tick_windows;
GtkWidget *vertical_size_window;
GtkWidget *horizontal_size_window;
Display *display;
int screen_number;
int vertical_size;
int horizontal_size;
gboolean need_vertical_feedback;
gboolean need_horizontal_feedback;
gboolean showing;
@@ -64,51 +58,20 @@ struct _MetaResizePopup
};
MetaResizePopup*
meta_ui_resize_popup_new (void)
meta_ui_resize_popup_new (Display *display,
int screen_number)
{
MetaResizePopup *popup;
popup = g_new0 (MetaResizePopup, 1);
popup->resize_gravity = -1;
popup->display = display;
popup->screen_number = screen_number;
return popup;
}
static void
clear_tick_labels (MetaResizePopup *popup)
{
if (popup->vertical_size_window)
{
gtk_widget_destroy (popup->vertical_size_window);
popup->vertical_size_window = NULL;
}
if (popup->horizontal_size_window)
{
gtk_widget_destroy (popup->horizontal_size_window);
popup->horizontal_size_window = NULL;
}
}
static void
clear_tick_windows (MetaResizePopup *popup)
{
g_slist_foreach (popup->vertical_tick_windows,
(GFunc) gtk_widget_destroy,
NULL);
g_slist_free (popup->vertical_tick_windows);
popup->vertical_tick_windows = NULL;
g_slist_foreach (popup->horizontal_tick_windows,
(GFunc) gtk_widget_destroy,
NULL);
g_slist_free (popup->horizontal_tick_windows);
popup->horizontal_tick_windows = NULL;
}
void
meta_ui_resize_popup_free (MetaResizePopup *popup)
{
@@ -116,9 +79,6 @@ meta_ui_resize_popup_free (MetaResizePopup *popup)
if (popup->size_window)
gtk_widget_destroy (popup->size_window);
clear_tick_windows (popup);
clear_tick_labels (popup);
g_free (popup);
}
@@ -130,12 +90,14 @@ ensure_size_window (MetaResizePopup *popup)
if (popup->size_window)
return;
if (!(popup->need_vertical_feedback || popup->need_horizontal_feedback))
return;
popup->size_window = gtk_window_new (GTK_WINDOW_POPUP);
#ifdef HAVE_GTK_MULTIHEAD
gtk_window_set_screen (GTK_WINDOW (popup->size_window),
gdk_display_get_screen (gdk_x11_lookup_xdisplay (popup->display),
popup->screen_number));
#endif
/* never shrink the size window */
gtk_window_set_resizable (GTK_WINDOW (popup->size_window),
TRUE);
@@ -159,9 +121,6 @@ update_size_window (MetaResizePopup *popup)
char *str;
int x, y;
int width, height;
if (!(popup->need_vertical_feedback || popup->need_horizontal_feedback))
return;
g_return_if_fail (popup->size_window != NULL);
@@ -199,19 +158,6 @@ sync_showing (MetaResizePopup *popup)
{
if (popup->size_window)
gtk_widget_show (popup->size_window);
if (popup->vertical_size_window)
gtk_widget_show (popup->vertical_size_window);
if (popup->horizontal_size_window)
gtk_widget_show (popup->horizontal_size_window);
g_slist_foreach (popup->horizontal_tick_windows,
(GFunc) gtk_widget_show,
NULL);
g_slist_foreach (popup->vertical_tick_windows,
(GFunc) gtk_widget_show,
NULL);
if (popup->size_window && GTK_WIDGET_REALIZED (popup->size_window))
gdk_window_raise (popup->size_window->window);
@@ -220,594 +166,6 @@ sync_showing (MetaResizePopup *popup)
{
if (popup->size_window)
gtk_widget_hide (popup->size_window);
if (popup->vertical_size_window)
gtk_widget_hide (popup->vertical_size_window);
if (popup->horizontal_size_window)
gtk_widget_hide (popup->horizontal_size_window);
g_slist_foreach (popup->horizontal_tick_windows,
(GFunc) gtk_widget_hide,
NULL);
g_slist_foreach (popup->vertical_tick_windows,
(GFunc) gtk_widget_hide,
NULL);
}
}
static GtkWidget*
create_size_window (const char *str)
{
PangoContext *context;
PangoLayout *layout;
GdkGC *gc;
GdkBitmap *bitmap;
PangoRectangle rect;
GdkColor color;
GtkWidget *window;
int w, h;
window = gtk_window_new (GTK_WINDOW_POPUP);
gtk_widget_set_app_paintable (window, TRUE);
gtk_window_set_resizable (GTK_WINDOW (window),
FALSE);
context = gdk_pango_context_get ();
#if 0
/* bitmaps have no meaningful cmap */
gdk_pango_context_set_colormap (context,
gtk_widget_get_colormap (widget));
#endif
pango_context_set_base_dir (context,
gtk_widget_get_direction (window) == GTK_TEXT_DIR_LTR ?
PANGO_DIRECTION_LTR : PANGO_DIRECTION_RTL);
pango_context_set_font_description (context,
window->style->font_desc);
pango_context_set_language (context, gtk_get_default_language ());
layout = pango_layout_new (context);
pango_layout_set_text (layout, str, -1);
g_object_unref (G_OBJECT (context));
pango_layout_get_pixel_extents (layout, NULL, &rect);
w = rect.width;
h = rect.height;
gtk_widget_set_size_request (window, w, h);
bitmap = gdk_pixmap_new (NULL, w, h, 1);
gc = gdk_gc_new (bitmap);
color.pixel = 0;
gdk_gc_set_foreground (gc, &color);
gdk_draw_rectangle (bitmap, gc, TRUE, 0, 0, w, h);
color.pixel = 1;
gdk_gc_set_foreground (gc, &color);
gdk_draw_layout (bitmap, gc, 0, 0, layout);
gtk_widget_shape_combine_mask (window,
bitmap, 0, 0);
g_object_unref (G_OBJECT (bitmap));
g_object_unref (G_OBJECT (gc));
g_object_unref (G_OBJECT (layout));
/* After setting the size */
gtk_widget_realize (window);
gdk_window_set_background (window->window,
&window->style->black);
return window;
}
static void
place_vertical_size_window (MetaResizePopup *popup,
int x,
int y,
double align)
{
int w, h;
return;
if (popup->vertical_size_window == NULL)
{
char *str;
str = g_strdup_printf ("%d", popup->vertical_size);
popup->vertical_size_window = create_size_window (str);
g_free (str);
}
gtk_window_get_size (GTK_WINDOW (popup->vertical_size_window),
&w, &h);
gtk_window_move (GTK_WINDOW (popup->vertical_size_window),
x - w * align,
y - h / 2);
}
static void
place_horizontal_size_window (MetaResizePopup *popup,
int x,
int y,
double align)
{
int w, h;
return;
if (popup->horizontal_size_window == NULL)
{
char *str;
str = g_strdup_printf ("%d", popup->horizontal_size);
popup->horizontal_size_window = create_size_window (str);
g_free (str);
}
gtk_window_get_size (GTK_WINDOW (popup->horizontal_size_window),
&w, &h);
gtk_window_move (GTK_WINDOW (popup->horizontal_size_window),
x - w / 2,
y - h * align);
}
static gboolean
tick_window_expose (GtkWidget *widget,
GdkEventExpose *event,
gpointer data)
{
int w, h;
gdk_window_get_size (widget->window, &w, &h);
#if 0
gdk_draw_rectangle (widget->window,
widget->style->white_gc,
FALSE,
0, 0,
w - 1,
h - 1);
#endif
return FALSE;
}
static GtkWidget*
create_tick (int w,
int h)
{
GtkWidget *window;
window = gtk_window_new (GTK_WINDOW_POPUP);
gtk_widget_set_app_paintable (window, TRUE);
gtk_widget_set_size_request (window, w, h);
gtk_widget_realize (window);
gdk_window_set_background (window->window,
&window->style->black);
g_signal_connect (G_OBJECT (window), "expose_event",
G_CALLBACK (tick_window_expose), NULL);
return window;
}
#define TICK_WIDTH 1
#define TICK_LENGTH 7
static void
add_vertical_tick (MetaResizePopup *popup,
int x,
int y)
{
GtkWidget *window;
/* Create a tick for the vertical resize column of
* tick marks.
*/
window = create_tick (TICK_LENGTH, TICK_WIDTH);
gtk_window_move (GTK_WINDOW (window),
x, y);
popup->vertical_tick_windows =
g_slist_prepend (popup->vertical_tick_windows,
window);
/* create GdkWindow */
gtk_widget_realize (window);
/* Be sure the size window is above it */
if (popup->size_window && GTK_WIDGET_REALIZED (popup->size_window))
gdk_window_raise (popup->size_window->window);
}
static void
add_horizontal_tick (MetaResizePopup *popup,
int x,
int y)
{
GtkWidget *window;
/* Create a tick for the vertical resize column of
* tick marks.
*/
window = create_tick (TICK_WIDTH, TICK_LENGTH);
gtk_window_move (GTK_WINDOW (window),
x, y);
popup->horizontal_tick_windows =
g_slist_prepend (popup->horizontal_tick_windows,
window);
/* create GdkWindow */
gtk_widget_realize (window);
/* Be sure the size window is above it */
if (popup->size_window && GTK_WIDGET_REALIZED (popup->size_window))
gdk_window_raise (popup->size_window->window);
}
static void
ensure_tick_windows (MetaResizePopup *popup)
{
int x, y;
int max_x, max_y;
if (popup->resize_gravity < 0)
return;
if (popup->horizontal_tick_windows != NULL ||
popup->vertical_tick_windows != NULL)
return;
/* FIXME the current implementation sucks too much to enable. */
return;
max_x = gdk_screen_width ();
max_y = gdk_screen_height ();
if (popup->need_vertical_feedback)
{
y = popup->tick_origin_y;
switch (popup->resize_gravity)
{
case NorthEastGravity:
case EastGravity:
case SouthEastGravity:
/* Vertical tick column on the fixed East side */
x = popup->x + popup->width + popup->frame_right;
break;
case NorthWestGravity:
case WestGravity:
case SouthWestGravity:
/* Vertical ticks on the fixed West side */
x = popup->x - TICK_LENGTH - popup->frame_left;
break;
case NorthGravity:
case SouthGravity:
case CenterGravity:
/* Center the vertical ticks */
x = popup->x + (popup->width - TICK_LENGTH) / 2;
break;
default:
/* gcc warnings */
x = 0;
break;
}
switch (popup->resize_gravity)
{
case SouthGravity:
case SouthEastGravity:
case SouthWestGravity:
while (y > 0)
{
add_vertical_tick (popup, x, y);
y -= popup->height_inc;
}
break;
case NorthGravity:
case NorthEastGravity:
case NorthWestGravity:
while (y < max_y)
{
add_vertical_tick (popup, x, y);
y += popup->height_inc;
}
break;
}
}
if (popup->need_horizontal_feedback)
{
x = popup->tick_origin_x;
switch (popup->resize_gravity)
{
case SouthWestGravity:
case SouthGravity:
case SouthEastGravity:
/* Horizontal tick column on the fixed South side */
y = popup->y + popup->height + popup->frame_bottom;
break;
case NorthWestGravity:
case NorthGravity:
case NorthEastGravity:
/* Horizontal ticks on the fixed North side */
y = popup->y - TICK_LENGTH - popup->frame_top;
break;
case EastGravity:
case WestGravity:
case CenterGravity:
/* Center the horizontal ticks */
y = popup->y + (popup->height - TICK_LENGTH) / 2;
break;
default:
/* gcc warnings */
y = 0;
break;
}
switch (popup->resize_gravity)
{
case EastGravity:
case SouthEastGravity:
case NorthEastGravity:
while (x > 0)
{
add_horizontal_tick (popup, x, y);
x -= popup->width_inc;
}
break;
case WestGravity:
case SouthWestGravity:
case NorthWestGravity:
while (x < max_x)
{
add_horizontal_tick (popup, x, y);
x += popup->width_inc;
}
break;
}
}
}
static void
update_tick_labels (MetaResizePopup *popup)
{
int x, y;
int left_edge, right_edge, top_edge, bottom_edge;
if (popup->resize_gravity < 0)
return;
left_edge = popup->x - popup->frame_left;
right_edge = popup->x + popup->width + popup->frame_right;
top_edge = popup->y - popup->frame_top;
bottom_edge = popup->y + popup->height + popup->frame_bottom;
if (popup->need_vertical_feedback)
{
int size_x, size_y;
double size_align;
switch (popup->resize_gravity)
{
case NorthEastGravity:
case EastGravity:
case SouthEastGravity:
x = popup->x + popup->width + popup->frame_right;
size_x = x + TICK_LENGTH;
size_align = 0.0;
break;
case NorthWestGravity:
case WestGravity:
case SouthWestGravity:
x = popup->x - TICK_LENGTH - popup->frame_left;
size_x = x - TICK_LENGTH;
size_align = 1.0;
break;
case NorthGravity:
case SouthGravity:
case CenterGravity:
x = popup->x + (popup->width - TICK_LENGTH) / 2;
size_x = x - TICK_LENGTH / 2 - 1;
size_align = 1.0;
break;
default:
/* gcc warnings */
x = 0;
size_x = 0;
size_align = 0.5;
break;
}
switch (popup->resize_gravity)
{
case SouthGravity:
case SouthEastGravity:
case SouthWestGravity:
size_y = top_edge;
break;
case NorthGravity:
case NorthEastGravity:
case NorthWestGravity:
size_y = bottom_edge;
break;
default:
size_y = 0;
break;
}
place_vertical_size_window (popup, size_x, size_y, size_align);
}
if (popup->need_horizontal_feedback)
{
int size_x, size_y;
double size_align;
switch (popup->resize_gravity)
{
case SouthWestGravity:
case SouthGravity:
case SouthEastGravity:
y = popup->y + popup->height + popup->frame_bottom;
size_y = y + TICK_LENGTH;
size_align = 0.0;
break;
case NorthWestGravity:
case NorthGravity:
case NorthEastGravity:
y = popup->y - TICK_LENGTH - popup->frame_top;
size_y = y - TICK_LENGTH;
size_align = 1.0;
break;
case EastGravity:
case WestGravity:
case CenterGravity:
y = popup->y + (popup->height - TICK_LENGTH) / 2;
size_y = y - TICK_LENGTH / 2 - 1;
size_align = 1.0;
break;
default:
/* gcc warnings */
y = 0;
size_y = 0;
size_align = 0.5;
break;
}
switch (popup->resize_gravity)
{
case WestGravity:
case NorthWestGravity:
case SouthWestGravity:
size_x = right_edge;
break;
case EastGravity:
case NorthEastGravity:
case SouthEastGravity:
size_x = left_edge;
break;
default:
size_x = 0;
break;
}
place_horizontal_size_window (popup, size_x, size_y, size_align);
}
}
static void
get_tick_origin (int resize_gravity,
int x,
int y,
int width,
int height,
int min_width,
int min_height,
int frame_left,
int frame_right,
int frame_top,
int frame_bottom,
int *origin_x,
int *origin_y)
{
*origin_x = 0;
*origin_y = 0;
switch (resize_gravity)
{
/* If client is staying fixed on the east during resize, then we
* have to move the west edge. Which means ticks originate
* on the east.
*/
case NorthEastGravity:
case EastGravity:
case SouthEastGravity:
*origin_x = x + width - min_width - frame_right + TICK_WIDTH / 2;
break;
case NorthWestGravity:
case WestGravity:
case SouthWestGravity:
*origin_x = x + min_width + frame_left - TICK_WIDTH / 2 - 1;
break;
/* centered horizontally */
case NorthGravity:
case SouthGravity:
case CenterGravity:
/* Not going to draw horizontal ticks */
*origin_x = 0;
break;
default:
break;
}
switch (resize_gravity)
{
/* If client is staying fixed on the south during resize,
* we have to move the north edge, so ticks originate on the
* south.
*/
case SouthGravity:
case SouthEastGravity:
case SouthWestGravity:
*origin_y = y + height - frame_top - min_height + TICK_WIDTH / 2;
break;
/* staying fixed on the north */
case NorthGravity:
case NorthEastGravity:
case NorthWestGravity:
*origin_y = y + min_height + frame_bottom - TICK_WIDTH / 2 - 1;
break;
/* centered vertically */
case EastGravity:
case WestGravity:
case CenterGravity:
*origin_y = 0;
break;
default:
break;
}
}
@@ -830,53 +188,11 @@ meta_ui_resize_popup_set (MetaResizePopup *popup,
int frame_bottom)
{
gboolean need_update_size;
gboolean need_update_ticks;
gboolean need_update_tick_labels;
int tick_x, tick_y;
int display_w, display_h;
gboolean need_vertical, need_horizontal;
g_return_if_fail (popup != NULL);
need_update_size = FALSE;
need_update_ticks = FALSE;
need_update_tick_labels = FALSE;
switch (popup->resize_gravity)
{
case SouthGravity:
case SouthEastGravity:
case SouthWestGravity:
case NorthGravity:
case NorthEastGravity:
case NorthWestGravity:
need_vertical = TRUE;
break;
default:
need_vertical = FALSE;
break;
}
if (height_inc <= (TICK_WIDTH + 1))
need_vertical = FALSE;
switch (popup->resize_gravity)
{
case EastGravity:
case SouthEastGravity:
case NorthEastGravity:
case WestGravity:
case SouthWestGravity:
case NorthWestGravity:
need_horizontal = TRUE;
break;
default:
need_horizontal = FALSE;
break;
}
if (popup->width_inc <= (TICK_WIDTH + 1))
need_horizontal = FALSE;
display_w = width - base_width;
if (width_inc > 0)
@@ -893,33 +209,6 @@ meta_ui_resize_popup_set (MetaResizePopup *popup,
display_w != popup->horizontal_size ||
display_h != popup->vertical_size)
need_update_size = TRUE;
get_tick_origin (resize_gravity, x, y, width, height,
min_width, min_height,
frame_left, frame_right,
frame_top, frame_bottom,
&tick_x, &tick_y);
if (popup->tick_origin_x != tick_x ||
popup->tick_origin_y != tick_y ||
popup->frame_left != frame_left ||
popup->frame_right != frame_right ||
popup->frame_top != frame_top ||
popup->frame_bottom != frame_bottom)
need_update_ticks = TRUE;
if (need_update_ticks ||
display_w != popup->horizontal_size ||
display_h != popup->vertical_size)
need_update_tick_labels = TRUE;
if (need_horizontal != popup->need_horizontal_feedback ||
need_vertical != popup->need_vertical_feedback)
{
need_update_size = TRUE;
need_update_ticks = TRUE;
need_update_tick_labels = TRUE;
}
popup->resize_gravity = resize_gravity;
popup->x = x;
@@ -930,28 +219,12 @@ meta_ui_resize_popup_set (MetaResizePopup *popup,
popup->min_height = min_height;
popup->width_inc = width_inc;
popup->height_inc = height_inc;
popup->tick_origin_x = tick_x;
popup->tick_origin_y = tick_y;
popup->frame_left = frame_left;
popup->frame_right = frame_right;
popup->frame_top = frame_top;
popup->frame_bottom = frame_bottom;
popup->vertical_size = display_h;
popup->horizontal_size = display_w;
popup->need_vertical_feedback = need_vertical;
popup->need_horizontal_feedback = need_horizontal;
if (need_update_tick_labels)
{
clear_tick_labels (popup);
update_tick_labels (popup);
}
if (need_update_ticks)
{
clear_tick_windows (popup);
ensure_tick_windows (popup);
}
if (need_update_size)
{
@@ -976,7 +249,6 @@ meta_ui_resize_popup_set_showing (MetaResizePopup *popup,
if (popup->showing)
{
ensure_size_window (popup);
ensure_tick_windows (popup);
update_size_window (popup);
}

View File

@@ -28,7 +28,8 @@
#include <glib.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
MetaResizePopup* meta_ui_resize_popup_new (void);
MetaResizePopup* meta_ui_resize_popup_new (Display *display,
int screen_number);
void meta_ui_resize_popup_free (MetaResizePopup *popup);
void meta_ui_resize_popup_set (MetaResizePopup *popup,
int resize_gravity,

View File

@@ -8,10 +8,16 @@ 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
MAX_SCREEN=`echo $SCREENS-1 | bc`
if test "$DEBUG" = none; then
DEBUG=
elif test -z "$DEBUG"; then
@@ -42,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 &
@@ -50,13 +58,25 @@ 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
echo "Launching clients"
if test -n "$TEST_CLIENT"; then
DISPLAY=$CLIENT_DISPLAY $TEST_CLIENT &
for I in `seq 0 $MAX_SCREEN`; do
DISPLAY=$CLIENT_DISPLAY.$I $TEST_CLIENT &
done
fi
if test $CLIENTS != 0; then
@@ -72,12 +92,18 @@ if test -z "$ONLY_WM"; then
DISPLAY=$CLIENT_DISPLAY gnome-terminal --geometry 25x15 &
done
fi
if test -e ~/.Xmodmap; then
DISPLAY=$CLIENT_DISPLAY xmodmap ~/.Xmodmap
fi
usleep 50000
DISPLAY=$CLIENT_DISPLAY xsetroot -solid royalblue3
for I in `seq 0 $MAX_SCREEN`; do
DISPLAY=$CLIENT_DISPLAY.$I xsetroot -solid royalblue3
done
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

File diff suppressed because it is too large Load Diff

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