Compare commits

...

251 Commits

Author SHA1 Message Date
Havoc Pennington
b413f5e7e0 2.6.0
2003-09-08  Havoc Pennington  <hp@redhat.com>

	* configure.in: 2.6.0
2003-09-08 19:42:14 +00:00
Pablo Saratxaga
d75b9158bd updated vietnamese file 2003-09-08 13:34:03 +00:00
Nikos Charonitakis
b5b127f083 Review of Greek translation 2003-09-07 19:07:36 +00:00
Fixed mis-translations for ja.po. T.Aihana
1206f9880e 2003-09-06 Fixed mis-translations for ja.po. T.Aihana <aihana@gnome.gr.jp> 2003-09-06 09:30:40 +00:00
Kjartan Maraas
629af6bb36 Updated Norwegian translation.
2003-09-05  Kjartan Maraas  <kmaraas@gnome.org>

	* no.po: Updated Norwegian translation.
2003-09-05 21:17:51 +00:00
Havoc Pennington
08ca40aad9 2.5.5
2003-09-04  Havoc Pennington  <hp@redhat.com>

	* configure.in: 2.5.5

	* HACKING: add instructions on how to make a release
2003-09-04 16:52:03 +00:00
Laurent Dhima
fa4c0bf54a Updated Albanian translation
* sq.po: Updated Albanian translation
2003-09-03 22:58:20 +00:00
Laurent Dhima
01f94925a5 Updated 2003-09-03 22:56:53 +00:00
Guntupalli Karunakar
ae83b19b28 Updated Hindi translations 2003-09-03 12:22:16 +00:00
Mugurel Tudor
9cdbfc53a8 *** empty log message *** 2003-09-02 21:32:30 +00:00
Pablo Saratxaga
a13dbea266 fixed typo 2003-09-02 18:08:18 +00:00
Stano Visnovsky
a236cfd7a8 Really update the po file 2003-09-01 15:56:43 +00:00
Stanislav Visnovsky
27b4e46a16 Updated Slovak translation.
2003-09-01  Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>

        * sk.po: Updated Slovak translation.
2003-09-01 15:55:07 +00:00
Rob Adams
9ddacb019e harden against null return from gdk_pixmap_foreign_new. Fix for #116923.
2003-08-29  Rob Adams  <robadams@ucla.edu>

	* src/ui.c (meta_gdk_pixbuf_get_from_pixmap): harden against null
	return from gdk_pixmap_foreign_new.  Fix for #116923.
2003-08-30 01:48:31 +00:00
Dafydd Harries
a4a32a54c3 Updated Welsh translation. 2003-08-29 16:17:39 +00:00
Pablo Gonzalo del Campo
8ff2a10c96 Revision of Spanish translation by Francisco Javier F. Serrador
2003-08-27  Pablo Gonzalo del Campo  <pablodc@bigfoot.com>

        * es.po: Revision of Spanish translation by
                 Francisco Javier F. Serrador <serrador@arrakis.es>.
2003-08-27 20:09:49 +00:00
Andraz Tori
586eda6199 Updated Slovenian translation 2003-08-27 11:50:31 +00:00
Guntupalli Karunakar
a522c3479e Added Hindi translation 2003-08-27 11:15:44 +00:00
Duarte Loreto
e5a2ddd777 Fixed missing accel in Portuguese translation.
2003-08-25  Duarte Loreto <happyguy_pt@hotmail.com>

	* pt.po: Fixed missing accel in Portuguese translation.
2003-08-25 18:56:10 +00:00
Changwoo Ryu
77fb995c4c Updated Korean translation by Young-Ho Cha <ganadist at mizi.com>.
* ko.po: Updated Korean translation by
	Young-Ho Cha <ganadist at mizi.com>.
2003-08-25 15:47:58 +00:00
Changwoo Ryu
0494e221af Updated Korean translation.
* ko.po: Updated Korean translation.
2003-08-23 18:10:57 +00:00
Stanislav Visnovsky
6e77b6f656 Update Slovak translation.
2003-08-22  Stanislav Visnovsky  <visnovsky@nenya.ms.mff.cuni.cz>

        * sk.po: Update Slovak translation.
2003-08-22 06:20:46 +00:00
Rob Adams
dbcf03535d Complete the transition to using the MRU window as the default focus
2003-08-20  Rob Adams  <robadams@ucla.edu>

	Complete the transition to using the MRU window as the default
	focus window instead of the topmost window; fixes a number of
	problems with sloppy focus and utility windows.  See #112031.

	* src/window.c (meta_window_free): call
	meta_workspace_focus_mru_window
	(meta_window_minimize): call meta_workspace_focus_mru_window
2003-08-21 04:32:21 +00:00
Rob Adams
a644753073 do northwest resize when maximizing and fullscreening to avoid potential
2003-08-20  Rob Adams  <robadams@ucla.edu>

	* src/constraints.c (meta_window_constrain): do northwest resize
	when maximizing and fullscreening to avoid potential "off-by-one"
	problems.
2003-08-21 04:27:11 +00:00
Kjartan Maraas
23b5ea0eee Update Norwegian translation.
2003-08-20  Kjartan Maraas  <kmaraas@gnome.org>

	* no.po: Update Norwegian translation.
2003-08-20 21:00:32 +00:00
Rob Adams
a2b6ff6d42 put windows with wm_state_below at the bottom. Make this higher priority
2003-08-19  Rob Adams  <robadams@uclu.edu>

	* src/stack.c (get_standalone_layer): put windows with
	wm_state_below at the bottom.  Make this higher priority than full
	screen layer; see #120238.
2003-08-19 20:10:45 +00:00
Dafydd Harries
5ea067a1d8 Updated Welsh translation. 2003-08-19 05:11:27 +00:00
Rob Adams
8b924ece14 recalculate frame geometry if the window gets maximized after placement,
2003-08-18  Rob Adams  <robadams@ucla.edu>

	* src/constraints.c (meta_window_constrain): recalculate frame
	geometry if the window gets maximized after placement, since it's
	likely to change.  Fix for #120117.
2003-08-19 01:10:01 +00:00
Danilo Šegan
9615538389 Updated Belarusian translation by Ales Nyakhaychyk <nab@mail.by>.
2003-08-18  Danilo Šegan  <dsegan@gmx.net>

	* be.po: Updated Belarusian translation by Ales Nyakhaychyk
	<nab@mail.by>.
2003-08-18 20:03:03 +00:00
Metin Amiroff
9c53e2f5f1 Updated Azerbaijani translation.
2003-08-18  Metin Amiroff <metin@karegen.com>

	* az.po: Updated Azerbaijani translation.
2003-08-18 11:07:27 +00:00
Ray Strode
81da59a8a4 Use MRU list to find focusing window after a window is deleted instead of
2003-08-17  Ray Strode  <halfline@hawaii.rr.com>

	* src/delete.c (meta_window_delete): Use MRU list to find focusing
	window after a window is deleted instead of using top window. Fix
	for #108643.
2003-08-17 21:43:50 +00:00
Pauli Virtanen
22eab481b1 Updated Finnish translation.
2003-08-16  Pauli Virtanen  <pauli.virtanen@hut.fi>

	* fi.po: Updated Finnish translation.
2003-08-16 16:53:28 +00:00
Havoc Pennington
71cd8948d2 Patch from Soeren Sandmann #108926 to improve opaque resize
2003-08-16  Havoc Pennington  <hp@pobox.com>

	Patch from Soeren Sandmann #108926 to improve opaque resize

	* src/frame.c (meta_window_ensure_frame): new function

	* src/ui.c (meta_ui_create_frame_window): new function to create
	a frame with GDK, so that GDK's invalidation etc. work properly
2003-08-16 16:32:10 +00:00
Havoc Pennington
288e10f7fe credit 2003-08-16 14:37:26 +00:00
Havoc Pennington
a9e5560c36 fix cursor for META_GRAB_OP_MOVING, #111943
2003-08-16  Havoc Pennington  <hp@pobox.com>

	* src/display.c (xcursor_for_op): fix cursor for
	META_GRAB_OP_MOVING, #111943
2003-08-16 14:36:56 +00:00
Rob Adams
fcd56c3ef0 move to upper left corner since we're resizing/moving instead of
2003-08-15  Rob Adams  <robadams@ucla.edu>

	* src/constraints.c (meta_window_constrain): move to upper left
	corner since we're resizing/moving instead of moving/resizing.
	Fix for #119988.
2003-08-16 01:07:24 +00:00
Rob Adams
7dc793c3be fix but with maximizing/fullscreening windows 2003-08-16 01:05:37 +00:00
Ray Strode
2fc880db19 Changed MRU list to be per workspace instead of per display, so sticky
2003-08-15  Ray Strode  <halfline@hawaii.rr.com>

	Changed MRU list to be per workspace instead of per display, so
	sticky windows don't hijack the window focus after workspace
	switching (Bug #97635).

	* src/delete.c (meta_window_delete): Use
	meta_workspace_focus_top_window instead of
	meta_screen_focus_top_window.

	* src/display.c (meta_display_open): Stop using display->mru_list.
	(find_tab_forward):
	(find_tab_backward):
	(meta_display_get_tab_list): Use workspace->mru_list instead of
	display->mru_list and remove unneeded calls to
	meta_window_visible_on_workspace

	* src/display.h: Remove mru_list from MetaDisplay

	* src/keybindings.c (handle_toggle_desktop): Use
	meta_workspace_focus_top_window instead of
	meta_screen_focus_top_window.

	* src/screen.c (meta_screen_focus_top_window):
	(meta_screen_focus_default_window): Remove functions.
	(meta_screen_show_desktop): Use meta_workspace_focus_top_window
	instead of meta_screen_focus_top_window.

	* src/screen.h: Remove meta_screen_focus_top_window and
	meta_screen_focus_default_window declarations.

	* src/window.c (meta_window_new): Stop using display->mru_list.
	(meta_window_free): Use meta_workspace_focus_top_window
	instead of meta_screen_focus_top_window and stop using
	display->mru_list.
	(meta_window_stick): Add sticky window to all workspace MRU lists.
	(meta_window_unstick): Remove non-sticky window from the workspace
	MRU lists it doesn't belong in.
	(meta_window_notify_focus): Move newly focused window to the front
	of active workspace's MRU list.

	* src/workspace.c (meta_workspace_new): Initialize
	workspace->mru_list to NULL.
	(meta_workspace_add_window): Add window to workspace's MRU list.
	(meta_workspace_remove_window): Remove window from workspace's MRU
	list.
	(meta_workspace_activate_with_focus): Use
	meta_workspace_focus_default_window instead of
	meta_screen_focus_default_window.
	(meta_workspace_focus_default_window):
	(meta_workspace_focus_mru_window):
	(meta_workspace_focus_top_window): Add functions.

	* src/workspace.h: Add mru_list to MetaWorkspace and add function
	declarations for meta_workspace_focus_default_window,
	meta_workspace_focus_mru_window, meta_workspace_focus_top_window.
2003-08-15 22:09:55 +00:00
Rob Adams
60a453f5a0 Allow windows that are too tall for the workarea to break the onscreen
2003-08-14  Rob Adams  <robadams@ucla.edu>

	Allow windows that are too tall for the workarea to break the
	onscreen constraints just enough so that their bottom edges can be
	made visible.  Fix for #106740.  Also, changes constraints to
	constrain the resize and then the move to avoid complexities in
	the code for the above fix.

	* src/constraints.c (get_outermost_onscreen_positions)
	Compute the "effective" height of the work area and the minimum
	size for the window to compute a value by which a window is
	allowed to violate the top constraint.
	(meta_window_constrain): convert to a resize then a move instead
	of a move then resize.
2003-08-15 01:07:58 +00:00
Rob Adams
32a587e4a3 remove metacity.spec from AC_OUTPUT
2003-08-13  Rob Adams  <robadams@ucla.edu>

	* configure.in: remove metacity.spec from AC_OUTPUT
2003-08-14 06:14:56 +00:00
Havoc Pennington
8deed5d601 remove, nobody is maintaining it.
2003-08-13  Havoc Pennington  <hp@redhat.com>

	* metacity.spec.in: remove, nobody is maintaining it.
2003-08-13 19:30:11 +00:00
Laurent Dhima
f8b4a391e3 Added "sq" to ALL_LINGUAS
* configure.in: Added "sq" to ALL_LINGUAS
2003-08-12 22:47:13 +00:00
Laurent Dhima
2f3ed8ab65 Added Albanian file
* sq.po: Added Albanian file
2003-08-12 22:43:39 +00:00
Dafydd Harries
306fc4ee61 Updated Welsh translation. 2003-08-12 18:47:02 +00:00
Havoc Pennington
5200e59ba3 don't select for button press/release events, as that keeps other clients
2003-08-10  Havoc Pennington  <hp@pobox.com>

	* src/screen.c (meta_screen_new): don't select for button
	press/release events, as that keeps other clients from doing so,
	and it doesn't seem that metacity has any reason to do it.
	Patch from Andreas Volz.
2003-08-10 20:14:45 +00:00
Wang Jian
d06dee2778 *** empty log message *** 2003-08-09 11:04:50 +00:00
Christophe Merlet
19105eedb2 Updated French translation. 2003-08-09 08:26:00 +00:00
Bastien Nocera
a252050cb8 fix markup being ignored when a window title has a forbidden character in
2003-08-08  Bastien Nocera  <hadess@hadess.net>

	* src/metacity-dialog.c: (kill_window_question),
	(warn_about_no_sm_support): fix markup being ignored when a window
	title has a forbidden character in it (eg. "Send & Receive")
	* src/tools/metacity-window-demo.c: fix warning
2003-08-08 16:25:34 +00:00
Danilo Šegan
435bf3f2e4 Updated Serbian translation.
2003-08-08  Danilo Šegan  <dsegan@gmx.net>

	* sr.po, sr@Latn.po: Updated Serbian translation.
2003-08-08 03:01:55 +00:00
Hasbullah Bin Pit
1fcd5e9704 Updated Malay translation.
2003-08-07  Hasbullah Bin Pit <sebol@ikhlas.com>

        * ms.po: Updated Malay translation.
2003-08-07 17:34:13 +00:00
Metin Amiroff
5188e9c4d0 Updated Azerbaijani translation.
2003-08-06  Metin Amiroff  <metin@karegen.com>

        * az.po: Updated Azerbaijani translation.
2003-08-06 17:38:14 +00:00
Ole Laursen
1d57293511 Updated Danish translation.
2003-08-05  Ole Laursen  <olau@hardworking.dk>

	* da.po: Updated Danish translation.
2003-08-05 14:41:16 +00:00
Pablo Gonzalo del Campo
ebbc388205 Updated Spanish translation.
2003-08-05  Pablo Gonzalo del Campo  <pablodc@bigfoot.com>

        * es.po: Updated Spanish translation.
2003-08-05 14:24:09 +00:00
Arvind Samptur
fb5f3f6bb0 Number of strings we are processing is one more than required.
2003-07-29  Arvind Samptur  <arvind.samptur@wipro.com>

        * src/xprops.c (utf8_list_from_results): Number of
        strings we are processing is one more than required.

        Also get the string count right even without a null byte at the end.
        Pointed out by Havoc.
2003-07-31 09:35:56 +00:00
Andras Timar
5558451c11 Updated Hungarian translation.
2003-07-29  Andras Timar  <timar@gnome.hu>

	* hu.po: Updated Hungarian translation.
2003-07-29 13:35:37 +00:00
Rob Adams
5727235572 Update window shaking loose so that the window is moved to the pointer and
2003-07-27  Rob Adams  <robadams@ucla.edu>

	* src/window.c (update_move):  Update window shaking loose so that
	the window is moved to the pointer and certain drag state is
	properly restored once windows "reattach".  Fix for #115000 based
	on the patch by Jurg Billeter.

	* src/screen.c (meta_screen_resize): Invalidate work areas after
	an xrandr screen size update.  Fix for #117230.

	* src/stack.c (window_is_fullscreen_size): Check the bottom corner
	of the window in addition to the top corner.  Fix for #118194.

	* src/constraints.c (meta_window_constrain): Support aspect ratio
	hints in the new constraints code.  Fix for #113798.

	* src/tools/metacity-window-demo.c (toggle_aspect_ratio): toggle
	the aspect ratio hints to force a 16:9 aspect ratio.
	(do_appwindow): add a button to toggle aspect ratio.
2003-07-28 02:09:20 +00:00
Havoc Pennington
74fa2a7ab2 also measure wall clock time, and run over a number of window sizes.
2003-07-27  Havoc Pennington  <hp@pobox.com>

	* src/theme-viewer.c (run_theme_benchmark): also measure wall
	clock time, and run over a number of window sizes.
2003-07-27 23:35:40 +00:00
Sajith VK
e49cc883bb ok 2003-07-27 11:21:59 +00:00
Dafydd Harries
3b54d71058 Updated Welsh translation. 2003-07-25 00:16:24 +00:00
Pablo Saratxaga
2a90c0225d updated Vietnamese file 2003-07-24 11:20:28 +00:00
Evandro Fernandes Giovanini
f7e42bc4c4 Updated Brazilian Portuguese translation.
2003-07-20  Evandro Fernandes Giovanini <evandrofg@ig.com.br>

        * pt_BR.po: Updated Brazilian Portuguese translation.
2003-07-20 11:36:37 +00:00
updated ja.po. T.Aihana
2ffc505c19 2003-07-20 updated ja.po. T.Aihana <aihana@gnome.gr.jp> 2003-07-20 06:41:13 +00:00
Duarte Loreto
154da1f68a Updated Portuguese translation.
2003-07-18  Duarte Loreto <happyguy_pt@hotmail.com>

        * pt.po: Updated Portuguese translation.
2003-07-17 23:59:27 +00:00
Kostas Papadimas
b45a357652 Updated the Greek translation 2003-07-17 16:49:53 +00:00
Vincent van Adrighem
7962cfa83e Dutch translation updated by Tino Meinen.
2003-07-17  Vincent van Adrighem  <V.vanAdrighem@dirck.mine.nu>

	* nl.po: Dutch translation updated by Tino Meinen.
2003-07-17 08:03:31 +00:00
Havoc Pennington
2d89ba9c87 update
2003-07-15  Havoc Pennington  <hp@redhat.com>

	* NEWS: update

	* configure.in: 2.5.3
2003-07-15 21:54:22 +00:00
Christian Neumair
00672554ed Updated German translation. 2003-07-12 21:30:23 +00:00
Pablo Saratxaga
f2c0ff8979 Added Walloon file 2003-07-12 13:29:28 +00:00
Alessio Frusciante
dc52a32aad Updated Italian translation. 2003-07-12 13:02:50 +00:00
Vincent van Adrighem
bd779534af Dutch translation updated by Kees van den Broek.
2003-07-07  Vincent van Adrighem  <V.vanAdrighem@dirck.mine.nu>

	* nl.po: Dutch translation updated by Kees van den Broek.
2003-07-07 15:39:40 +00:00
Kwok-Koon Cheung
cf0bd5bdc1 Updated traditional Chinese translation.
* zh_TW.po: Updated traditional Chinese translation.
2003-07-07 15:24:19 +00:00
Evandro Fernandes Giovanini
5dcc25693a Updated Brazilian Portuguese translation.
2003-07-06  Evandro Fernandes Giovanini <evandrofg@ig.com.br>

        * pt_BR.po: Updated Brazilian Portuguese translation.
2003-07-07 01:30:44 +00:00
Havoc Pennington
1443f06471 add rationales.txt
2003-07-04  Havoc Pennington  <hp@pobox.com>

	* Makefile.am (EXTRA_DIST): add rationales.txt
2003-07-05 02:08:51 +00:00
Jordi Mallach
63a6f2121e Add X-GNOME-Bugzilla entries.
2003-07-02  Jordi Mallach  <jordi@sindominio.net>

	* src/metacity.desktop.in: Add X-GNOME-Bugzilla entries.
2003-07-02 17:15:56 +00:00
Artur Flinta
68fca2e5e5 Updated Polish translation.
2003-07-02  Artur Flinta  <aflinta@cvs.gnome.org>

	* pl.po: Updated Polish translation.
2003-07-01 23:31:41 +00:00
Padraig O'Briain
42182cbe77 Activate window before ending grab. This fixes bug #114037.
2003-07-01  Padraig O'Briain  <padraig.obriain@sun.com>

	* src/keybindings.c (process_tab_grab): Activate window before ending
	grab. This fixes bug #114037.
2003-07-01 14:59:09 +00:00
Rob Adams
d08fa29612 Update grab state when we unmaximize so double-clicking doesn't cause
2003-06-20  Rob Adams  <robadams@ucla.edu>

	* src/window.c (meta_window_unmaximize): Update grab state when we
	unmaximize so double-clicking doesn't cause weird window-jumping
	problems.  See #116292.
2003-06-30 14:49:11 +00:00
Rob Adams
311f435120 Actually maximize after placement. See #116285.
2003-06-29  Rob Adams  <robadams@ucla.edu>

	* src/constraints.c (meta_window_constrain): Actually maximize
	after placement.  See #116285.
2003-06-29 22:33:28 +00:00
Jordi Mallach
788ea66b1f Updated Catalan translation. 2003-06-28 16:43:52 +00:00
Havoc Pennington
fa075eb8f1 nuke the lists of struts here, to improve confidence that we never try to
2003-06-26  Havoc Pennington  <hp@pobox.com>

	* src/workspace.c (meta_workspace_invalidate_work_area): nuke the
	lists of struts here, to improve confidence that we never try to
	use them after a window with rects in the list gets freed.
	(it wasn't broken before I don't think, just making the
	code more robust against future mods)

	* src/window.c (meta_window_update_struts): replace magic "75"
	with a macro

	* src/constraints.c (constraint_hints_applies_func): don't apply
	hints to maximized or fullscreen, rather than only fullscreen
	(constrain_move): add paranoia max number of iterations to the
	heuristic loop
2003-06-28 16:12:32 +00:00
Miloslav Trmac
e1102bc6ff Update Czech translation 2003-06-28 15:55:07 +00:00
Christian Rose
f92eadf9d6 Updated Swedish translation.
2003-06-28  Christian Rose  <menthos@menthos.com>

	* sv.po: Updated Swedish translation.
2003-06-28 10:28:55 +00:00
Rob Adams
34ec58af0a Add keybinding to allow the user to toggle _NET_WM_STATE_ABOVE on windows.
2003-06-26  Rob Adams  <robadams@ucla.edu>

	Add keybinding to allow the user to toggle _NET_WM_STATE_ABOVE on
	windows.  Disabled by default.  See #98387.

	* src/keybindings.c (handle_toggle_above): new function implements
	the keybinding

	* src/metacity.schemas.in: add toggle_above keybinding

	* src/prefs.[ch]: add toggle_above keybinding

	* src/window.[ch] (meta_window_make_above): new function to put a
	window into the above state
	(meta_window_unmake_above): new function takes a window out of the
	above state
2003-06-27 14:49:56 +00:00
Mohammad DAMT
b6389fbf60 Updated Indonesian translation
2003-06-27  Mohammad DAMT  <mdamt@bisnisweb.com>

	* id.po: Updated Indonesian translation
2003-06-27 04:06:42 +00:00
Ole Laursen
e26992e419 Updated Danish translation.
2003-06-26  Ole Laursen  <olau@hardworking.dk>

	* da.po: Updated Danish translation.
2003-06-26 08:30:24 +00:00
Mohammad DAMT
40ea74f46c Added Indonesian translation Added "id" to ALL_LINGUAS
2003-06-26  Mohammad DAMT  <mdamt@bisnisweb.com>

	* po/id.po: Added Indonesian translation
	* configure.in: Added "id" to ALL_LINGUAS
2003-06-26 03:46:17 +00:00
Rob Adams
971f3f1207 Update constraints code to support the new _NET_WM_STRUT_PARTIAL EWMH
2003-06-10  Rob Adams  <robadams@ucla.edu>

	Update constraints code to support the new _NET_WM_STRUT_PARTIAL
	EWMH draft specification.  See #86682.  Also, fix a bug involving
	work area invalidation on metacity startup.  Fix for #108497.
	Finally, some minor fixes for full screen windows.

	* src/window.h: Add new MetaStruts structure to store strut rects
	for a window.  Remove has_struts and do_not_cover flag, and
	support new MetaStruts instead of the four ints.

	* src/window.c (meta_window_new): change initialization to work
	with new struts.  Also, move meta_window_update_struts call to
	after the workspaces are initialized to fix #108497.  Remove
	do_not_cover and related code.
	(process_property_notify): add strut_partial
	(update_struts): change function name to meta_window_update_struts
	and expose in external MetaWindow API.  Support partial width
	struts and the new strut rects.

	* src/workspace.h: add new GSLists containing pointers to all
	relevant struts for this workspace.

	* src/workspace.c (meta_workspace_new): initialize the list of
	strut rects for this workspace.
	(meta_workspace_free): free the strut rect lists
	(ensure_work_areas_validated): support new struts and new strut
	rect lists.  Unleash the per-xinerama work areas.

	* src/constraints.c (get_outermost_onscreen_positions): Use the
	current window position along with the new per-workspace strut
	rects to compute the constraints that apply to a particular
	window.
	(constraint_hint_applies_func): don't do hints constraints on
	fullscreen windows
	(update_position_limits): for maximized windows use the work areas
	to set the position limits; for other windows rely on the struts
	constraints to be computed later in
	get_outermost_onscreen_positions
	(meta_window_constrain): don't apply aspect ratio hints to full
	screen windows

	* src/display.c (meta_display_open): add _NET_WM_STRUT_PARTIAL atom
	(meta_rectangle_equal): new helper function for MetaRectangles
	(event_queue_callback): #ifndef out if USE_GDK_DISPLAY not set to
	avoid compiler warning

	* src/display.h: add atom_net_wm_strut_partial, and add
	meta_rectangle_equal.

	* src/screen.c (meta_screen_rect_intersects_xinerama): change
	_window_intersects_ to _rect_intersects_ which is more useful now.
	(meta_screen_resize_func): update struts on windows with struts
	since struts are relative to the screen size, and this function is
	called when the screen size updates.

	* src/screen.h (meta_screen_rect_intersects_xinerama): change
	_window_intersects_ to _rect_intersects_ which is more useful now.

	* src/window-props.c (meta_display_init_window_prop_hooks): add
	hook for strut_partial

	* src/tools/metacity-window-demo.c: Support partial-width struts
	on the dock window tests for metacity testing purposes.
2003-06-26 03:09:38 +00:00
Vincent van Adrighem
3a39036dcb Dutch translation updated by Kees van den Broek.
2003-06-23  Vincent van Adrighem  <V.vanAdrighem@dirck.mine.nu>

	* nl.po: Dutch translation updated by Kees van den Broek.
2003-06-22 23:02:40 +00:00
Samel Jn Gunnarsson
3428ed1adf Added Icelandic translation
2003-06-22  Samel Jn Gunnarsson  <sammi@techattack.nu>

	* is.po: Added Icelandic translation
2003-06-22 15:21:40 +00:00
Christophe Merlet
81e4cb44aa Updated French translation. 2003-06-20 22:49:49 +00:00
Ivan Stojmirov
acb625ddeb added Macedonian translation 2003-06-19 10:33:44 +00:00
Pauli Virtanen
44508380dc Updated Finnish translation.
2003-06-17  Pauli Virtanen  <pauli.virtanen@hut.fi>

	* fi.po: Updated Finnish translation.
2003-06-17 18:34:50 +00:00
Rob Adams
4d8414acfd Focus on mouse click in sloppy/mouse to fix keynav. Fix for #115072.
2003-06-12  Rob Adams  <robadams@ucla.edu>

	* src/display.c (event_callback): Focus on mouse click in
	sloppy/mouse to fix keynav.  Fix for #115072.
2003-06-13 05:47:51 +00:00
Pablo Gonzalo del Campo
70d0446190 Updated Spanish translation.
2003-06-12  Pablo Gonzalo del Campo <pablodc@bigfoot.com>

	* es.po: Updated Spanish translation.
2003-06-12 21:55:08 +00:00
Rob Adams
793a630e2f honor --disable-schemas-install. Fix for #106123 from Julio Merino
2003-06-12  Rob Adams  <robadams@ucla.edu>

	* src/Makefile.am: honor --disable-schemas-install.  Fix for
	#106123 from Julio Merino
2003-06-12 17:41:38 +00:00
Rob Adams
2936391fc8 Update ChangeLog 2003-06-12 07:22:44 +00:00
Rob Adams
85826d0d9a Remove legacy support for Gnome 1 hints, since we deem it unlikely that
2003-06-12  Rob Adams  <robadams@ucla.edu>

	Remove legacy support for Gnome 1 hints, since we deem it unlikely
	that anyone is running a current metacity with Gnome 1.  The
	removed hints are _WIN_WORKSPACE, _WIN_LAYER, _WIN_PROTOCOLS,
	_WIN_SUPPORTING_WM_CHECK, and _WIN_HINTS.

	* display.c (meta_display_open): remove hints

	* display.h: remove atoms for hints

	* screen.c (set_wm_check_hint): don't set legacy hint
	(set_supported_hint): don't set legacy hint

	* window-props.c (init_win_workspace): removed
	(reload_win_workspace): removed
	(meta_display_init_window_prop_hooks): remove hints

	* window.h: remove do_not_cover flag

	* window.c: remove GnomeWinHints enum
	(recalc_do_not_cover_struts): removed
	(meta_window_new): don't initialize removed flags or compute
	legacy struts
	(move_resize_cmp): removed
	(idle_move_resize): Don't bother sorting the idle queue
	(meta_window_client_message): don't set legacy hint
	(process_property_notify): remove hints
	(update_net_wm_type): don't fall back to WIN_LAYER hint
	(update_struts): remove legacy struts
2003-06-12 07:03:04 +00:00
Havoc Pennington
0a20419628 make raise-on-click explicitly only happen in click to focus mode.
2003-06-12  Havoc Pennington  <hp@pobox.com>

	* src/display.c (event_callback): make raise-on-click explicitly
	only happen in click to focus mode.

	* src/window.c (update_move): apply patch from Jurg Billeter to
	allow you to "shake loose" maximized windows and move them between
	Xinerama heads. #93586

	* src/display.c: delete event_queue_callback

	* src/display.h (struct _MetaDisplay): get rid of
	grab_current_window_pos and grab_current_root_[xy] as I could find
	absolutely no code using them for anything. They were just sort of
	randomly assigned to for no apparent reason.

	* src/display.c (event_callback): double-click timeout is per
	screen, so get the screen and pass screen->ui to
	meta_ui_get_double_click_timeout()

	* src/ui.c (meta_ui_get_double_click_timeout): take a MetaUI
	argument so we get the right settings for each screen
	(meta_ui_get_drag_threshold): new function
2003-06-12 05:55:06 +00:00
Bill Haneman
2d4503ee59 Fix for 114940. 2003-06-11 17:55:28 +00:00
Rob Adams
010e620a34 Revamp placement policy for windows that are maximized when they are
2003-06-09  Rob Adams  <robadams@ucla.edu>

	Revamp placement policy for windows that are maximized when they
	are mapped, including windows that set a hint to be maximized or
	windows that are auto-maximized using our heuristic.  See #111902.

	* src/window.h: add new flag maximize_after_placement and new
	function meta_window_maximize_internal.

	* src/window.c (meta_window_new): initialize
	maximize_after_placement to FALSE and remove the automaximize
	heuristic.
	(meta_window_maximize_internal): new function accepts a saved_rect
	argument to be used as the new saved_rect for the window, and does
	not queue a move_resize.
	(meta_window_maximize): re-implement using
	meta_window_maximize_internal.
	(update_net_wm_state): If a window has a maximize hint set on
	startup set maximize_after_placement to TRUE

	* src/constraints.c (meta_window_constrain): Update the xinerama
	information in the ConstraintInfo after placing the window, and
	maximize the window after placement if
	window->maximize_after_placement

	* src/place.c (find_first_fit): take a natural xinerama list as an
	argument instead of generating it here
	(constrain_placement): remove function, since it is no longer
	needed
	(meta_window_place): generate the natural xinerama list here and
	pass it into find_first_fit.  If find_first_fit fails, use the
	list to find empty xineramas where we can place windows that may
	be maximized later.  This makes maximized windows follow the
	correct placement policy.  Move the automaximize heuristic here.
2003-06-09 23:49:02 +00:00
Rob Adams
3f6bad087d install an alarm to timeout the no-sm-dialog after 4 minutes of
2003-06-09  Rob Adams  <robadams@ucla.edu>

	* src/metacity-dialog.c (warn_about_no_sm_support): install an
	alarm to timeout the no-sm-dialog after 4 minutes of inactivity.
	Patch from Ximian.  See #114789.
2003-06-09 18:58:53 +00:00
Garrett LeSage
c523d2827c Applying a fix for the "X" (close button) from Joe A. <joefefifo@yahoo.com> 2003-06-09 18:56:28 +00:00
Christophe Merlet
a53fea96ab Updated French translation. 2003-06-08 19:32:32 +00:00
Rob Adams
0bb8538e2f call meta_group_compute_group after setting window->desc to avoid SIGSEGV
2003-06-07  Rob Adams  <robadams@ucla.edu>

	* src/window.c (meta_window_new): call meta_group_compute_group
	after setting window->desc to avoid SIGSEGV when verbose mode is
	enabled.
2003-06-07 17:15:33 +00:00
Christian Neumair
03b3e98a51 Updated German translation. 2003-06-07 14:19:40 +00:00
Havoc Pennington
e0963e6b66 drop the mouse button grabs for the focused window; we'll see if this
2003-06-07  Havoc Pennington  <hp@pobox.com>

	* src/window.c (meta_window_notify_focus): drop the mouse button
	grabs for the focused window; we'll see if this breaks anything.
	It should fix #102209
2003-06-07 05:07:08 +00:00
Jonathan Blandford
6262db51a2 fix the location of the schemas file.
Fri Jun  6 19:27:53 2003  Jonathan Blandford  <jrb@gnome.org>

	* src/metacity.schemas.in: fix the location of the schemas file.
2003-06-06 23:31:24 +00:00
Jordi Mallach
58df4ee985 Updated Catalan translation. 2003-06-06 12:22:58 +00:00
Rob Adams
85abc9bfe7 don't be stupid and set window->group = NULL after calling
2003-06-04  Rob Adams  <robadams@ucla.edu>

	* src/window.c (meta_window_new): don't be stupid and set
	window->group = NULL after calling meta_window_compute_group.

	* src/group.c (meta_window_get_group): assert that window->group
	!= NULL in here instead of computing the group to ensure
	robustness.
2003-06-04 19:28:19 +00:00
Rob Adams
993c7075f3 Precompute groups to guarantee that meta_group_list_windows always returns
2003-06-04  Rob Adams  <robadams@ucla.edu>

	Precompute groups to guarantee that meta_group_list_windows always
	returns the correct list of windows.  See Bug #96973

	* src/window.h: change cached_group variable to group

	* src/window.c (meta_window_new): change cached_group to group and
	call meta_window_compute_group

	* src/groups.c (meta_window_get_group): simply return
	window->group rather than computing it and returning
	window->cached_group
	(meta_window_compute_group): new function computes window->group.
	Designed to be called once from meta_window_new
	(remove_window_from_group): change cached_group to group
	(meta_window_group_leader_changed): call meta_window_compute_group
	instead of meta_window_get_group
2003-06-04 19:15:46 +00:00
Rob Adams
4469a42a77 Roll back broken update 2003-06-04 16:54:04 +00:00
Rob Adams
bf965f8465 Precompute groups to guarantee that meta_group_list_windows always returns
2003-06-04  Rob Adams  <robadams@ucla.edu>

	Precompute groups to guarantee that meta_group_list_windows always
	returns the correct list of windows.  See Bug #96973

	* src/window.h: change cached_group variable to group

	* src/window.c (meta_window_new): change cached_group to group and
	call meta_window_compute_group

	* src/groups.c (meta_window_get_group): simply return
	window->group rather than computing it and returning
	window->cached_group
	(meta_window_compute_group): new function computes window->group.
	Designed to be called once from meta_window_new
	(remove_window_from_group): change cached_group to group
2003-06-04 16:45:47 +00:00
Dmitry Mastrukov
f87a8c212f be.po: Updated Belarusian translation from Belarusian team <i18n@mova.org>. 2003-06-04 04:29:20 +00:00
Dmitry Mastrukov
3663ba0259 ru.po: Updated Russian translation from Russian team <gnome-cyr@gnome.org>. 2003-06-04 04:25:56 +00:00
Dafydd Harries
b9900681e7 Updated Welsh translation. 2003-05-31 15:57:36 +00:00
Rob Adams
3edad8599c CVS2003-05-29 Rob Adams <robadams@ucla.edu>
CVS2003-05-29  Rob Adams  <robadams@ucla.edu>

	Use a new property _METACITY_SENTINEL to eliminate a race
	condition that causes focus to behave badly with sloppy/mouse
	focus when lots of windows are mapped/unmapped, such as with a
	workspace switch.  The EnterNotify events on a display are ignored
	until the PropertyNotify sent after all the window maps is
	received.  This is a fix for #110970.

	* src/display.[ch]: New _METACITY_SENTINEL atom.
	(event_callback): ignore EnterNotify if the sentinel isn't clear,
	and decrement the sentinel counter when the PropertyNotify is
	received.
	(meta_display_increment_focus_sentinel): new function.  Increments
	the sentinel counter and updates the property on a root window on
	this display.
	(meta_display_decrement_focus_sentinel): Decrement the sentinel
	counter.
	(meta_display_focus_sentinel_clear): returns whether the sentinel
	counter is zero.

	* src/window.c (idle_calc_showing): after showing windows, call
	meta_display_increment_focus_sentinel on each display for windows
	to be shown.

	* src/workspace.[ch] (meta_workspace_activate_with_focus): new
	function activates a workspace and focuses a particular window
	after the workspace is activated.
	(meta_workspace_activate): now just a wrapper for
	meta_workspace_activate_with_focus

	* src/keybindings.c: use new meta_workspace_activate_with_focus
	function to ensure that focus will follow the focused window
	through the workspace switch.

: ----------------------------------------------------------------------
2003-05-30 20:24:00 +00:00
Paul Duffy
903f3d7e6e Updated Irish Translation
2003-05-30  Paul Duffy <dubhthach@frink.nuigalway.ie>
Updated Irish Translation
2003-05-30 19:01:18 +00:00
Havoc Pennington
051e404d09 s/int/gsize/ for g_file_get_contents() (found independently by
2003-05-29  Havoc Pennington  <hp@redhat.com>

	* src/theme-parser.c (meta_theme_load): s/int/gsize/ for
	g_file_get_contents() (found independently by
	marcus@freebsd.org on SPARC and James Laska on s390x;
	#113661

	* src/main.c (main): fix theme location mentioned in error message
2003-05-30 04:52:12 +00:00
Ray Strode
d1a853557b Get and use double-click speed from GtkSettings (Bug #103218).
2003-05-29  Ray Strode  <halfline@hawaii.rr.com>

	Get and use double-click speed from GtkSettings (Bug #103218).

	* src/ui.c, src/ui.h:
	add function meta_ui_get_double_click_timeout for looking up
	the global double-click speed.

	* src/display.c, src/display.h: remove double_click_time
	field from MetaDisplay and use meta_ui_get_double_click_timeout
	instead.
2003-05-30 02:53:42 +00:00
Kwok-Koon Cheung
f441033959 Updated traditional Chinese translation.
* zh_TW.po: Updated traditional Chinese translation.
2003-05-30 00:43:44 +00:00
Rob Adams
0fa4954c46 chdir to the user's home directory on startup. See #113755.
2003-05-29  Rob Adams  <robadams@ucla.edu>

	* src/main.c (main): chdir to the user's home directory on
	startup.  See #113755.

	* src/stack.c (get_standalone_layer): a window should be in the
	fullscreen layer if it or any of its transient descendants are
	focused or expecting the focus and it is either fullscreen or
	fullscreen sized.  Fix for #104369.

	* src/stack.c (is_focused_foreach): foreach used by
	get_standalone_layer to find focused transient descendants.
2003-05-29 17:16:22 +00:00
Duarte Loreto
59958b0f0a Updated Portuguese translation.
2003-05-26  Duarte Loreto <happyguy_pt@hotmail.com>

        * pt.po: Updated Portuguese translation.
2003-05-26 20:56:52 +00:00
Miloslav Trmac
4549e42480 Update Czech translation 2003-05-21 08:45:10 +00:00
Havoc Pennington
1620fd5408 the mask display->ignored_modifier_mask wasn't being bound, due to "<"
2003-05-20  Havoc Pennington  <hp@pobox.com>

	* src/keybindings.c (meta_change_keygrab): the mask
	display->ignored_modifier_mask wasn't being bound,
	due to "<" instead of "<=" (most people didn't notice
	as display->ignored_modifier_mask included Scroll_Lock).
	Red Hat bugzilla #91301 reported by Youssef Makki

	* src/display.c (meta_change_button_grab): make corresponding
	change for button grabs.
2003-05-21 03:45:58 +00:00
Havoc Pennington
1d692936e0 2.5.2 2003-05-20 16:40:32 +00:00
Anders Carlsson
6153a17a64 Split up the strings to make life easier for translators.
2003-05-20  Anders Carlsson  <andersc@codefactory.se>

	* src/metacity-dialog.c: (kill_window_question):
	Split up the strings to make life easier for translators.
2003-05-20 15:54:42 +00:00
Christian Rose
b77590ba7a Updated Swedish translation.
2003-05-20  Christian Rose  <menthos@menthos.com>

	* sv.po: Updated Swedish translation.
2003-05-20 15:33:21 +00:00
Anders Carlsson
c9df553d02 Fix the wording and HIGify the dialog.
2003-05-20  Anders Carlsson  <andersca@codefactory.se>

	* src/metacity-dialog.c: (kill_window_question):
	Fix the wording and HIGify the dialog.
2003-05-20 15:06:01 +00:00
Telsa Gwynne
967ac0f1d9 More Welsh updates from Daf. 2003-05-19 14:27:00 +00:00
Christophe Merlet
ebf2c77c50 Updated French translation. 2003-05-18 22:55:45 +00:00
Havoc Pennington
c370a3e503 revert broken change that assumed foreach_ancestor iterated over the
2003-05-18  Havoc Pennington  <hp@pobox.com>

	* src/window.c (unminimize_window_and_all_transient_parents):
	revert broken change that assumed foreach_ancestor iterated
	over the window itself. Andrew Sobala, Rob Adams,
	#113232
`
2003-05-18 17:16:03 +00:00
Rob Adams
9e2608524d update ChangeLog 2003-05-17 04:16:34 +00:00
Rob Adams
7fc6c99987 Flip the workspace when using up/down/left/right for move window to, but
2003-05-16  Rob Adams  <robadams@ucla.edu>

	Flip the workspace when using up/down/left/right for move window
	to, but not when specifying a workspace explicitly as in move to
	workspace 4.  Possible fix for #105492.

	* src/keybindings.c (do_handle_move_to_workspace): new function
	moves a window to a workspace with the option to flip to that
	workspace.
	(handle_move_to_workspace): Use new do_handle_move_to_workspace
	function without flipping (a keybinding)
	(handle_move_to_workspace_flip): Use new
	do_handle_move_to_workspace function with flipping (a keybinding)
2003-05-17 00:00:55 +00:00
Havoc Pennington
3ad5618596 fix for bug #104018 from David Santiago, change button state to normal
2003-05-16  Havoc Pennington  <hp@redhat.com>

	* src/frames.c (meta_frames_paint_to_drawable): fix for
	bug #104018 from David Santiago, change button state to
	normal while it's being pressed if you move the mouse
	outside it. Do this by tracking prelit_control for whether
	to draw a button as active, not just for whether to draw
	it as prelit.
	(meta_frames_motion_notify_event): also update prelit_control
	while clicking a button
2003-05-16 23:09:49 +00:00
Havoc Pennington
4b02b0ddf1 fill in window->desc sooner since we use it sooner now.
2003-05-16  Havoc Pennington  <hp@redhat.com>

	* src/window.c (meta_window_new): fill in window->desc sooner
	since we use it sooner now.

	* src/display.c (meta_display_open): init
	display->grab_update_alarm

	* src/window.c (meta_window_new): initialize the always_sticky
	field
	(meta_window_new): initialize the update_icon_queued field

        Patch from Julien Olivier bug #92335 for converting "show desktop
	mode" to "all windows are minimized" when you open a new window,
	instead of just mapping all the windows again.

	* src/window.c (meta_window_activate): minimize all windows before
	coming out of show desktop mode.
	(meta_window_unminimize): don't toggle show desktop mode here

	* src/screen.c (meta_screen_minimize_all_except): new function
2003-05-16 21:59:08 +00:00
Telsa Gwynne
1ac3f938de Welsh translation from Dafydd Harries. 2003-05-16 15:38:29 +00:00
Pablo Gonzalo del Campo
b422d86256 Updated Spanish translation.
2003-05-16  Pablo Gonzalo del Campo <pablodc@bigfoot.com>

	* es.po: Updated Spanish translation.
2003-05-16 12:24:09 +00:00
Duarte Loreto
8ac4e04e12 Updated Portuguese translation.
2003-05-12  Duarte Loreto <happyguy_pt@hotmail.com>

        * pt.po: Updated Portuguese translation.
2003-05-12 23:49:34 +00:00
KAMAGASAKO Masatoshi
d05cfba523 Updated Japanese translation.
2003-05-10  KAMAGASAKO Masatoshi  <emerald@gnome.gr.jp>

	* ja.po: Updated Japanese translation.
2003-05-10 06:02:41 +00:00
KAMAGASAKO Masatoshi
6f458fc9d6 Updated Japanese translation.
2003-05-10  KAMAGASAKO Masatoshi  <emerald@gnome.gr.jp>

	* ja.po: Updated Japanese translation.
2003-05-10 05:54:02 +00:00
Jordi Mallach
a0d8c3c703 Updated Catalan translation. 2003-05-10 00:11:31 +00:00
Evandro Fernandes Giovanini
11ee26bb65 Updated Brazilian Portuguese translation.
2003-05-09  Evandro Fernandes Giovanini <evandrofg@ig.com.br>

        * pt_BR.po: Updated Brazilian Portuguese translation.
2003-05-10 00:03:07 +00:00
Christian Rose
96e20f83bb Updated Swedish translation.
2003-05-08  Christian Rose  <menthos@menthos.com>

	* sv.po: Updated Swedish translation.
2003-05-07 23:04:21 +00:00
Changwoo Ryu
e841a492c8 Updated Korean translation.
2003-05-08  Changwoo Ryu  <cwryu@debian.org>

	* ko.po: Updated Korean translation.
2003-05-07 17:35:41 +00:00
Danilo Šegan
d93b0d319c Added "sr" and "sr@Latn" to ALL_LINGUAS.
2003-05-05  Danilo Šegan  <dsegan@gmx.net>

	* configure.in: Added "sr" and "sr@Latn" to ALL_LINGUAS.

	* po/sr.po, po/sr@Latn.po: Added Serbian translation by
	http://Prevod.org/.
2003-05-06 02:17:30 +00:00
Havoc Pennington
a7c344bbc5 when moving window to another workspace, don't switch to that workspace.
2003-05-03  Havoc Pennington  <hp@pobox.com>

	* src/keybindings.c (handle_move_to_workspace): when moving
	window to another workspace, don't switch to that workspace.

	* src/window.c (menu_callback): when moving window to another
	workspace, don't switch to that workspace.
2003-05-03 18:14:17 +00:00
Havoc Pennington
f64a231620 2.5.1
2003-05-03  Havoc Pennington  <hp@pobox.com>

	* configure.in: 2.5.1

	* NEWS: update
2003-05-03 16:37:24 +00:00
Rob Adams
a8f9e2e919 Don't apply onscreen constraints to full screen windows. Fix for #110048
2003-05-01  Rob Adams  <robadams@ucla.edu>

	* src/constraints.c (constraint_onscreen_applies_func): Don't
	apply onscreen constraints to full screen windows.  Fix for
	#110048
2003-05-02 07:32:02 +00:00
Havoc Pennington
9569096991 include Xlib.h before XKBlib.h which is required on Solaris. #111877 from
2003-04-29  Havoc Pennington  <hp@redhat.com>

	* src/bell.h: include Xlib.h before XKBlib.h which is required on
	Solaris. #111877 from Peter O'Shea
2003-04-29 22:07:47 +00:00
Miloslav Trmac
2722c277ee Update Czech translation 2003-04-29 18:04:55 +00:00
Keith Packard
2eec8daff5 Initialize size_hints on window creation using code shared with size_hints property reload 2003-04-26 17:40:32 +00:00
Havoc Pennington
75fa56391d support diagonal keypad keybindings, from Dafydd Harries
2003-04-23  Havoc Pennington  <hp@pobox.com>

	* src/keybindings.c (process_keyboard_move_grab): support
	diagonal keypad keybindings, from Dafydd Harries
2003-04-25 03:32:41 +00:00
Havoc Pennington
ec9cf27a81 purge HAVE_GTK_MULTIHEAD from the source code, not just from configure.in.
2003-04-21  Havoc Pennington  <hp@redhat.com>

	* purge HAVE_GTK_MULTIHEAD from the source code, not just from
	configure.in. Yes I am a loser.
2003-04-21 23:37:42 +00:00
Masahiro Sakai
0996da5e8e call AC_LIBTOOL_WIN32_DLL.
* configure.in: call AC_LIBTOOL_WIN32_DLL.

* src/Makefile.am: add -no-undefined to libmetacity_private_la_LDFLAGS
and write dependency libraries in libmetacity_private_la_LIBADD.
2003-04-19 07:19:04 +00:00
Dmitry Mastrukov
a8708e1c55 ru.po: Updated Russian translation from Russian team <gnome-cyr@gnome.org>. 2003-04-15 04:16:46 +00:00
Rob Adams
7c5e40e0ea cascade on xinerama with pointer instead of on first xinerama.
2003-04-06  Rob Adams  <robadams@ucla.edu>

	* src/place.c (find_next_cascade): cascade on xinerama with
	pointer instead of on first xinerama.
2003-04-07 03:33:45 +00:00
Rob Adams
e1d2b95459 Fix typo in ChangeLog entry.
2003-04-05  Rob Adams <robadams@ucla.edu>

	Fix typo in ChangeLog entry.
2003-04-06 05:59:25 +00:00
Rob Adams
9bd17f4fae Update placement policy for screen with multiple xineramas. Windows will
2003-04-05  Rob Adams  <robadams@ucla.edu>

	Update placement policy for screen with multiple xineramas.
	Windows will be placed preferentially on the xinerama with the
	pointer, and progressively further away as needed to find a place
	where the window does not overlap other windows.

	* src/place.c (rect_fits_in_work_area): function
	fit_rect_in_xinerama greatly simplified to work with new placement
	policy.
	(find_first_fit): implement new first first placement scheme

	* src/screen.c (meta_screen_get_xinerama_neighbor): look for an
	xinerama in the xinerama list that is adjacent to the specified
	xinerama.
	(meta_screen_get_natural_xinerama_list): return a list of
	xineramas in the order to be preferred by the placement algorithm
	as determined by the current location of the pointer.

	* src/screen.h: add function prototypes and an enum used by
	meta_screen_get_xinerama_neighbor.
2003-04-06 05:57:36 +00:00
Rob Adams
40ec58787f Fix a minor off-by-one error. See #110079.
2003-04-05  Rob Adams  <robadams@ucla.edu>

	* src/place.c (center_tile_rect_in_area):  Fix a minor off-by-one
	error.  See #110079.
2003-04-06 01:22:56 +00:00
Christophe Merlet
304fae9369 Updated French translation. 2003-04-03 21:15:09 +00:00
Rob Adams
72a7f57e5d When passing frame geometry to meta_window_constrain, send null if no
2003-03-30  Rob Adams  <robadams@ucla.edu>

	* src/window.c (meta_window_move_resize_internal): When passing
	frame geometry to meta_window_constrain, send null if no frame.
	Possible fix for #109039.
2003-03-30 10:52:07 +00:00
Havoc Pennington
0fee2ac499 add --noframes option for testing, showing how broken we currently are.
2003-03-29  Havoc Pennington  <hp@pobox.com>

	* src/wm-tester/test-gravity.c (main): add --noframes option for
	testing, showing how broken we currently are.
2003-03-29 20:04:19 +00:00
Soeren Sandmann
708a86cfee Only cap refresh rate when not using SYNC. Remove bogus
Fri Mar 28 14:13:37 2003  Soeren Sandmann  <sandmann@daimi.au.dk>

	* src/window.c (update_resize): Only cap refresh rate when not
	using SYNC. Remove bogus update-if-we-moved-more-than-a-delta.

	* src/window.c (update_move): Don't cap refresh rate during
	moves. Remove bogus update-if-we-moved-more-than-a-delta.
2003-03-28 13:11:24 +00:00
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
113 changed files with 71210 additions and 17437 deletions

1276
ChangeLog

File diff suppressed because it is too large Load Diff

37
HACKING
View File

@@ -1,3 +1,40 @@
Making a release
===
To make a release of metacity, do the following:
- check out a fresh copy from CVS
- increment the version number in configure.in,
see the comment above the version for the next fibonacci number
- update the file NEWS based on the ChangeLog
- add a ChangeLog entry containing the version number
you're releasing ("Released 2.5.4" or something)
so people can see which changes were before and after
a given release.
- "make distcheck" (DO NOT just "make dist" - pass the check!)
- if make distcheck fails, fix it.
- once distcheck succeeds, "cvs commit"
- if someone else made changes and the commit fails,
you have to "cvs up" and run "make distcheck" again
- once the commit succeeds, WITHOUT cvs updating, "cvs tag
METACITY_X_Y_Z" where
X_Y_Z map to version X.Y.Z
- scp the tarball to master.gnome.org
- run install-module on master.gnome.org to install the tarball
on the ftp site
Misc stuff
===
Don't commit substantive code in here without asking me,
hp@redhat.com. Adding translations, no-brainer typo fixes, etc. is

View File

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

134
NEWS
View File

@@ -1,3 +1,137 @@
2.6.0
===
- some additional translations
2.5.5
===
Thanks to Rob Adams, Arvind Samptur, Andreas Volz, Ray Strode, John
Paul Wallington, Soeren Sandmann for contributions to this release.
And as always thanks to the translators.
- fix aspect ratio handling
- fix "shake loose" functionality for maximized windows
- handle Xrandr size changes properly again
- fix fullscreen window detection
- fix workspace name handling
- don't steal button press events on root window
- nuke metacity.spec due to nonmaintenance
- allow too-large-for-screen windows to move their titlebar offscreen
- keep an MRU list of windows per-workspace and use it to focus
the next window when the focused window disappears
- fix cursor when moving
- improve appearance of opaque resize
- make BELOW window state work
- fix a crash when gdk_pixmap_foreign_new() returned NULL
2.5.3
===
Thanks to Jordi Mallach, Padraig O'Briain, Rob Adams, Julio Merino,
Ben Jansens, Jurg Billeter, Ray Strode, marcus@freebsd.org, James
Laska, for contributions to this release. Thanks also to
all the tireless translators.
- fixups to .desktop file
- activate window prior to grab end, avoiding
extra focus events
- add support for partial-width panels (fixes corner panel
and xinerama window position constraints)
- added keybinding to toggle window as "always on top"
- support --disable-schemas-install option to configure
- destroy support for legacy GNOME 1.x hints; metacity
no longer works with GNOME 1.x
- disable raise-on-click for mouse focus modes
- fix bug that broke many Javascript popup menus with mozilla
- allow "shaking loose" maximized windows, to move them
between Xinerama heads or whatever
- honor desktop-wide double click timeout
- handle window placement properly for windows that
start out maximized
- integrate Ximian patch to go ahead and log out after 4 minutes
even if a dialog is open
- fix a segfault
- fix bug where window groups weren't always kept up to date
- fix bug where focus got confused when switching workspaces
with mouse focus mode
- fix 64-bit crash on s390x
- chdir to user's homedir on startup
- keep window in fullscreen layer when its transients are focused
- fix keybindings bug when you had ScrollLock enabled
- many translation updates
2.5.2
===
Thanks to David Santiago, Julien Olivier, Anders Carlsson, Rob Adams
for fixes in this release.
- improved wording/UI for some dialogs
- while clicking a window button, if you move the mouse outside
the button such that releasing the mouse button won't activate
the window button, visually indicate by "popping out" the button.
- fix some valgrind errors
- change "show desktop mode" to convert to "everything is minimized
mode" if you open a new window while showing desktop, rather
than previous behavior of simply leaving show desktop mode.
- fix a trivial memory leak
- change "move to workspace N" so it doesn't switch workspaces,
just moves the window.
- translation updates
2.5.1
===
Thanks to Rob Adams, Peter O'Shea, Dafydd Harries, Masahiro Sakai,
Soeren Sandmann for fixes in this release.
- fix bug where fullscreen windows were below top panels
- build fix for Solaris
- support diagonal window movement with numeric keypad
- multihead fix
- build fix for Cygwin
- place on xinerama containing the pointer
- fix totally hosed window placement/movement for frameless
windows
- improvement to smoothness of window move/resize
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
===

23
README
View File

@@ -6,15 +6,18 @@ on UNIX keyboards.
The first release of Metacity was version 2.3. Metacity has no need for
your petty hangups about version numbers.
The stable releases so far are 2.4.x, 2.6.x
Unstable branches are 2.3.x, 2.5.x
COMPILING METACITY
===
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
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).
GNOME ftp site. You also need GConf 1.2 (unless building a funky
extra-small embedded metacity with --disable-gconf, see below).
REPORTING BUGS AND SUBMITTING PATCHES
===
@@ -78,7 +81,7 @@ METACITY FEATURES
- Does not expose the concept of "window manager" to the user. Some
of the features in the GNOME control panel and other parts of the
desktop happen to be implemented in metacity, such as changing your
window border theme, or changing your window navigation shorcuts,
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
@@ -369,7 +372,10 @@ A: This one is also in rationales.txt. Because "ouija board" UI, where
Q: Why no wireframe move/resize?
A: Also in rationales.txt. Because it has low usability, and is a pain
A: It's implemented in a patch that will be merged for GNOME 2.6
and is already in some vendor packages.
But: 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.
@@ -378,6 +384,9 @@ A: Also in rationales.txt. Because it has low usability, and is a pain
http://pobox.com/~hp/free-software-ui.html
http://pobox.com/~hp/features.html
The reason we had to add wireframe anyway was broken
proprietary apps that can't handle lots of resize events.
Q: Why no XYZ?
A: You are probably getting the idea by now - check rationales.txt,

View File

@@ -5,7 +5,7 @@ AM_CONFIG_HEADER(config.h)
# 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987
# releases on a branch add a 4th version like 2.4.21.1
AM_INIT_AUTOMAKE(metacity, 2.4.13)
AM_INIT_AUTOMAKE(metacity, 2.6.0)
# Honor aclocal flags
ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
@@ -20,6 +20,7 @@ AC_PROG_INTLTOOL([0.21])
AC_PROG_CC
AC_ISC_POSIX
AC_HEADER_STDC
AC_LIBTOOL_WIN32_DLL
AM_PROG_LIBTOOL
changequote(,)dnl
@@ -83,7 +84,7 @@ if test "x$GCC" = "xyes"; then
fi
changequote([,])dnl
METACITY_PC_MODULES='gtk+-2.0 >= 2.0.0'
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)
@@ -116,15 +117,21 @@ AC_ARG_ENABLE(shape, [ --disable-shape disable metacity's use
## try definining HAVE_BACKTRACE
AC_CHECK_HEADERS(execinfo.h, [AC_CHECK_FUNCS(backtrace)])
ALL_LINGUAS="am az bg ca cs da de el es fi fr gl he hu it ja ko lv mk 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 cy da de el en_GB es fa fi fr ga gl he hi hu id is it ja ko lv mk ml mn ms nl no pl pt pt_BR ro ru sl sk sq sr sr@Latn sv tr uk vi wa zh_CN zh_TW"
AM_GLIB_GNU_GETTEXT
## here we get the flags we'll actually use
PKG_CHECK_MODULES(METACITY_MESSAGE, gtk+-2.0 >= 2.0.0)
PKG_CHECK_MODULES(METACITY_WINDOW_DEMO, gtk+-2.0 >= 2.0.0)
PKG_CHECK_MODULES(METACITY_MESSAGE, gtk+-2.0 >= 2.2.0)
PKG_CHECK_MODULES(METACITY_WINDOW_DEMO, gtk+-2.0 >= 2.2.0)
if test x$enable_config_dialog = xyes; then
PKG_CHECK_MODULES(METACITY_PROPS, gtk+-2.0 >= 2.0.0 gconf-2.0 >= 1.1.9 libglade-2.0)
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
@@ -155,13 +162,6 @@ fi
PKG_CHECK_MODULES(METACITY, $METACITY_PC_MODULES)
if $PKG_CONFIG --atleast-version 2.2.0 gtk+-2.0; then
AC_DEFINE(HAVE_GTK_MULTIHEAD,,[gtk+ with multihead support found])
with_multihead=yes
else
with_multihead=no
fi
AC_PATH_XTRA
ALL_X_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
@@ -235,6 +235,17 @@ 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,
@@ -341,7 +352,6 @@ src/libmetacity-private.pc
src/tools/Makefile
src/themes/Makefile
po/Makefile.in
metacity.spec
])
if test x$enable_gconf = xno; then
@@ -373,7 +383,6 @@ metacity-$VERSION:
GConf: ${enable_gconf}
XFree86 Xinerama: ${use_xfree_xinerama}
Solaris Xinerama: ${use_solaris_xinerama}
Multihead: ${with_multihead}
Startup notification: ${have_startup_notification}
Session management: ${found_sm}
Shape extension: ${found_shape}
@@ -381,3 +390,4 @@ metacity-$VERSION:
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)"

View File

@@ -1,2 +1,2 @@
EXTRA_DIST=theme-format.txt metacity-theme.dtd
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.

View File

@@ -1,87 +0,0 @@
%define ver @VERSION@
%define RELEASE 1
%define rel %{?CUSTOM_RELEASE} %{!?CUSTOM_RELEASE:%RELEASE}
Summary: Metacity window manager
Name: metacity
Version: %ver
Release: %rel
URL: http://people.redhat.com/~hp/metacity/
Source0: %{name}-%{version}.tar.gz
License: GPL
Group: User Interface/Desktops
BuildRoot: %{_tmppath}/%{name}-root
BuildRequires: gtk2-devel >= 2.0.0
BuildRequires: GConf2-devel >= 1.1.9
%description
Metacity is a simple window manager that integrates nicely with
GNOME 2.
%prep
%setup -q
%build
%configure
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1
%makeinstall
unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL
%clean
rm -rf $RPM_BUILD_ROOT
%post
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
SCHEMAS="metacity.schemas"
for S in $SCHEMAS; do
gconftool-2 --makefile-install-rule %{_sysconfdir}/gconf/schemas/$S > /dev/null
done
%files
%defattr(-,root,root)
%doc README AUTHORS COPYING NEWS HACKING theme-format.txt
%{_bindir}/*
%{_libexecdir}/*
%{_datadir}/gnome/wm-properties/*
%{_sysconfdir}/gconf/schemas/*.schemas
%{_datadir}/control-center-2.0/capplets/*
%{_datadir}/metacity
%{_datadir}/pixmaps/*
%{_datadir}/themes/*
%changelog
* Tue Aug 20 2002 Steve Fox <drfickle@k-lug.org>
- Autoconf-ize the spec file to magic updates
- Include missing dirs
* Thu May 2 2002 Havoc Pennington <hp@redhat.com>
- 2.3.233
* Thu Apr 25 2002 Havoc Pennington <hp@redhat.com>
- rebuild in different environment
- add gconf schemas boilerplate
* Mon Apr 15 2002 Havoc Pennington <hp@pobox.com>
- 2.3.89
* Tue Oct 30 2001 Havoc Pennington <hp@redhat.com>
- 2.3.34
* Fri Oct 13 2001 Havoc Pennington <hp@redhat.com>
- 2.3.21
* Mon Sep 17 2001 Havoc Pennington <hp@redhat.com>
- 2.3.8
- 2.3.13
* Wed Sep 5 2001 Havoc Pennington <hp@redhat.com>
- Initial build.

View File

@@ -1,3 +1,474 @@
2003-09-08 Pablo Saratxaga <pablo@mandrakesoft.com>
* vi.po: Updated Vietnamese file
* az.po,sq.po: Fixed syntax errors
2003-09-07 Nikos Charonitakis <frolix68@yahoo.gr>
* el.po: Review of Greek translation.
2003-09-06 Takeshi AIHANA <aihana@gnome.gr.jp>
* ja.po: Fixed mistranslations for Japanese.
2003-09-05 Kjartan Maraas <kmaraas@gnome.org>
* no.po: Updated Norwegian translation.
2003-09-04 Laurent Dhima <laurenti@alblinux.net>
* sq.po: Updated Albanian translation.
2003-09-03 Guntupalli Karunakar <karunakar@freedomink.org>
* hi.po: Updated Hindi translations.
2003-09-03 Mugurel Tudor <mugurelu@go.ro>
* ro.po: Updated Romanian translation
2003-09-01 Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>
* sk.po: Updated Slovak translation.
2003-08-29 Dafydd Harries <daf@parnassus.ath.cx>
* cy.po: Updated Welsh translation.
2003-08-27 Pablo Gonzalo del Campo <pablodc@bigfoot.com>
* es.po: Revision of Spanish translation by
Francisco Javier F. Serrador <serrador@arrakis.es>.
2003-08-26 Guntupalli Karunakar <karunakar@freedomink.org>
* hi.po: Added Hindi translation.
2003-08-25 Duarte Loreto <happyguy_pt@hotmail.com>
* pt.po: Fixed missing accel in Portuguese translation.
2003-08-26 Changwoo Ryu <cwryu@debian.org>
* ko.po: Updated Korean translation by
Young-Ho Cha <ganadist at mizi.com>.
2003-08-24 Changwoo Ryu <cwryu@debian.org>
* ko.po: Updated Korean translation.
2003-08-22 Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>
* sk.po: Update Slovak translation.
2003-08-20 Kjartan Maraas <kmaraas@gnome.org>
* no.po: Update Norwegian translation.
2003-08-19 Dafydd Harries <daf@parnassus.ath.cx>
* cy.po: Updated Welsh translation.
2003-08-18 Danilo Šegan <dsegan@gmx.net>
* be.po: Updated Belarusian translation by Ales Nyakhaychyk
<nab@mail.by>.
2003-08-18 Metin Amiroff <metin@karegen.com>
* az.po: Updated Azerbaijani translation.
2003-08-16 Pauli Virtanen <pauli.virtanen@hut.fi>
* fi.po: Updated Finnish translation.
2003-08-13 Laurent Dhima <laurenti@alblinux.net>
* sq.po: Added Albanian file.
2003-08-12 Dafydd Harries <daf@parnassus.ath.cx>
* cy.po: Updated Welsh translation.
2003-08-09 Wang Jian <lark@linux.net.cn>
* zh_CN.po: Updated Simplified Chinese translation by
Funda Wang <fundawang@linux.net.cn>.
2003-08-09 Christophe Merlet <redfox@redfoxcenter.org>
* fr.po: Updated French translation.
2003-08-08 Danilo Šegan <dsegan@gmx.net>
* sr.po, sr@Latn.po: Updated Serbian translation.
2003-08-07 Hasbullah Bin Pit <sebol@ikhlas.com>
* ms.po: Updated Malay translation.
2003-08-06 Metin Amiroff <metin@karegen.com>
* az.po: Updated Azerbaijani translation.
2003-08-05 Ole Laursen <olau@hardworking.dk>
* da.po: Updated Danish translation.
2003-08-05 Pablo Gonzalo del Campo <pablodc@bigfoot.com>
* es.po: Updated Spanish translation.
2003-07-29 Andras Timar <timar@gnome.hu>
* hu.po: Updated Hungarian translation.
2003-07-25 Dafydd Harries <daf@parnassus.ath.cx>
* cy.po: Updated Welsh translation.
2003-07-24 Pablo Saratxaga <pablo@mandrakesoft.com>
* vi.po: Updated Vietnamese file
* is.po: fixed syntax error
2003-07-20 Evandro Fernandes Giovanini <evandrofg@ig.com.br>
* pt_BR.po: Updated Brazilian Portuguese translation.
2003-07-20 Takeshi AIHANA <aihana@gnome.gr.jp>
* ja.po: Updated Japanese translation.
2003-07-18 Duarte Loreto <happyguy_pt@hotmail.com>
* pt.po: Updated Portuguese translation.
2002-07-17 Kostas Papadimas <pkst@gmx.net>
* el.po: Updated Greek translation.
2003-07-17 Vincent van Adrighem <V.vanAdrighem@dirck.mine.nu>
* nl.po: Dutch translation updated by Tino Meinen.
2003-07-12 Christian Neumair <chris@gnome-de.org>
* de.po: Updated German translation.
2003-07-12 Pablo Saratxaga <pablo@mandrakesoft.com>
* wa.po: Added Walloon file
2003-07-12 Alessio Frusciante <algol@firenze.linux.it>
* it.po: Updated Italian translation.
2003-07-07 Vincent van Adrighem <V.vanAdrighem@dirck.mine.nu>
* nl.po: Dutch translation updated by Kees van den Broek.
2003-07-07 Abel Cheung <maddog@linux.org.hk>
* zh_TW.po: Updated traditional Chinese translation.
2003-07-06 Evandro Fernandes Giovanini <evandrofg@ig.com.br>
* pt_BR.po: Updated Brazilian Portuguese translation.
2003-07-02 Artur Flinta <aflinta@cvs.gnome.org>
* pl.po: Updated Polish translation.
2003-06-28 Jordi Mallach <jordi@sindominio.net>
* ca.po: Updated Catalan translation.
2003-06-28 Miloslav Trmac <mitr@volny.cz>
* cs.po: Updated Czech translation.
2003-06-28 Christian Rose <menthos@menthos.com>
* sv.po: Updated Swedish translation.
2003-06-27 Mohammad DAMT <mdamt@bisnisweb.com>
* id.po: Updated Indonesian translation
2003-06-26 Ole Laursen <olau@hardworking.dk>
* da.po: Updated Danish translation.
2003-06-26 Mohammad DAMT <mdamt@bisnisweb.com>
* id.po: Added Indonesian translation
2003-06-23 Vincent van Adrighem <V.vanAdrighem@dirck.mine.nu>
* nl.po: Dutch translation updated by Kees van den Broek.
2003-06-22 Samúel Jón Gunnarsson <sammi@techattack.nu>
* is.po: Added Icelandic translation
2003-06-21 Christophe Merlet <redfox@redfoxcenter.org>
* fr.po: Updated French translation.
2003-06-17 Pauli Virtanen <pauli.virtanen@hut.fi>
* fi.po: Updated Finnish translation.
2003-06-12 Pablo Gonzalo del Campo <pablodc@bigfoot.com>
* es.po: Updated Spanish translation.
2003-06-08 Christophe Merlet <redfox@redfoxcenter.org>
* fr.po: Updated French translation.
2003-06-07 Christian Neumair <chris@gnome-de.org>
* de.po: Updated German translation.
2003-06-06 Jordi Mallach <jordi@sindominio.net>
* ca.po: Updated Catalan translation.
2003-06-04 Dmitry G. Mastrukov <dmitry@taurussoft.org>
* be.po: Updated Belarusian translation
from Belarusian team <i18n@mova.org>.
2003-06-04 Dmitry G. Mastrukov <dmitry@taurussoft.org>
* ru.po: Updated Russian translation
from Russian team <gnome-cyr@gnome.org>.
2003-05-31 Dafydd Harries <daf@parnassus.ath.cx>
* cy.po: Updated Welsh translation.
2003-05-30 Paul Duffy <dubhthach@frink.nuigalway.ie>
* ga.po: Updated Irish Translation.
2003-05-30 Abel Cheung <maddog@linux.org.hk>
* zh_TW.po: Updated traditional Chinese translation.
2003-05-26 Duarte Loreto <happyguy_pt@hotmail.com>
* pt.po: Updated Portuguese translation.
2003-05-21 Miloslav Trmac <mitr@volny.cz>
* cs.po: Updated Czech translation.
2003-05-20 Christian Rose <menthos@menthos.com>
* sv.po: Updated Swedish translation.
2003-05-19 Telsa Gwymme <hobbit@aloss.ukuu.org.uk>
* cy.po: Updated Welsh translation from
Dafydd Harries <daf@parnassus.ath.cx>
2003-05-19 Christophe Merlet <redfox@redfoxcenter.org>
* fr.po: Updated French translation.
2003-05-16 Telsa Gwynne <hobbit@aloss.ukuu.org.uk>
* cy.po: Added Welsh translation from
Dafydd Harries <daf@parnassus.ath.cx>
2003-05-16 Pablo Gonzalo del Campo <pablodc@bigfoot.com>
* es.po: Updated Spanish translation.
2003-05-12 Duarte Loreto <happyguy_pt@hotmail.com>
* pt.po: Updated Portuguese translation.
2003-05-10 KAMAGASAKO Masatoshi <emerald@gnome.gr.jp>
* ja.po: Updated Japanese translation.
2003-05-10 Jordi Mallach <jordi@sindominio.net>
* ca.po: Updated Catalan translation.
2003-05-09 Evandro Fernandes Giovanini <evandrofg@ig.com.br>
* pt_BR.po: Updated Brazilian Portuguese translation.
2003-05-08 Christian Rose <menthos@menthos.com>
* sv.po: Updated Swedish translation.
2003-05-08 Changwoo Ryu <cwryu@debian.org>
* ko.po: Updated Korean translation.
2003-05-06 Danilo Šegan <dsegan@gmx.net>
* sr.po, sr@Latn.po: Added Serbian translation by
http://Prevod.org/.
2003-04-29 Miloslav Trmac <mitr@volny.cz>
* cs.po: Updated Czech translation.
2003-04-15 Dmitry G. Mastrukov <dmitry@taurussoft.org>
* ru.po: updated Russian translation
from Russian team <gnome-cyr@gnome.org>.
2003-04-03 Christophe Merlet <redfox@redfoxcenter.org>
* fr.po: Updated French translation.
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

515
po/am.po

File diff suppressed because it is too large Load Diff

1086
po/az.po

File diff suppressed because it is too large Load Diff

3035
po/be.po Normal file

File diff suppressed because it is too large Load Diff

573
po/bg.po

File diff suppressed because it is too large Load Diff

1473
po/ca.po

File diff suppressed because it is too large Load Diff

634
po/cs.po

File diff suppressed because it is too large Load Diff

3010
po/cy.po Normal file

File diff suppressed because it is too large Load Diff

588
po/da.po

File diff suppressed because it is too large Load Diff

661
po/de.po

File diff suppressed because it is too large Load Diff

1039
po/el.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1336
po/es.po

File diff suppressed because it is too large Load Diff

2438
po/fa.po Normal file

File diff suppressed because it is too large Load Diff

576
po/fi.po

File diff suppressed because it is too large Load Diff

1666
po/fr.po

File diff suppressed because it is too large Load Diff

2435
po/ga.po Normal file

File diff suppressed because it is too large Load Diff

539
po/gl.po

File diff suppressed because it is too large Load Diff

580
po/he.po

File diff suppressed because it is too large Load Diff

2763
po/hi.po Normal file

File diff suppressed because it is too large Load Diff

545
po/hu.po

File diff suppressed because it is too large Load Diff

3079
po/id.po Normal file

File diff suppressed because it is too large Load Diff

2457
po/is.po Normal file

File diff suppressed because it is too large Load Diff

1542
po/it.po

File diff suppressed because it is too large Load Diff

1732
po/ja.po

File diff suppressed because it is too large Load Diff

1085
po/ko.po

File diff suppressed because it is too large Load Diff

2349
po/lv.po

File diff suppressed because it is too large Load Diff

1652
po/mk.po

File diff suppressed because it is too large Load Diff

2435
po/ml.po Normal file

File diff suppressed because it is too large Load Diff

2984
po/mn.po Normal file

File diff suppressed because it is too large Load Diff

505
po/ms.po

File diff suppressed because it is too large Load Diff

801
po/nl.po

File diff suppressed because it is too large Load Diff

955
po/no.po

File diff suppressed because it is too large Load Diff

1989
po/pl.po

File diff suppressed because it is too large Load Diff

1459
po/pt.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

926
po/ro.po

File diff suppressed because it is too large Load Diff

1443
po/ru.po

File diff suppressed because it is too large Load Diff

759
po/sk.po

File diff suppressed because it is too large Load Diff

2976
po/sl.po Normal file

File diff suppressed because it is too large Load Diff

2974
po/sq.po Normal file

File diff suppressed because it is too large Load Diff

2995
po/sr.po Normal file

File diff suppressed because it is too large Load Diff

2995
po/sr@Latn.po Normal file

File diff suppressed because it is too large Load Diff

496
po/sv.po

File diff suppressed because it is too large Load Diff

1642
po/tr.po

File diff suppressed because it is too large Load Diff

2175
po/uk.po

File diff suppressed because it is too large Load Diff

758
po/vi.po

File diff suppressed because it is too large Load Diff

2453
po/wa.po Normal file

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

@@ -6,3 +6,13 @@ 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

@@ -11,7 +11,11 @@ EGGFILES= \
metacity_SOURCES= \
async-getprop.c \
async-getprop.h \
bell.h \
bell.c \
common.h \
constraints.c \
constraints.h \
core.c \
core.h \
delete.c \
@@ -97,6 +101,9 @@ libmetacity_private_la_SOURCES= \
util.h \
common.h
libmetacity_private_la_LDFLAGS = -no-undefined
libmetacity_private_la_LIBADD = @METACITY_LIBS@
libmetacityincludedir = $(includedir)/metacity-1/metacity-private
libmetacityinclude_HEADERS = \
@@ -141,8 +148,12 @@ schema_DATA = $(schema_in_files:.schemas.in=.schemas)
@INTLTOOL_SCHEMAS_RULE@
if GCONF_SCHEMAS_INSTALL
install-data-local:
GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(srcdir)/$(schema_DATA)
else
install-data-local:
endif
IMAGES=default_icon.png stock_maximize.png stock_minimize.png stock_delete.png
VARIABLES=default_icon_data $(srcdir)/default_icon.png \

View File

@@ -347,7 +347,7 @@ async_get_property_handler (Display *dpy,
break;
case 32:
nbytes = reply->nItems * sizeof (long);
nbytes = reply->nItems * sizeof (CARD32);
netbytes = reply->nItems << 2;
if (nbytes + 1 > 0 &&
(task->data = (unsigned char *) Xmalloc ((unsigned)nbytes + 1)))

View File

@@ -136,7 +136,7 @@ meta_bell_flash_frame (MetaDisplay *display,
g_assert (xkb_ev->xkb_type == XkbBellNotify);
window = meta_display_lookup_x_window (display, xkb_bell_event->window);
if (!window && (display->focus_window->frame))
if (!window && (display->focus_window) && (display->focus_window->frame))
{
window = display->focus_window;
}

View File

@@ -19,6 +19,7 @@
* 02111-1307, USA.
*/
#include <X11/Xlib.h>
#ifdef HAVE_XKB
#include <X11/XKBlib.h>
#endif

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

File diff suppressed because it is too large Load Diff

View File

@@ -23,6 +23,7 @@
#include "util.h"
#include "window.h"
#include "errors.h"
#include "workspace.h"
#include <sys/types.h>
#include <signal.h>
@@ -385,9 +386,10 @@ meta_window_delete (MetaWindow *window,
* I don't know how to avoid that though.
*/
meta_topic (META_DEBUG_FOCUS,
"Focusing top window because focus window %s was deleted/killed\n",
"Focusing MRU window because focus window %s was deleted/killed\n",
window->desc);
meta_screen_focus_top_window (window->screen, window);
meta_workspace_focus_mru_window (window->screen->active_workspace,
window);
}
else
{

View File

@@ -34,6 +34,7 @@
#include "prefs.h"
#include "resizepopup.h"
#include "workspace.h"
#include "bell.h"
#include <X11/Xatom.h>
#include <X11/cursorfont.h>
#ifdef HAVE_SOLARIS_XINERAMA
@@ -48,6 +49,9 @@
#ifdef HAVE_SHAPE
#include <X11/extensions/shape.h>
#endif
#ifdef HAVE_XKB
#include <X11/XKBlib.h>
#endif
#include <string.h>
#define USE_GDK_DISPLAY
@@ -73,8 +77,11 @@ static GSList *all_displays = NULL;
static void meta_spew_event (MetaDisplay *display,
XEvent *event);
#ifndef USE_GDK_DISPLAY
static void event_queue_callback (XEvent *event,
gpointer data);
#endif
static gboolean event_callback (XEvent *event,
gpointer data);
static Window event_get_modified_window (MetaDisplay *display,
@@ -214,10 +221,6 @@ meta_display_open (const char *name)
"_NET_CLIENT_LIST_STACKING",
"_NET_WM_STATE_SKIP_TASKBAR",
"_NET_WM_STATE_SKIP_PAGER",
"_WIN_WORKSPACE",
"_WIN_LAYER",
"_WIN_PROTOCOLS",
"_WIN_SUPPORTING_WM_CHECK",
"_NET_WM_ICON_NAME",
"_NET_WM_ICON",
"_NET_WM_ICON_GEOMETRY",
@@ -228,7 +231,6 @@ meta_display_open (const char *name)
"_NET_ACTIVE_WINDOW",
"_METACITY_RESTART_MESSAGE",
"_NET_WM_STRUT",
"_WIN_HINTS",
"_METACITY_RELOAD_THEME_MESSAGE",
"_METACITY_SET_KEYBINDINGS_MESSAGE",
"_NET_WM_STATE_HIDDEN",
@@ -262,7 +264,12 @@ meta_display_open (const char *name)
"_NET_STARTUP_ID",
"_METACITY_TOGGLE_VERBOSE",
"_METACITY_UPDATE_COUNTER",
"SYNC_COUNTER"
"SYNC_COUNTER",
"_GNOME_PANEL_ACTION",
"_GNOME_PANEL_ACTION_MAIN_MENU",
"_GNOME_PANEL_ACTION_RUN_DIALOG",
"_METACITY_SENTINEL",
"_NET_WM_STRUT_PARTIAL"
};
Atom atoms[G_N_ELEMENTS(atom_names)];
@@ -303,14 +310,19 @@ meta_display_open (const char *name)
display->autoraise_timeout_id = 0;
display->focus_window = NULL;
display->expected_focus_window = NULL;
display->mru_list = NULL;
#ifdef HAVE_XSYNC
display->grab_update_alarm = None;
#endif
/* FIXME copy the checks from GDK probably */
display->static_gravity_works = g_getenv ("METACITY_USE_STATIC_GRAVITY") != NULL;
/* we have to go ahead and do this so error handlers work */
all_displays = g_slist_prepend (all_displays, display);
meta_bell_init (display);
meta_display_init_keys (display);
update_window_grab_modifiers (display);
@@ -351,55 +363,55 @@ meta_display_open (const char *name)
display->atom_net_client_list_stacking = atoms[29];
display->atom_net_wm_state_skip_taskbar = atoms[30];
display->atom_net_wm_state_skip_pager = atoms[31];
display->atom_win_workspace = atoms[32];
display->atom_win_layer = atoms[33];
display->atom_win_protocols = atoms[34];
display->atom_win_supporting_wm_check = atoms[35];
display->atom_net_wm_icon_name = atoms[36];
display->atom_net_wm_icon = atoms[37];
display->atom_net_wm_icon_geometry = atoms[38];
display->atom_utf8_string = atoms[39];
display->atom_wm_icon_size = atoms[40];
display->atom_kwm_win_icon = atoms[41];
display->atom_net_wm_moveresize = atoms[42];
display->atom_net_active_window = atoms[43];
display->atom_metacity_restart_message = atoms[44];
display->atom_net_wm_strut = atoms[45];
display->atom_win_hints = atoms[46];
display->atom_metacity_reload_theme_message = atoms[47];
display->atom_metacity_set_keybindings_message = atoms[48];
display->atom_net_wm_state_hidden = atoms[49];
display->atom_net_wm_window_type_utility = atoms[50];
display->atom_net_wm_window_type_splash = atoms[51];
display->atom_net_wm_state_fullscreen = atoms[52];
display->atom_net_wm_ping = atoms[53];
display->atom_net_wm_pid = atoms[54];
display->atom_wm_client_machine = atoms[55];
display->atom_net_workarea = atoms[56];
display->atom_net_showing_desktop = atoms[57];
display->atom_net_desktop_layout = atoms[58];
display->atom_manager = atoms[59];
display->atom_targets = atoms[60];
display->atom_multiple = atoms[61];
display->atom_timestamp = atoms[62];
display->atom_version = atoms[63];
display->atom_atom_pair = atoms[64];
display->atom_net_desktop_names = atoms[65];
display->atom_net_wm_allowed_actions = atoms[66];
display->atom_net_wm_action_move = atoms[67];
display->atom_net_wm_action_resize = atoms[68];
display->atom_net_wm_action_shade = atoms[69];
display->atom_net_wm_action_stick = atoms[70];
display->atom_net_wm_action_maximize_horz = atoms[71];
display->atom_net_wm_action_maximize_vert = atoms[72];
display->atom_net_wm_action_change_desktop = atoms[73];
display->atom_net_wm_action_close = atoms[74];
display->atom_net_wm_state_above = atoms[75];
display->atom_net_wm_state_below = atoms[76];
display->atom_net_startup_id = atoms[77];
display->atom_metacity_toggle_verbose = atoms[78];
display->atom_metacity_update_counter = atoms[79];
display->atom_sync_counter = atoms[80];
display->atom_net_wm_icon_name = atoms[32];
display->atom_net_wm_icon = atoms[33];
display->atom_net_wm_icon_geometry = atoms[34];
display->atom_utf8_string = atoms[35];
display->atom_wm_icon_size = atoms[36];
display->atom_kwm_win_icon = atoms[37];
display->atom_net_wm_moveresize = atoms[38];
display->atom_net_active_window = atoms[39];
display->atom_metacity_restart_message = atoms[40];
display->atom_net_wm_strut = atoms[41];
display->atom_metacity_reload_theme_message = atoms[42];
display->atom_metacity_set_keybindings_message = atoms[43];
display->atom_net_wm_state_hidden = atoms[44];
display->atom_net_wm_window_type_utility = atoms[45];
display->atom_net_wm_window_type_splash = atoms[46];
display->atom_net_wm_state_fullscreen = atoms[47];
display->atom_net_wm_ping = atoms[48];
display->atom_net_wm_pid = atoms[49];
display->atom_wm_client_machine = atoms[50];
display->atom_net_workarea = atoms[51];
display->atom_net_showing_desktop = atoms[52];
display->atom_net_desktop_layout = atoms[53];
display->atom_manager = atoms[54];
display->atom_targets = atoms[55];
display->atom_multiple = atoms[56];
display->atom_timestamp = atoms[57];
display->atom_version = atoms[58];
display->atom_atom_pair = atoms[59];
display->atom_net_desktop_names = atoms[60];
display->atom_net_wm_allowed_actions = atoms[61];
display->atom_net_wm_action_move = atoms[62];
display->atom_net_wm_action_resize = atoms[63];
display->atom_net_wm_action_shade = atoms[64];
display->atom_net_wm_action_stick = atoms[65];
display->atom_net_wm_action_maximize_horz = atoms[66];
display->atom_net_wm_action_maximize_vert = atoms[67];
display->atom_net_wm_action_change_desktop = atoms[68];
display->atom_net_wm_action_close = atoms[69];
display->atom_net_wm_state_above = atoms[70];
display->atom_net_wm_state_below = atoms[71];
display->atom_net_startup_id = atoms[72];
display->atom_metacity_toggle_verbose = atoms[73];
display->atom_metacity_update_counter = atoms[74];
display->atom_sync_counter = atoms[75];
display->atom_gnome_panel_action = atoms[76];
display->atom_gnome_panel_action_main_menu = atoms[77];
display->atom_gnome_panel_action_run_dialog = atoms[78];
display->atom_metacity_sentinel = atoms[79];
display->atom_net_wm_strut_partial = atoms[80];
display->prop_hooks = NULL;
meta_display_init_window_prop_hooks (display);
@@ -443,7 +455,6 @@ meta_display_open (const char *name)
display->window_ids = g_hash_table_new (meta_unsigned_long_hash,
meta_unsigned_long_equal);
display->double_click_time = 250;
display->last_button_time = 0;
display->last_button_xwindow = None;
display->last_button_num = 0;
@@ -458,6 +469,7 @@ meta_display_open (const char *name)
display->ungrab_should_not_cause_focus_window = None;
display->current_time = CurrentTime;
display->sentinel_counter = 0;
display->grab_op = META_GRAB_OP_NONE;
display->grab_window = NULL;
@@ -516,7 +528,6 @@ meta_display_open (const char *name)
screens = NULL;
#ifdef HAVE_GTK_MULTIHEAD
i = 0;
while (i < ScreenCount (xdisplay))
{
@@ -528,14 +539,6 @@ meta_display_open (const char *name)
screens = g_slist_prepend (screens, screen);
++i;
}
#else
{
MetaScreen *screen;
screen = meta_screen_new (display, DefaultScreen (xdisplay));
if (screen)
screens = g_slist_prepend (screens, screen);
}
#endif
display->screens = screens;
@@ -556,20 +559,9 @@ meta_display_open (const char *name)
display->leader_window,
display->atom_net_wm_name,
"Metacity");
{
/* The legacy GNOME hint is to set a cardinal which is the window
* id of the supporting_wm_check window on the supporting_wm_check
* window itself
*/
gulong data[1];
data[0] = display->leader_window;
XChangeProperty (display->xdisplay,
display->leader_window,
display->atom_win_supporting_wm_check,
XA_CARDINAL,
32, PropModeReplace, (guchar*) data, 1);
XChangeProperty (display->xdisplay,
display->leader_window,
@@ -577,7 +569,7 @@ meta_display_open (const char *name)
XA_WINDOW,
32, PropModeReplace, (guchar*) data, 1);
}
meta_display_grab (display);
/* Now manage all existing windows */
@@ -889,13 +881,14 @@ meta_display_is_double_click (MetaDisplay *display)
static gboolean dump_events = TRUE;
#ifndef USE_GDK_DISPLAY
static void
event_queue_callback (XEvent *event,
gpointer data)
{
event_callback (event, data);
}
#endif
static gboolean
grab_op_is_mouse (MetaGrabOp op)
@@ -1110,6 +1103,28 @@ window_raise_with_delay_callback (void *data)
return FALSE;
}
static int
double_click_timeout_for_event (MetaDisplay *display,
XEvent *event)
{
MetaScreen *screen;
g_assert (event->type == ButtonPress ||
event->type == ButtonRelease);
screen = meta_display_screen_for_root (display,
event->xbutton.root);
if (screen == NULL)
{
/* Odd, we aren't managing this screen */
meta_warning ("Received button event on root 0x%lx we aren't managing\n",
event->xbutton.root);
return 250; /* make up number */
}
return meta_ui_get_double_click_timeout (screen->ui);
}
static gboolean
event_callback (XEvent *event,
gpointer data)
@@ -1145,7 +1160,9 @@ event_callback (XEvent *event,
/* mark double click events, kind of a hack, oh well. */
if (((int)event->xbutton.button) == display->last_button_num &&
event->xbutton.window == display->last_button_xwindow &&
event->xbutton.time < (display->last_button_time + display->double_click_time))
event->xbutton.time < (display->last_button_time +
double_click_timeout_for_event (display,
event)))
{
display->is_double_click = TRUE;
meta_topic (META_DEBUG_EVENTS,
@@ -1250,6 +1267,7 @@ event_callback (XEvent *event,
if (window->frame)
{
window->frame->need_reapply_frame_shape = TRUE;
meta_warning("from event callback\n");
meta_window_queue_move_resize (window);
}
}
@@ -1277,11 +1295,12 @@ event_callback (XEvent *event,
display->grab_window == window) ||
grab_op_is_keyboard (display->grab_op))
{
meta_verbose ("Ending grab op %d on window %s due to button press\n",
display->grab_op,
(display->grab_window ?
display->grab_window->desc :
"none"));
meta_topic (META_DEBUG_WINDOW_OPS,
"Ending grab op %d on window %s due to button press\n",
display->grab_op,
(display->grab_window ?
display->grab_window->desc :
"none"));
meta_display_end_grab_op (display,
event->xbutton.time);
}
@@ -1311,12 +1330,21 @@ event_callback (XEvent *event,
* frames.c or special-cased if the click was on a
* minimize/close button.
*/
meta_window_raise (window);
meta_topic (META_DEBUG_FOCUS,
"Focusing %s due to unmodified button %d press (display.c)\n",
window->desc, event->xbutton.button);
meta_window_focus (window, event->xbutton.time);
if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_CLICK)
{
meta_window_raise (window);
meta_topic (META_DEBUG_FOCUS,
"Focusing %s due to unmodified button %d press (display.c)\n",
window->desc, event->xbutton.button);
meta_window_focus (window, event->xbutton.time);
}
else
{
meta_topic (META_DEBUG_FOCUS,
"Not raising window on click due to mouse/sloppy focus mode\n");
meta_window_focus (window, event->xbutton.time);
}
}
/* you can move on alt-click but not on
@@ -1427,7 +1455,8 @@ event_callback (XEvent *event,
meta_window_handle_mouse_grab_op_event (window, event);
/* do this even if window->has_focus to avoid races */
else if (window && !serial_is_ignored (display, event->xany.serial) &&
event->xcrossing.detail != NotifyInferior)
event->xcrossing.detail != NotifyInferior &&
meta_display_focus_sentinel_clear (display))
{
switch (meta_prefs_get_focus_mode ())
{
@@ -1492,13 +1521,8 @@ event_callback (XEvent *event,
switch (meta_prefs_get_focus_mode ())
{
case META_FOCUS_MODE_MOUSE:
/* This is kind of questionable; but we normally
* set focus to RevertToPointerRoot, so I guess
* leaving it on PointerRoot when nothing is focused
* is probably right. Anyway, unfocus the
* focused window.
*/
if (window->has_focus &&
(window->frame == NULL || frame_was_receiver) &&
event->xcrossing.mode != NotifyGrab &&
event->xcrossing.mode != NotifyUngrab &&
event->xcrossing.detail != NotifyInferior)
@@ -1634,12 +1658,20 @@ event_callback (XEvent *event,
/* if frame was receiver it's some malicious send event or something */
else if (!frame_was_receiver && window)
{
meta_verbose ("MapRequest on %s mapped = %d minimized = %d\n",
window->desc, window->mapped, window->minimized);
if (window->minimized)
meta_window_unminimize (window);
if (!meta_workspace_contains_window (window->screen->active_workspace,
window))
meta_window_change_workspace (window,
window->screen->active_workspace);
{
meta_window_unminimize (window);
if (!meta_workspace_contains_window (window->screen->active_workspace,
window))
{
meta_verbose ("Changing workspace due to MapRequest mapped = %d minimized = %d\n",
window->mapped, window->minimized);
meta_window_change_workspace (window,
window->screen->active_workspace);
}
}
}
break;
case ReparentNotify:
@@ -1739,6 +1771,16 @@ event_callback (XEvent *event,
else if (event->xproperty.atom ==
display->atom_net_desktop_names)
meta_screen_update_workspace_names (screen);
/* we just use this property as a sentinel to avoid
* certain race conditions. See the comment for the
* sentinel_counter variable declaration in display.h
*/
if (event->xproperty.atom ==
display->atom_metacity_sentinel)
{
meta_display_decrement_focus_sentinel (display);
}
}
}
break;
@@ -1899,6 +1941,19 @@ event_callback (XEvent *event,
}
break;
default:
#ifdef HAVE_XKB
if (event->type == display->xkb_base_event_type)
{
XkbAnyEvent *xkb_ev = (XkbAnyEvent *) event;
switch (xkb_ev->xkb_type)
{
case XkbBellNotify:
meta_bell_notify (display, xkb_ev);
break;
}
}
#endif
break;
}
@@ -2197,6 +2252,9 @@ meta_spew_event (MetaDisplay *display,
char *winname;
MetaScreen *screen;
if (!meta_is_verbose())
return;
/* filter overnumerous events */
if (event->type == Expose || event->type == MotionNotify ||
event->type == NoExpose)
@@ -2312,6 +2370,9 @@ meta_spew_event (MetaDisplay *display,
break;
case MapRequest:
name = "MapRequest";
extra = g_strdup_printf ("window: 0x%lx parent: 0x%lx\n",
event->xmaprequest.window,
event->xmaprequest.parent);
break;
case ReparentNotify:
name = "ReparentNotify";
@@ -2617,6 +2678,7 @@ xcursor_for_op (MetaDisplay *display,
case META_GRAB_OP_KEYBOARD_RESIZING_E:
cursor = META_CURSOR_EAST_RESIZE;
break;
case META_GRAB_OP_MOVING:
case META_GRAB_OP_KEYBOARD_MOVING:
cursor = META_CURSOR_MOVE_WINDOW;
break;
@@ -2684,7 +2746,14 @@ meta_display_set_grab_op_cursor (MetaDisplay *display,
{
display->grab_have_pointer = TRUE;
meta_topic (META_DEBUG_WINDOW_OPS,
"XGrabPointer() returned GrabSuccess\n");
"XGrabPointer() returned GrabSuccess time 0x%lu\n",
timestamp);
}
else
{
meta_topic (META_DEBUG_WINDOW_OPS,
"XGrabPointer() failed time 0x%lu\n",
timestamp);
}
meta_error_trap_pop (display, TRUE);
}
@@ -2773,12 +2842,11 @@ meta_display_begin_grab_op (MetaDisplay *display,
display->grab_mask = modmask;
display->grab_initial_root_x = root_x;
display->grab_initial_root_y = root_y;
display->grab_current_root_x = root_x;
display->grab_current_root_y = root_y;
display->grab_latest_motion_x = root_x;
display->grab_latest_motion_y = root_y;
display->grab_last_moveresize_time.tv_sec = 0;
display->grab_last_moveresize_time.tv_usec = 0;
display->grab_motion_notify_time = 0;
#ifdef HAVE_XSYNC
display->grab_update_alarm = None;
#endif
@@ -2789,7 +2857,6 @@ meta_display_begin_grab_op (MetaDisplay *display,
meta_window_get_position (display->grab_window,
&display->grab_initial_window_pos.x,
&display->grab_initial_window_pos.y);
display->grab_current_window_pos = display->grab_initial_window_pos;
#ifdef HAVE_XSYNC
if (meta_grab_op_is_resizing (display->grab_op) &&
@@ -2872,11 +2939,16 @@ void
meta_display_end_grab_op (MetaDisplay *display,
Time timestamp)
{
meta_verbose ("Ending grab op %d at time %ld\n", display->grab_op, timestamp);
meta_topic (META_DEBUG_WINDOW_OPS,
"Ending grab op %d at time %lu\n", display->grab_op,
(unsigned long) timestamp);
if (display->grab_op == META_GRAB_OP_NONE)
return;
if (display->grab_window != NULL)
display->grab_window->shaken_loose = FALSE;
if (display->grab_op == META_GRAB_OP_KEYBOARD_TABBING_NORMAL ||
display->grab_op == META_GRAB_OP_KEYBOARD_TABBING_DOCK ||
display->grab_op == META_GRAB_OP_KEYBOARD_ESCAPING_NORMAL ||
@@ -2903,7 +2975,7 @@ meta_display_end_grab_op (MetaDisplay *display,
if (display->grab_have_keyboard)
{
meta_topic (META_DEBUG_WINDOW_OPS,
"Ungrabbing all keys\n");
"Ungrabbing all keys timestamp %lu\n", timestamp);
if (display->grab_window)
meta_window_ungrab_all_keys (display->grab_window);
else
@@ -2938,12 +3010,12 @@ meta_change_button_grab (MetaDisplay *display,
int button,
int modmask)
{
int ignored_mask;
unsigned int ignored_mask;
meta_error_trap_push (display);
ignored_mask = 0;
while (ignored_mask < (int) display->ignored_modifier_mask)
while (ignored_mask <= display->ignored_modifier_mask)
{
if (ignored_mask & ~(display->ignored_modifier_mask))
{
@@ -3147,6 +3219,7 @@ meta_display_queue_retheme_all_windows (MetaDisplay *display)
{
MetaWindow *window = tmp->data;
meta_warning("from retheme\n");
meta_window_queue_move_resize (window);
if (window->frame)
{
@@ -3269,8 +3342,8 @@ meta_display_ping_window (MetaDisplay *display,
"Sending ping with timestamp %lu to window %s\n",
timestamp, window->desc);
meta_window_send_icccm_message (window,
display->atom_net_wm_ping,
timestamp);
display->atom_net_wm_ping,
timestamp);
}
/* process the pong from our ping */
@@ -3339,11 +3412,12 @@ find_tab_forward (MetaDisplay *display,
MetaTabList type,
MetaScreen *screen,
MetaWorkspace *workspace,
GList *start)
GList *start)
{
GList *tmp;
g_return_val_if_fail (start != NULL, NULL);
g_return_val_if_fail (workspace != NULL, NULL);
tmp = start->next;
while (tmp != NULL)
@@ -3351,22 +3425,18 @@ find_tab_forward (MetaDisplay *display,
MetaWindow *window = tmp->data;
if (window->screen == screen &&
IN_TAB_CHAIN (window, type) &&
(workspace == NULL ||
meta_window_visible_on_workspace (window, workspace)))
IN_TAB_CHAIN (window, type))
return window;
tmp = tmp->next;
}
tmp = display->mru_list;
tmp = workspace->mru_list;
while (tmp != start)
{
MetaWindow *window = tmp->data;
if (IN_TAB_CHAIN (window, type) &&
(workspace == NULL ||
meta_window_visible_on_workspace (window, workspace)))
if (IN_TAB_CHAIN (window, type))
return window;
tmp = tmp->next;
@@ -3385,6 +3455,7 @@ find_tab_backward (MetaDisplay *display,
GList *tmp;
g_return_val_if_fail (start != NULL, NULL);
g_return_val_if_fail (workspace != NULL, NULL);
tmp = start->prev;
while (tmp != NULL)
@@ -3392,22 +3463,18 @@ find_tab_backward (MetaDisplay *display,
MetaWindow *window = tmp->data;
if (window->screen == screen &&
IN_TAB_CHAIN (window, type) &&
(workspace == NULL ||
meta_window_visible_on_workspace (window, workspace)))
IN_TAB_CHAIN (window, type))
return window;
tmp = tmp->prev;
}
tmp = g_list_last (display->mru_list);
tmp = g_list_last (workspace->mru_list);
while (tmp != start)
{
MetaWindow *window = tmp->data;
if (IN_TAB_CHAIN (window, type) &&
(workspace == NULL ||
meta_window_visible_on_workspace (window, workspace)))
if (IN_TAB_CHAIN (window, type))
return window;
tmp = tmp->prev;
@@ -3416,15 +3483,15 @@ find_tab_backward (MetaDisplay *display,
return NULL;
}
GSList*
GList*
meta_display_get_tab_list (MetaDisplay *display,
MetaTabList type,
MetaScreen *screen,
MetaWorkspace *workspace)
{
GSList *tab_list;
GList *tab_list;
/* workspace can be NULL for all workspaces */
g_return_val_if_fail (workspace != NULL, NULL);
/* Windows sellout mode - MRU order. Collect unminimized windows
* then minimized so minimized windows aren't in the way so much.
@@ -3433,17 +3500,15 @@ meta_display_get_tab_list (MetaDisplay *display,
GList *tmp;
tab_list = NULL;
tmp = screen->display->mru_list;
tmp = workspace->mru_list;
while (tmp != NULL)
{
MetaWindow *window = tmp->data;
if (!window->minimized &&
window->screen == screen &&
IN_TAB_CHAIN (window, type) &&
(workspace == NULL ||
meta_window_visible_on_workspace (window, workspace)))
tab_list = g_slist_prepend (tab_list, window);
IN_TAB_CHAIN (window, type))
tab_list = g_list_prepend (tab_list, window);
tmp = tmp->next;
}
@@ -3452,23 +3517,21 @@ meta_display_get_tab_list (MetaDisplay *display,
{
GList *tmp;
tmp = screen->display->mru_list;
tmp = workspace->mru_list;
while (tmp != NULL)
{
MetaWindow *window = tmp->data;
if (window->minimized &&
window->screen == screen &&
IN_TAB_CHAIN (window, type) &&
(workspace == NULL ||
meta_window_visible_on_workspace (window, workspace)))
tab_list = g_slist_prepend (tab_list, window);
IN_TAB_CHAIN (window, type))
tab_list = g_list_prepend (tab_list, window);
tmp = tmp->next;
}
}
tab_list = g_slist_reverse (tab_list);
tab_list = g_list_reverse (tab_list);
return tab_list;
}
@@ -3476,12 +3539,18 @@ meta_display_get_tab_list (MetaDisplay *display,
MetaWindow*
meta_display_get_tab_next (MetaDisplay *display,
MetaTabList type,
MetaScreen *screen,
MetaScreen *screen,
MetaWorkspace *workspace,
MetaWindow *window,
gboolean backward)
{
if (display->mru_list == NULL)
GList *tab_list;
tab_list = meta_display_get_tab_list(display,
type,
screen,
workspace);
if (tab_list == NULL)
return NULL;
if (window != NULL)
@@ -3490,20 +3559,22 @@ meta_display_get_tab_next (MetaDisplay *display,
if (backward)
return find_tab_backward (display, type, screen, workspace,
g_list_find (display->mru_list,
g_list_find (tab_list,
window));
else
return find_tab_forward (display, type, screen, workspace,
g_list_find (display->mru_list,
g_list_find (tab_list,
window));
}
if (backward)
return find_tab_backward (display, type, screen, workspace,
g_list_last (display->mru_list));
tab_list);
else
return find_tab_forward (display, type, screen, workspace,
display->mru_list);
tab_list);
g_list_free (tab_list);
}
MetaWindow*
@@ -3613,6 +3684,16 @@ meta_rectangle_intersect (MetaRectangle *src1,
return return_val;
}
gboolean
meta_rectangle_equal (const MetaRectangle *src1,
const MetaRectangle *src2)
{
return ((src1->x == src2->x) &&
(src1->y == src2->y) &&
(src1->width == src2->width) &&
(src1->height == src2->height));
}
static MetaScreen*
find_screen_for_selection (MetaDisplay *display,
Window owner,
@@ -3943,4 +4024,40 @@ prefs_changed_callback (MetaPreference pref,
g_slist_free (windows);
}
else if (pref == META_PREF_AUDIBLE_BELL)
{
MetaDisplay *display = data;
meta_bell_set_audible (display, meta_prefs_bell_is_audible ());
}
}
void
meta_display_increment_focus_sentinel (MetaDisplay *display)
{
unsigned long data[1];
data[0] = meta_display_get_current_time (display);
XChangeProperty (display->xdisplay,
((MetaScreen*) display->screens->data)->xroot,
display->atom_metacity_sentinel,
XA_CARDINAL,
32, PropModeReplace, (guchar*) data, 1);
display->sentinel_counter += 1;
}
void
meta_display_decrement_focus_sentinel (MetaDisplay *display)
{
display->sentinel_counter -= 1;
if (display->sentinel_counter < 0)
display->sentinel_counter = 0;
}
gboolean
meta_display_focus_sentinel_clear (MetaDisplay *display)
{
return (display->sentinel_counter == 0);
}

View File

@@ -120,10 +120,6 @@ struct _MetaDisplay
Atom atom_net_client_list_stacking;
Atom atom_net_wm_state_skip_taskbar;
Atom atom_net_wm_state_skip_pager;
Atom atom_win_workspace;
Atom atom_win_layer;
Atom atom_win_protocols;
Atom atom_win_supporting_wm_check;
Atom atom_net_wm_icon_name;
Atom atom_net_wm_icon;
Atom atom_net_wm_icon_geometry;
@@ -134,7 +130,6 @@ struct _MetaDisplay
Atom atom_net_active_window;
Atom atom_metacity_restart_message;
Atom atom_net_wm_strut;
Atom atom_win_hints;
Atom atom_metacity_reload_theme_message;
Atom atom_metacity_set_keybindings_message;
Atom atom_net_wm_state_hidden;
@@ -169,6 +164,11 @@ struct _MetaDisplay
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;
Atom atom_metacity_sentinel;
Atom atom_net_wm_strut_partial;
/* This is the actual window from focus events,
* not the one we last set
@@ -179,11 +179,6 @@ struct _MetaDisplay
*/
MetaWindow *expected_focus_window;
/* Most recently focused list. Always contains all
* live windows.
*/
GList *mru_list;
guint static_gravity_works : 1;
/*< private-ish >*/
@@ -202,7 +197,6 @@ struct _MetaDisplay
Window no_focus_window;
/* for double click */
int double_click_time;
Time last_button_time;
Window last_button_xwindow;
int last_button_num;
@@ -234,17 +228,24 @@ struct _MetaDisplay
int grab_button;
int grab_initial_root_x;
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;
MetaRectangle grab_initial_window_pos;
MetaRectangle grab_current_window_pos;
MetaResizePopup *grab_resize_popup;
GTimeVal grab_last_moveresize_time;
Time grab_motion_notify_time;
/* we use property updates as sentinels for certain window focus events
* to avoid some race conditions on EnterNotify events
*/
int sentinel_counter;
#ifdef HAVE_XKB
int xkb_base_event_type;
#endif
#ifdef HAVE_XSYNC
/* alarm monitoring client's _METACITY_UPDATE_COUNTER */
XSyncAlarm grab_update_alarm;
@@ -255,8 +256,8 @@ struct _MetaDisplay
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;
@@ -403,10 +404,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,
@@ -428,9 +429,15 @@ gboolean meta_grab_op_is_resizing (MetaGrabOp op);
gboolean meta_rectangle_intersect (MetaRectangle *src1,
MetaRectangle *src2,
MetaRectangle *dest);
gboolean meta_rectangle_equal (const MetaRectangle *src1,
const MetaRectangle *src2);
void meta_display_devirtualize_modifiers (MetaDisplay *display,
MetaVirtualModifier modifiers,
unsigned int *mask);
void meta_display_increment_focus_sentinel (MetaDisplay *display);
void meta_display_decrement_focus_sentinel (MetaDisplay *display);
gboolean meta_display_focus_sentinel_clear (MetaDisplay *display);
#endif

View File

@@ -48,7 +48,6 @@ meta_fixed_tip_show (Display *xdisplay, int screen_number,
if (tip == NULL)
{
tip = gtk_window_new (GTK_WINDOW_POPUP);
#ifdef HAVE_GTK_MULTIHEAD
{
GdkScreen *gdk_screen;
@@ -59,10 +58,6 @@ meta_fixed_tip_show (Display *xdisplay, int screen_number,
screen_width = gdk_screen_get_width (gdk_screen);
screen_height = gdk_screen_get_height (gdk_screen);
}
#else
screen_width = gdk_screen_width ();
screen_height = gdk_screen_height ();
#endif
gtk_widget_set_app_paintable (tip, TRUE);
gtk_window_set_policy (GTK_WINDOW (tip), FALSE, FALSE, TRUE);

View File

@@ -21,6 +21,7 @@
#include <config.h>
#include "frame.h"
#include "bell.h"
#include "errors.h"
#include "keybindings.h"
@@ -59,9 +60,8 @@ meta_window_ensure_frame (MetaWindow *window)
frame->mapped = FALSE;
frame->need_reapply_frame_shape = TRUE;
frame->is_flashing = FALSE;
attrs.event_mask = EVENT_MASK;
meta_verbose ("Framing window %s: visual %s default, depth %d default depth %d\n",
window->desc,
XVisualIDFromVisual (window->xvisual) ==
@@ -77,24 +77,19 @@ meta_window_ensure_frame (MetaWindow *window)
* e.g. DRI games can't be children of a parent that has the same
* visual as the client.
*/
frame->xwindow = XCreateWindow (window->display->xdisplay,
window->screen->xroot,
frame->rect.x,
frame->rect.y,
frame->rect.width,
frame->rect.height,
0,
window->screen->default_depth,
CopyFromParent,
window->screen->default_xvisual,
CWEventMask,
&attrs);
/* So our UI can find the window ID */
XFlush (window->display->xdisplay);
frame->xwindow = meta_ui_create_frame_window (window->screen->ui,
window->display->xdisplay,
frame->rect.x,
frame->rect.y,
frame->rect.width,
frame->rect.height,
frame->window->screen->number);
meta_verbose ("Frame for %s is 0x%lx\n", frame->window->desc, frame->xwindow);
attrs.event_mask = EVENT_MASK;
XChangeWindowAttributes (window->display->xdisplay,
frame->xwindow, CWEventMask, &attrs);
meta_display_register_x_window (window->display, &frame->xwindow, window);
@@ -131,8 +126,6 @@ meta_window_ensure_frame (MetaWindow *window)
/* stick frame to the window */
window->frame = frame;
meta_ui_add_frame (window->screen->ui, frame->xwindow);
if (window->title)
meta_ui_set_frame_title (window->screen->ui,
window->frame->xwindow,
@@ -162,7 +155,7 @@ meta_window_destroy_frame (MetaWindow *window)
frame = window->frame;
meta_ui_remove_frame (window->screen->ui, frame->xwindow);
meta_bell_notify_frame_destroy (frame);
/* Unparent the client window; it may be destroyed,
* thus the error trap.
@@ -186,6 +179,8 @@ meta_window_destroy_frame (MetaWindow *window)
window->frame->rect.y);
meta_error_trap_pop (window->display, FALSE);
meta_ui_destroy_frame_window (window->screen->ui, frame->xwindow);
meta_display_unregister_x_window (window->display,
frame->xwindow);
@@ -194,9 +189,6 @@ meta_window_destroy_frame (MetaWindow *window)
/* Move keybindings to window instead of frame */
meta_window_grab_keys (window);
/* should we push an error trap? */
XDestroyWindow (window->display->xdisplay, frame->xwindow);
g_free (frame);
/* Put our state back where it should be */
@@ -258,6 +250,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;
}
@@ -333,23 +328,12 @@ meta_frame_sync_to_window (MetaFrame *frame,
*/
update_shape (frame);
if (need_move && need_resize)
XMoveResizeWindow (frame->window->display->xdisplay,
frame->xwindow,
frame->rect.x,
frame->rect.y,
frame->rect.width,
frame->rect.height);
else if (need_move)
XMoveWindow (frame->window->display->xdisplay,
frame->xwindow,
frame->rect.x,
frame->rect.y);
else if (need_resize)
XResizeWindow (frame->window->display->xdisplay,
frame->xwindow,
frame->rect.width,
frame->rect.height);
meta_ui_move_resize_frame (frame->window->screen->ui,
frame->xwindow,
frame->rect.x,
frame->rect.y,
frame->rect.width,
frame->rect.height);
if (need_resize)
{
@@ -373,8 +357,9 @@ meta_frame_queue_draw (MetaFrame *frame)
frame->xwindow);
}
void meta_frame_set_screen_cursor (MetaFrame *frame,
MetaCursor cursor)
void
meta_frame_set_screen_cursor (MetaFrame *frame,
MetaCursor cursor)
{
Cursor xcursor;
if (cursor == frame->current_cursor)

View File

@@ -58,6 +58,7 @@ struct _MetaFrame
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

@@ -452,7 +452,6 @@ meta_frames_calc_geometry (MetaFrames *frames,
MetaFrames*
meta_frames_new (int screen_number)
{
#ifdef HAVE_GTK_MULTIHEAD
GdkScreen *screen;
screen = gdk_display_get_screen (gdk_display_get_default (),
@@ -460,32 +459,25 @@ meta_frames_new (int screen_number)
return g_object_new (META_TYPE_FRAMES,
"screen", screen,
NULL);
#else
return g_object_new (META_TYPE_FRAMES,
NULL);
#endif
NULL);
}
void
meta_frames_manage_window (MetaFrames *frames,
Window xwindow)
Window xwindow,
GdkWindow *window)
{
MetaUIFrame *frame;
g_assert (window);
frame = g_new (MetaUIFrame, 1);
frame->window = gdk_window_foreign_new (xwindow);
frame->window = window;
if (frame->window == NULL)
{
g_free (frame);
meta_bug ("Frame 0x%lx doesn't exist\n", xwindow);
return;
}
gdk_window_set_user_data (frame->window, frames);
gtk_style_set_background (GTK_WIDGET (frames)->style,
frame->window, GTK_STATE_NORMAL);
/* Don't set event mask here, it's in frame.c */
@@ -527,7 +519,7 @@ meta_frames_unmanage_window (MetaFrames *frames,
g_hash_table_remove (frames->frames, &frame->xwindow);
g_object_unref (G_OBJECT (frame->window));
gdk_window_destroy (frame->window);
if (frame->layout)
g_object_unref (G_OBJECT (frame->layout));
@@ -835,21 +827,15 @@ meta_frames_apply_shapes (MetaFrames *frames,
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;
@@ -922,6 +908,25 @@ meta_frames_apply_shapes (MetaFrames *frames,
#endif /* HAVE_SHAPE */
}
void
meta_frames_move_resize_frame (MetaFrames *frames,
Window xwindow,
int x,
int y,
int width,
int height)
{
MetaUIFrame *frame = meta_frames_lookup_window (frames, xwindow);
int old_width, old_height;
gdk_drawable_get_size (frame->window, &old_width, &old_height);
gdk_window_move_resize (frame->window, x, y, width, height);
if (old_width != width || old_height != height)
gdk_window_invalidate_rect (frame->window, NULL, FALSE);
}
void
meta_frames_queue_draw (MetaFrames *frames,
Window xwindow)
@@ -1057,11 +1062,8 @@ show_tip_now (MetaFrames *frames)
/* get conversion delta for root-to-frame coords */
dx = root_x - x;
dy = root_y - y;
#ifdef HAVE_GTK_MULTIHEAD
screen_number = gdk_screen_get_number (gtk_widget_get_screen (GTK_WIDGET (frames)));
#else
screen_number = DefaultScreen (gdk_display);
#endif
meta_fixed_tip_show (gdk_display,
screen_number,
rect->x + dx,
@@ -1592,6 +1594,7 @@ meta_frames_motion_notify_event (GtkWidget *widget,
{
MetaUIFrame *frame;
MetaFrames *frames;
MetaGrabOp grab_op;
frames = META_FRAMES (widget);
@@ -1602,16 +1605,43 @@ meta_frames_motion_notify_event (GtkWidget *widget,
clear_tip (frames);
frames->last_motion_frame = frame;
grab_op = meta_core_get_grab_op (gdk_display);
switch (meta_core_get_grab_op (gdk_display))
switch (grab_op)
{
case META_GRAB_OP_CLICKING_MENU:
case META_GRAB_OP_CLICKING_DELETE:
case META_GRAB_OP_CLICKING_MINIMIZE:
case META_GRAB_OP_CLICKING_MAXIMIZE:
case META_GRAB_OP_CLICKING_UNMAXIMIZE:
{
MetaFrameControl control;
int x, y;
gdk_window_get_pointer (frame->window, &x, &y, NULL);
/* Control is set to none unless it matches
* the current grab
*/
control = get_control (frames, frame, x, y);
if (! ((control == META_FRAME_CONTROL_MENU &&
grab_op == META_GRAB_OP_CLICKING_MENU) ||
(control == META_FRAME_CONTROL_DELETE &&
grab_op == META_GRAB_OP_CLICKING_DELETE) ||
(control == META_FRAME_CONTROL_MINIMIZE &&
grab_op == META_GRAB_OP_CLICKING_MINIMIZE) ||
(control == META_FRAME_CONTROL_MAXIMIZE &&
(grab_op == META_GRAB_OP_CLICKING_MAXIMIZE ||
grab_op == META_GRAB_OP_CLICKING_UNMAXIMIZE))))
control = META_FRAME_CONTROL_NONE;
/* Update prelit control and cursor */
meta_frames_update_prelit_control (frames, frame, control);
/* No tooltip while in the process of clicking */
}
break;
case META_GRAB_OP_NONE:
{
MetaFrameControl control;
@@ -1659,7 +1689,7 @@ meta_frames_expose_event (GtkWidget *widget,
MetaFrames *frames;
frames = META_FRAMES (widget);
frame = meta_frames_lookup_window (frames, GDK_WINDOW_XID (event->window));
if (frame == NULL)
return FALSE;
@@ -1699,6 +1729,7 @@ meta_frames_paint_to_drawable (MetaFrames *frames,
int n_areas;
int screen_width, screen_height;
MetaButtonLayout button_layout;
MetaGrabOp grab_op;
widget = GTK_WIDGET (frames);
@@ -1710,53 +1741,47 @@ meta_frames_paint_to_drawable (MetaFrames *frames,
++i;
}
grab_frame = meta_core_get_grab_frame (gdk_display);
grab_op = meta_core_get_grab_op (gdk_display);
if (grab_frame != frame->xwindow)
grab_op = META_GRAB_OP_NONE;
/* Set prelight state */
switch (frame->prelit_control)
{
case META_FRAME_CONTROL_MENU:
button_states[META_BUTTON_TYPE_MENU] = META_BUTTON_STATE_PRELIGHT;
if (grab_op == META_GRAB_OP_CLICKING_MENU)
button_states[META_BUTTON_TYPE_MENU] = META_BUTTON_STATE_PRESSED;
else
button_states[META_BUTTON_TYPE_MENU] = META_BUTTON_STATE_PRELIGHT;
break;
case META_FRAME_CONTROL_MINIMIZE:
button_states[META_BUTTON_TYPE_MINIMIZE] = META_BUTTON_STATE_PRELIGHT;
if (grab_op == META_GRAB_OP_CLICKING_MINIMIZE)
button_states[META_BUTTON_TYPE_MINIMIZE] = META_BUTTON_STATE_PRESSED;
else
button_states[META_BUTTON_TYPE_MINIMIZE] = META_BUTTON_STATE_PRELIGHT;
break;
case META_FRAME_CONTROL_MAXIMIZE:
if (grab_op == META_GRAB_OP_CLICKING_MAXIMIZE)
button_states[META_BUTTON_TYPE_MAXIMIZE] = META_BUTTON_STATE_PRESSED;
else
button_states[META_BUTTON_TYPE_MAXIMIZE] = META_BUTTON_STATE_PRELIGHT;
break;
case META_FRAME_CONTROL_UNMAXIMIZE:
button_states[META_BUTTON_TYPE_MAXIMIZE] = META_BUTTON_STATE_PRELIGHT;
if (grab_op == META_GRAB_OP_CLICKING_UNMAXIMIZE)
button_states[META_BUTTON_TYPE_MAXIMIZE] = META_BUTTON_STATE_PRESSED;
else
button_states[META_BUTTON_TYPE_MAXIMIZE] = META_BUTTON_STATE_PRELIGHT;
break;
case META_FRAME_CONTROL_DELETE:
button_states[META_BUTTON_TYPE_CLOSE] = META_BUTTON_STATE_PRELIGHT;
if (grab_op == META_GRAB_OP_CLICKING_DELETE)
button_states[META_BUTTON_TYPE_CLOSE] = META_BUTTON_STATE_PRESSED;
else
button_states[META_BUTTON_TYPE_CLOSE] = META_BUTTON_STATE_PRELIGHT;
break;
default:
break;
}
grab_frame = meta_core_get_grab_frame (gdk_display);
if (frame->xwindow == grab_frame)
{
switch (meta_core_get_grab_op (gdk_display))
{
case META_GRAB_OP_CLICKING_MENU:
button_states[META_BUTTON_TYPE_MENU] =
META_BUTTON_STATE_PRESSED;
break;
case META_GRAB_OP_CLICKING_DELETE:
button_states[META_BUTTON_TYPE_CLOSE] =
META_BUTTON_STATE_PRESSED;
break;
case META_GRAB_OP_CLICKING_MAXIMIZE:
case META_GRAB_OP_CLICKING_UNMAXIMIZE:
button_states[META_BUTTON_TYPE_MAXIMIZE] =
META_BUTTON_STATE_PRESSED;
break;
case META_GRAB_OP_CLICKING_MINIMIZE:
button_states[META_BUTTON_TYPE_MINIMIZE] =
META_BUTTON_STATE_PRESSED;
break;
default:
break;
}
}
/* Map button function states to button position states */
button_states[META_BUTTON_TYPE_LEFT_LEFT_BACKGROUND] =

View File

@@ -103,7 +103,8 @@ GType meta_frames_get_type (void) G_GNUC_CONST;
MetaFrames *meta_frames_new (int screen_number);
void meta_frames_manage_window (MetaFrames *frames,
Window xwindow);
Window xwindow,
GdkWindow *window);
void meta_frames_unmanage_window (MetaFrames *frames,
Window xwindow);
void meta_frames_set_title (MetaFrames *frames,
@@ -130,7 +131,12 @@ void meta_frames_apply_shapes (MetaFrames *frames,
int new_window_width,
int new_window_height,
gboolean window_has_shape);
void meta_frames_move_resize_frame (MetaFrames *frames,
Window xwindow,
int x,
int y,
int width,
int height);
void meta_frames_queue_draw (MetaFrames *frames,
Window xwindow);

View File

@@ -105,67 +105,71 @@ meta_window_get_group (MetaWindow *window)
{
if (window->unmanaging)
return NULL;
if (window->cached_group == NULL)
g_assert (window->group != NULL);
return window->group;
}
void
meta_window_compute_group (MetaWindow* window)
{
MetaGroup *group;
/* use window->xwindow if no window->xgroup_leader */
group = NULL;
if (window->display->groups_by_leader)
{
MetaGroup *group;
/* use window->xwindow if no window->xgroup_leader */
group = NULL;
if (window->display->groups_by_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)
{
window->cached_group = group;
group->refcount += 1;
}
if (window->xgroup_leader != None)
group = g_hash_table_lookup (window->display->groups_by_leader,
&window->xgroup_leader);
else
{
if (window->xgroup_leader != None)
group = meta_group_new (window->display,
window->xgroup_leader);
else
group = meta_group_new (window->display,
window->xwindow);
group = g_hash_table_lookup (window->display->groups_by_leader,
&window->xwindow);
}
if (group != NULL)
{
window->group = group;
group->refcount += 1;
}
else
{
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);
window->group = group;
}
return window->cached_group;
window->group->windows = g_slist_prepend (window->group->windows,
window);
meta_topic (META_DEBUG_GROUPS,
"Adding %s to group with leader 0x%lx\n",
window->desc, group->group_leader);
}
static void
remove_window_from_group (MetaWindow *window)
{
if (window->cached_group != NULL)
if (window->group != NULL)
{
meta_topic (META_DEBUG_GROUPS,
"Removing %s from group with leader 0x%lx\n",
window->desc, window->cached_group->group_leader);
window->desc, window->group->group_leader);
window->cached_group->windows =
g_slist_remove (window->cached_group->windows,
window->group->windows =
g_slist_remove (window->group->windows,
window);
meta_group_unref (window->cached_group);
window->cached_group = NULL;
meta_group_unref (window->group);
window->group = NULL;
}
}
@@ -173,7 +177,7 @@ void
meta_window_group_leader_changed (MetaWindow *window)
{
remove_window_from_group (window);
meta_window_get_group (window);
meta_window_compute_group (window);
}
void
@@ -255,4 +259,5 @@ meta_group_property_notify (MetaGroup *group,
event->xproperty.atom);
return TRUE;
}

View File

@@ -26,6 +26,7 @@
/* note, can return NULL */
MetaGroup* meta_window_get_group (MetaWindow *window);
void meta_window_compute_group (MetaWindow* window);
void meta_window_shutdown_group (MetaWindow *window);
void meta_window_group_leader_changed (MetaWindow *window);

View File

@@ -79,6 +79,16 @@ static void handle_toggle_desktop (MetaDisplay *display,
MetaWindow *window,
XEvent *event,
MetaKeyBinding *binding);
static void handle_panel_keybinding (MetaDisplay *display,
MetaScreen *screen,
MetaWindow *window,
XEvent *event,
MetaKeyBinding *binding);
static void handle_toggle_above (MetaDisplay *display,
MetaScreen *screen,
MetaWindow *window,
XEvent *event,
MetaKeyBinding *binding);
static void handle_toggle_maximize (MetaDisplay *display,
MetaScreen *screen,
MetaWindow *window,
@@ -129,6 +139,11 @@ static void handle_move_to_workspace (MetaDisplay *display,
MetaWindow *window,
XEvent *event,
MetaKeyBinding *binding);
static void handle_move_to_workspace_flip (MetaDisplay *display,
MetaScreen *screen,
MetaWindow *window,
XEvent *event,
MetaKeyBinding *binding);
static void handle_workspace_switch (MetaDisplay *display,
MetaScreen *screen,
MetaWindow *window,
@@ -209,7 +224,7 @@ struct _MetaKeyBinding
const char *name;
KeySym keysym;
unsigned int mask;
int keycode;
unsigned int keycode;
MetaVirtualModifier modifiers;
const MetaKeyHandler *handler;
};
@@ -265,6 +280,10 @@ static const MetaKeyHandler screen_handlers[] = {
GINT_TO_POINTER (META_TAB_LIST_DOCKS) },
{ META_KEYBINDING_SHOW_DESKTOP, handle_toggle_desktop,
NULL },
{ META_KEYBINDING_PANEL_MAIN_MENU, handle_panel_keybinding,
GINT_TO_POINTER (META_KEYBINDING_ACTION_PANEL_MAIN_MENU) },
{ META_KEYBINDING_PANEL_RUN_DIALOG, handle_panel_keybinding,
GINT_TO_POINTER (META_KEYBINDING_ACTION_PANEL_RUN_DIALOG) },
{ META_KEYBINDING_COMMAND_1, handle_run_command,
GINT_TO_POINTER (0) },
{ META_KEYBINDING_COMMAND_2, handle_run_command,
@@ -329,12 +348,17 @@ static const MetaKeyHandler screen_handlers[] = {
GINT_TO_POINTER (30) },
{ META_KEYBINDING_COMMAND_32, handle_run_command,
GINT_TO_POINTER (31) },
{ META_KEYBINDING_COMMAND_SCREENSHOT, handle_run_command,
GINT_TO_POINTER (32) },
{ META_KEYBINDING_COMMAND_WIN_SCREENSHOT, handle_run_command,
GINT_TO_POINTER (33) },
{ NULL, NULL, NULL }
};
static const MetaKeyHandler window_handlers[] = {
{ META_KEYBINDING_WINDOW_MENU, handle_activate_menu, NULL },
{ META_KEYBINDING_TOGGLE_FULLSCREEN, handle_toggle_fullscreen, NULL },
{ META_KEYBINDING_TOGGLE_ABOVE, handle_toggle_above, NULL },
{ META_KEYBINDING_TOGGLE_MAXIMIZE, handle_toggle_maximize, NULL },
{ META_KEYBINDING_MAXIMIZE, handle_maximize, NULL },
{ META_KEYBINDING_UNMAXIMIZE, handle_unmaximize, NULL },
@@ -368,13 +392,13 @@ static const MetaKeyHandler window_handlers[] = {
GINT_TO_POINTER (10) },
{ META_KEYBINDING_MOVE_WORKSPACE_12, handle_move_to_workspace,
GINT_TO_POINTER (11) },
{ META_KEYBINDING_MOVE_WORKSPACE_LEFT, handle_move_to_workspace,
{ META_KEYBINDING_MOVE_WORKSPACE_LEFT, handle_move_to_workspace_flip,
GINT_TO_POINTER (META_MOTION_LEFT) },
{ META_KEYBINDING_MOVE_WORKSPACE_RIGHT, handle_move_to_workspace,
{ META_KEYBINDING_MOVE_WORKSPACE_RIGHT, handle_move_to_workspace_flip,
GINT_TO_POINTER (META_MOTION_RIGHT) },
{ META_KEYBINDING_MOVE_WORKSPACE_UP, handle_move_to_workspace,
{ META_KEYBINDING_MOVE_WORKSPACE_UP, handle_move_to_workspace_flip,
GINT_TO_POINTER (META_MOTION_UP) },
{ META_KEYBINDING_MOVE_WORKSPACE_DOWN, handle_move_to_workspace,
{ META_KEYBINDING_MOVE_WORKSPACE_DOWN, handle_move_to_workspace_flip,
GINT_TO_POINTER (META_MOTION_DOWN) },
{ META_KEYBINDING_RAISE_OR_LOWER, handle_raise_or_lower, NULL},
{ META_KEYBINDING_RAISE, handle_raise, NULL},
@@ -429,7 +453,7 @@ reload_modmap (MetaDisplay *display)
/* get the key code at this point in the map,
* see if its keysym is one we're interested in
*/
int keycode = modmap->modifiermap[i];
unsigned int keycode = modmap->modifiermap[i];
if (keycode >= display->min_keycode &&
keycode <= display->max_keycode)
@@ -512,7 +536,7 @@ reload_keycodes (MetaDisplay *display)
int i;
i = 0;
while (display->screen_bindings[i].keysym != None)
while (i < display->n_screen_bindings)
{
display->screen_bindings[i].keycode = XKeysymToKeycode (display->xdisplay,
display->screen_bindings[i].keysym);
@@ -526,7 +550,7 @@ reload_keycodes (MetaDisplay *display)
int i;
i = 0;
while (display->window_bindings[i].keysym != None)
while (i < display->n_window_bindings)
{
display->window_bindings[i].keycode = XKeysymToKeycode (display->xdisplay,
display->window_bindings[i].keysym);
@@ -547,11 +571,17 @@ reload_modifiers (MetaDisplay *display)
int i;
i = 0;
while (display->screen_bindings[i].keysym != None)
while (i < display->n_screen_bindings)
{
meta_display_devirtualize_modifiers (display,
display->screen_bindings[i].modifiers,
&display->screen_bindings[i].mask);
meta_topic (META_DEBUG_KEYBINDINGS,
" Devirtualized mods 0x%x -> 0x%x (%s)\n",
display->screen_bindings[i].modifiers,
display->screen_bindings[i].mask,
display->screen_bindings[i].name);
++i;
}
@@ -562,93 +592,137 @@ reload_modifiers (MetaDisplay *display)
int i;
i = 0;
while (display->window_bindings[i].keysym != None)
while (i < display->n_window_bindings)
{
meta_display_devirtualize_modifiers (display,
display->window_bindings[i].modifiers,
&display->window_bindings[i].mask);
meta_topic (META_DEBUG_KEYBINDINGS,
" Devirtualized mods 0x%x -> 0x%x (%s)\n",
display->window_bindings[i].modifiers,
display->window_bindings[i].mask,
display->window_bindings[i].name);
++i;
}
}
}
static void
rebuild_screen_binding_table (MetaDisplay *display)
static int
count_bindings (const MetaKeyPref *prefs,
int n_prefs)
{
int i;
int count;
count = 0;
i = 0;
while (i < n_prefs)
{
if (prefs[i].keysym != None)
{
count += 1;
if (prefs[i].add_shift &&
(prefs[i].modifiers & META_VIRTUAL_SHIFT_MASK) == 0)
count += 1;
}
++i;
}
return count;
}
static void
rebuild_binding_table (MetaDisplay *display,
MetaKeyBinding **bindings_p,
int *n_bindings_p,
const MetaKeyPref *prefs,
int n_prefs)
{
const MetaKeyPref *prefs;
int n_bindings;
int src, dest;
meta_topic (META_DEBUG_KEYBINDINGS,
"Rebuilding screen binding table from preferences\n");
meta_prefs_get_screen_bindings (&prefs, &n_bindings);
g_free (display->screen_bindings);
display->screen_bindings = g_new0 (MetaKeyBinding, n_bindings);
n_bindings = count_bindings (prefs, n_prefs);
g_free (*bindings_p);
*bindings_p = g_new0 (MetaKeyBinding, n_bindings);
src = 0;
dest = 0;
while (src < n_bindings)
while (src < n_prefs)
{
if (prefs[src].keysym != None)
{
display->screen_bindings[dest].name = prefs[src].name;
display->screen_bindings[dest].keysym = prefs[src].keysym;
display->screen_bindings[dest].modifiers = prefs[src].modifiers;
display->screen_bindings[dest].mask = 0;
display->screen_bindings[dest].keycode = 0;
(*bindings_p)[dest].name = prefs[src].name;
(*bindings_p)[dest].keysym = prefs[src].keysym;
(*bindings_p)[dest].modifiers = prefs[src].modifiers;
(*bindings_p)[dest].mask = 0;
(*bindings_p)[dest].keycode = 0;
++dest;
if (prefs[src].add_shift &&
(prefs[src].modifiers & META_VIRTUAL_SHIFT_MASK) == 0)
{
meta_topic (META_DEBUG_KEYBINDINGS,
"Binding %s also needs Shift grabbed\n",
prefs[src].name);
(*bindings_p)[dest].name = prefs[src].name;
(*bindings_p)[dest].keysym = prefs[src].keysym;
(*bindings_p)[dest].modifiers = prefs[src].modifiers |
META_VIRTUAL_SHIFT_MASK;
(*bindings_p)[dest].mask = 0;
(*bindings_p)[dest].keycode = 0;
++dest;
}
}
++src;
}
display->n_screen_bindings = dest;
g_assert (dest == n_bindings);
*n_bindings_p = dest;
meta_topic (META_DEBUG_KEYBINDINGS,
"%d screen bindings in table\n",
display->n_screen_bindings);
" %d bindings in table\n",
*n_bindings_p);
}
static void
rebuild_screen_binding_table (MetaDisplay *display)
{
const MetaKeyPref *prefs;
int n_prefs;
meta_topic (META_DEBUG_KEYBINDINGS,
"Rebuilding screen binding table from preferences\n");
meta_prefs_get_screen_bindings (&prefs, &n_prefs);
rebuild_binding_table (display,
&display->screen_bindings,
&display->n_screen_bindings,
prefs, n_prefs);
}
static void
rebuild_window_binding_table (MetaDisplay *display)
{
const MetaKeyPref *prefs;
int n_bindings;
int src, dest;
int n_prefs;
meta_topic (META_DEBUG_KEYBINDINGS,
"Rebuilding window binding table from preferences\n");
meta_prefs_get_window_bindings (&prefs, &n_bindings);
g_free (display->window_bindings);
display->window_bindings = g_new0 (MetaKeyBinding, n_bindings);
src = 0;
dest = 0;
while (src < n_bindings)
{
if (prefs[src].keysym != None)
{
display->window_bindings[dest].name = prefs[src].name;
display->window_bindings[dest].keysym = prefs[src].keysym;
display->window_bindings[dest].modifiers = prefs[src].modifiers;
display->window_bindings[dest].mask = 0;
display->window_bindings[dest].keycode = 0;
++dest;
}
++src;
}
display->n_window_bindings = dest;
meta_topic (META_DEBUG_KEYBINDINGS,
"%d window bindings in table\n",
display->n_window_bindings);
meta_prefs_get_window_bindings (&prefs, &n_prefs);
rebuild_binding_table (display,
&display->window_bindings,
&display->n_window_bindings,
prefs, n_prefs);
}
static void
@@ -854,10 +928,10 @@ meta_change_keygrab (MetaDisplay *display,
Window xwindow,
gboolean grab,
int keysym,
int keycode,
unsigned int keycode,
int modmask)
{
int ignored_mask;
unsigned int ignored_mask;
/* Grab keycode/modmask, together with
* all combinations of ignored modifiers.
@@ -874,7 +948,7 @@ meta_change_keygrab (MetaDisplay *display,
meta_error_trap_push (display);
ignored_mask = 0;
while (ignored_mask < (int) display->ignored_modifier_mask)
while (ignored_mask <= display->ignored_modifier_mask)
{
if (ignored_mask & ~(display->ignored_modifier_mask))
{
@@ -925,7 +999,7 @@ static void
meta_grab_key (MetaDisplay *display,
Window xwindow,
int keysym,
int keycode,
unsigned int keycode,
int modmask)
{
meta_change_keygrab (display, xwindow, TRUE, keysym, keycode, modmask);
@@ -1017,6 +1091,14 @@ meta_window_grab_keys (MetaWindow *window)
{
if (window->all_keys_grabbed)
return;
if (window->type == META_WINDOW_DOCK)
{
if (window->keys_grabbed)
ungrab_all_keys (window->display, window->xwindow);
window->keys_grabbed = FALSE;
return;
}
if (window->keys_grabbed)
{
@@ -1055,25 +1137,55 @@ meta_window_ungrab_keys (MetaWindow *window)
}
}
#ifdef WITH_VERBOSE_MODE
static const char*
grab_status_to_string (int status)
{
switch (status)
{
case AlreadyGrabbed:
return "AlreadyGrabbed";
case GrabSuccess:
return "GrabSuccess";
case GrabNotViewable:
return "GrabNotViewable";
case GrabFrozen:
return "GrabFrozen";
case GrabInvalidTime:
return "GrabInvalidTime";
default:
return "(unknown)";
}
}
#endif /* WITH_VERBOSE_MODE */
static gboolean
grab_keyboard (MetaDisplay *display,
Window xwindow)
{
int result;
int grab_status;
Time timestamp;
/* Grab the keyboard, so we get key releases and all key
* presses
*/
meta_error_trap_push_with_return (display);
if (XGrabKeyboard (display->xdisplay,
xwindow, True,
GrabModeAsync, GrabModeAsync,
meta_display_get_current_time (display)) != GrabSuccess)
timestamp = meta_display_get_current_time (display);
grab_status = XGrabKeyboard (display->xdisplay,
xwindow, True,
GrabModeAsync, GrabModeAsync,
timestamp);
if (grab_status != GrabSuccess)
{
meta_error_trap_pop_with_return (display, TRUE);
meta_topic (META_DEBUG_KEYBINDINGS,
"XGrabKeyboard() returned failure\n");
"XGrabKeyboard() returned failure status %s time %lu\n",
grab_status_to_string (grab_status),
(unsigned long) timestamp);
return FALSE;
}
else
{
@@ -1274,10 +1386,9 @@ is_specific_modifier (MetaDisplay *display,
return retval;
}
static gboolean
keycode_is_primary_modifier (MetaDisplay *display,
unsigned int keycode,
unsigned int entire_binding_mask)
static unsigned int
get_primary_modifier (MetaDisplay *display,
unsigned int entire_binding_mask)
{
/* The idea here is to see if the "main" modifier
* for Alt+Tab has been pressed/released. So if the binding
@@ -1290,20 +1401,62 @@ keycode_is_primary_modifier (MetaDisplay *display,
ShiftMask, LockMask };
int i;
meta_topic (META_DEBUG_KEYBINDINGS,
"Checking whether code 0x%x is the primary modifier of mask 0x%x\n",
keycode, entire_binding_mask);
i = 0;
while (i < (int) G_N_ELEMENTS (masks))
{
if (entire_binding_mask & masks[i])
return is_specific_modifier (display, keycode, masks[i]);
return masks[i];
++i;
}
return FALSE;
return 0;
}
static gboolean
keycode_is_primary_modifier (MetaDisplay *display,
unsigned int keycode,
unsigned int entire_binding_mask)
{
unsigned int primary_modifier;
meta_topic (META_DEBUG_KEYBINDINGS,
"Checking whether code 0x%x is the primary modifier of mask 0x%x\n",
keycode, entire_binding_mask);
primary_modifier = get_primary_modifier (display, entire_binding_mask);
if (primary_modifier != 0)
return is_specific_modifier (display, keycode, primary_modifier);
else
return FALSE;
}
static gboolean
primary_modifier_still_pressed (MetaDisplay *display,
unsigned int entire_binding_mask)
{
unsigned int primary_modifier;
int x, y, root_x, root_y;
Window root, child;
guint mask;
primary_modifier = get_primary_modifier (display, entire_binding_mask);
XQueryPointer (display->xdisplay,
display->no_focus_window, /* some random window */
&root, &child,
&root_x, &root_y,
&x, &y,
&mask);
meta_topic (META_DEBUG_KEYBINDINGS,
"Primary modifier 0x%x full grab mask 0x%x current state 0x%x\n",
primary_modifier, entire_binding_mask, mask);
if ((mask & primary_modifier) == 0)
return FALSE;
else
return TRUE;
}
static const MetaKeyHandler*
@@ -1344,13 +1497,18 @@ process_event (MetaKeyBinding *bindings,
i = 0;
while (i < n_bindings)
{
if (bindings[i].keysym == keysym &&
if (bindings[i].keycode == event->xkey.keycode &&
((event->xkey.state & ~(display->ignored_modifier_mask)) ==
bindings[i].mask) &&
event->type == KeyPress)
{
const MetaKeyHandler *handler;
meta_topic (META_DEBUG_KEYBINDINGS,
"Binding keycode 0x%x mask 0x%x matches event 0x%x state 0x%x\n",
bindings[i].keycode, bindings[i].mask,
event->xkey.keycode, event->xkey.state);
if (bindings[i].handler)
handler = bindings[i].handler;
else
@@ -1547,14 +1705,26 @@ process_keyboard_move_grab (MetaDisplay *display,
else
incr = NORMAL_INCREMENT;
if (keysym == XK_Escape)
{
/* End move and restore to original position */
meta_window_move_resize (display->grab_window,
TRUE,
display->grab_initial_window_pos.x,
display->grab_initial_window_pos.y,
display->grab_initial_window_pos.width,
display->grab_initial_window_pos.height);
}
/* When moving by increments, we still snap to edges if the move
* to the edge is smaller than the increment. This is because
* Shift + arrow to snap is sort of a hidden feature. This way
* people using just arrows shouldn't get too frustrated.
*/
switch (keysym)
{
case XK_KP_Home:
case XK_KP_Prior:
case XK_Up:
case XK_KP_Up:
edge = meta_window_find_next_horizontal_edge (window, FALSE);
@@ -1565,6 +1735,8 @@ process_keyboard_move_grab (MetaDisplay *display,
handled = TRUE;
break;
case XK_KP_End:
case XK_KP_Next:
case XK_Down:
case XK_KP_Down:
edge = meta_window_find_next_horizontal_edge (window, TRUE);
@@ -1575,6 +1747,12 @@ process_keyboard_move_grab (MetaDisplay *display,
handled = TRUE;
break;
}
switch (keysym)
{
case XK_KP_Home:
case XK_KP_End:
case XK_Left:
case XK_KP_Left:
edge = meta_window_find_next_vertical_edge (window, FALSE);
@@ -1585,6 +1763,8 @@ process_keyboard_move_grab (MetaDisplay *display,
handled = TRUE;
break;
case XK_KP_Prior:
case XK_KP_Next:
case XK_Right:
case XK_KP_Right:
edge = meta_window_find_next_vertical_edge (window, TRUE);
@@ -1593,19 +1773,6 @@ process_keyboard_move_grab (MetaDisplay *display,
x = edge;
handled = TRUE;
break;
case XK_Escape:
/* End move and restore to original position */
meta_window_move_resize (display->grab_window,
TRUE,
display->grab_initial_window_pos.x,
display->grab_initial_window_pos.y,
display->grab_initial_window_pos.width,
display->grab_initial_window_pos.height);
break;
default:
break;
}
if (handled)
@@ -2034,10 +2201,6 @@ process_tab_grab (MetaDisplay *display,
if (target_window)
{
meta_topic (META_DEBUG_KEYBINDINGS,
"Ending grab early so we can focus the target window\n");
meta_display_end_grab_op (display, event->xkey.time);
meta_topic (META_DEBUG_KEYBINDINGS,
"Activating target window\n");
@@ -2045,6 +2208,10 @@ process_tab_grab (MetaDisplay *display,
target_window->desc);
meta_window_activate (target_window, event->xkey.time);
meta_topic (META_DEBUG_KEYBINDINGS,
"Ending grab early so we can focus the target window\n");
meta_display_end_grab_op (display, event->xkey.time);
return TRUE; /* we already ended the grab */
}
@@ -2440,11 +2607,64 @@ handle_toggle_desktop (MetaDisplay *display,
MetaKeyBinding *binding)
{
if (screen->showing_desktop)
meta_screen_unshow_desktop (screen);
{
meta_screen_unshow_desktop (screen);
meta_workspace_focus_top_window (screen->active_workspace, NULL);
}
else
meta_screen_show_desktop (screen);
}
static void
handle_panel_keybinding (MetaDisplay *display,
MetaScreen *screen,
MetaWindow *window,
XEvent *event,
MetaKeyBinding *binding)
{
MetaKeyBindingAction action;
Atom action_atom;
XClientMessageEvent ev;
action = GPOINTER_TO_INT (binding->handler->data);
action_atom = None;
switch (action)
{
case META_KEYBINDING_ACTION_PANEL_MAIN_MENU:
action_atom = display->atom_gnome_panel_action_main_menu;
break;
case META_KEYBINDING_ACTION_PANEL_RUN_DIALOG:
action_atom = display->atom_gnome_panel_action_run_dialog;
break;
default:
return;
}
ev.type = ClientMessage;
ev.window = screen->xroot;
ev.message_type = display->atom_gnome_panel_action;
ev.format = 32;
ev.data.l[0] = action_atom;
ev.data.l[1] = event->xkey.time;
meta_topic (META_DEBUG_KEYBINDINGS,
"Sending panel message with timestamp %lu\n", event->xkey.time);
meta_error_trap_push (display);
/* Release the grab for the panel before sending the event */
XUngrabKeyboard (display->xdisplay, event->xkey.time);
XSendEvent (display->xdisplay,
screen->xroot,
False,
StructureNotifyMask,
(XEvent*) &ev);
meta_error_trap_pop (display, FALSE);
}
static void
handle_activate_menu (MetaDisplay *display,
MetaScreen *screen,
@@ -2558,15 +2778,30 @@ do_choose_window (MetaDisplay *display,
binding->mask,
event->xkey.time,
0, 0))
{
meta_ui_tab_popup_select (screen->tab_popup,
(MetaTabEntryKey) initial_selection->xwindow);
if (show_popup)
meta_ui_tab_popup_set_showing (screen->tab_popup,
TRUE);
{
if (!primary_modifier_still_pressed (display,
binding->mask))
{
/* This handles a race where modifier might be released
* before we establish the grab. must end grab
* prior to trying to focus a window.
*/
meta_topic (META_DEBUG_FOCUS, "Ending grab and activating %s due to switch/cycle windows where modifier was released prior to grab\n",
initial_selection->desc);
meta_display_end_grab_op (display, event->xkey.time);
meta_window_activate (initial_selection, event->xkey.time);
}
else
meta_window_raise (initial_selection);
{
meta_ui_tab_popup_select (screen->tab_popup,
(MetaTabEntryKey) initial_selection->xwindow);
if (show_popup)
meta_ui_tab_popup_set_showing (screen->tab_popup,
TRUE);
else
meta_window_raise (initial_selection);
}
}
}
}
@@ -2631,6 +2866,22 @@ handle_toggle_fullscreen (MetaDisplay *display,
}
}
static void
handle_toggle_above (MetaDisplay *display,
MetaScreen *screen,
MetaWindow *window,
XEvent *event,
MetaKeyBinding *binding)
{
if (window)
{
if (window->wm_state_above)
meta_window_unmake_above (window);
else
meta_window_make_above (window);
}
}
static void
handle_toggle_maximize (MetaDisplay *display,
MetaScreen *screen,
@@ -2762,11 +3013,12 @@ handle_toggle_sticky (MetaDisplay *display,
}
static void
handle_move_to_workspace (MetaDisplay *display,
MetaScreen *screen,
MetaWindow *window,
XEvent *event,
MetaKeyBinding *binding)
do_handle_move_to_workspace (MetaDisplay *display,
MetaScreen *screen,
MetaWindow *window,
XEvent *event,
MetaKeyBinding *binding,
gboolean flip)
{
int which;
MetaWorkspace *workspace;
@@ -2791,7 +3043,8 @@ handle_move_to_workspace (MetaDisplay *display,
{
/* Activate second, so the window is never unmapped */
meta_window_change_workspace (window, workspace);
meta_workspace_activate (workspace);
if (flip)
meta_workspace_activate_with_focus (workspace, window);
}
else
{
@@ -2799,6 +3052,35 @@ handle_move_to_workspace (MetaDisplay *display,
}
}
static void
handle_move_to_workspace (MetaDisplay *display,
MetaScreen *screen,
MetaWindow *window,
XEvent *event,
MetaKeyBinding *binding)
{
do_handle_move_to_workspace (display,
screen,
window,
event,
binding,
FALSE);
}
static void
handle_move_to_workspace_flip (MetaDisplay *display,
MetaScreen *screen,
MetaWindow *window,
XEvent *event,
MetaKeyBinding *binding)
{
do_handle_move_to_workspace (display,
screen,
window,
event,
binding,
TRUE);
}
static void
handle_raise_or_lower (MetaDisplay *display,
MetaScreen *screen,
@@ -2882,6 +3164,7 @@ handle_workspace_switch (MetaDisplay *display,
MetaKeyBinding *binding)
{
int motion;
unsigned int grab_mask;
motion = GPOINTER_TO_INT (binding->handler->data);
@@ -2890,31 +3173,49 @@ handle_workspace_switch (MetaDisplay *display,
meta_topic (META_DEBUG_KEYBINDINGS,
"Starting tab between workspaces, showing popup\n");
/* FIXME should we use binding->mask ? */
grab_mask = event->xkey.state & ~(display->ignored_modifier_mask);
if (meta_display_begin_grab_op (display,
screen,
NULL,
META_GRAB_OP_KEYBOARD_WORKSPACE_SWITCHING,
FALSE,
0,
event->xkey.state & ~(display->ignored_modifier_mask),
grab_mask,
event->xkey.time,
0, 0))
{
MetaWorkspace *next;
gboolean grabbed_before_release;
next = meta_workspace_get_neighbor (screen->active_workspace, motion);
g_assert (next);
grabbed_before_release = primary_modifier_still_pressed (display, grab_mask);
meta_topic (META_DEBUG_KEYBINDINGS,
"Activating target workspace\n");
if (!grabbed_before_release)
{
/* end the grab right away, modifier possibly released
* before we could establish the grab and receive the
* release event. Must end grab before we can switch
* spaces.
*/
meta_display_end_grab_op (display, event->xkey.time);
}
switch_to_workspace (display, next);
meta_ui_tab_popup_select (screen->tab_popup, (MetaTabEntryKey) next);
/* only after selecting proper space */
meta_ui_tab_popup_set_showing (screen->tab_popup, TRUE);
if (grabbed_before_release)
{
meta_ui_tab_popup_select (screen->tab_popup, (MetaTabEntryKey) next);
/* only after selecting proper space */
meta_ui_tab_popup_set_showing (screen->tab_popup, TRUE);
}
}
}

View File

@@ -61,7 +61,7 @@ log_handler (const gchar *log_domain,
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);
}
@@ -112,6 +112,9 @@ main (int argc, char **argv)
meta_set_debugging (TRUE);
meta_set_syncing (g_getenv ("METACITY_SYNC") != NULL);
if (g_get_home_dir ())
chdir (g_get_home_dir ());
{
char buf[256];
GDate d;
@@ -271,6 +274,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 ();
@@ -316,6 +335,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);
@@ -324,7 +346,7 @@ main (int argc, char **argv)
if (!meta_ui_have_a_theme ())
meta_fatal (_("Could not find a theme! Be sure %s exists and contains the usual themes."),
METACITY_PKGDATADIR"/themes");
METACITY_DATADIR"/themes");
/* Connect to SM as late as possible - but before managing display,
* or we might try to manage a window before we have the session

View File

@@ -241,10 +241,10 @@ meta_window_menu_new (MetaFrames *frames,
menu->insensitive = insensitive;
menu->menu = gtk_menu_new ();
#ifdef HAVE_GTK_MULTIHEAD
gtk_menu_set_screen (GTK_MENU (menu->menu),
gtk_widget_get_screen (GTK_WIDGET (frames)));
#endif
i = 0;
while (i < (int) G_N_ELEMENTS (menuitems))
{
@@ -316,25 +316,17 @@ 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;
GdkScreen *screen;
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
screen = gdk_drawable_get_screen (GTK_WIDGET (frames)->window);
xroot = GDK_DRAWABLE_XID (gdk_screen_get_root_window (screen));
i = 0;
while (i < n_workspaces)

View File

@@ -79,19 +79,28 @@ kill_window_question (const char *window_name,
const char *parent_str)
{
GtkWidget *dialog;
char *str, *tmp;
tmp = g_markup_escape_text (window_name, -1);
str = g_strdup_printf (_("The window \"%s\" is not responding."), tmp);
g_free (tmp);
dialog = gtk_message_dialog_new (NULL, 0,
GTK_MESSAGE_QUESTION,
GTK_MESSAGE_WARNING,
GTK_BUTTONS_NONE,
_("The window \"%s\" is not responding.\n"
"Force this application to exit?\n"
"(Any open documents will be lost.)"),
window_name);
"<b>%s</b>\n\n%s",
str,
_("Forcing this application to quit will "
"cause you to lose any unsaved changes."));
g_free (str);
gtk_label_set_use_markup (GTK_LABEL (GTK_MESSAGE_DIALOG (dialog)->label), TRUE);
gtk_label_set_line_wrap (GTK_LABEL (GTK_MESSAGE_DIALOG (dialog)->label), TRUE);
gtk_dialog_add_buttons (GTK_DIALOG (dialog),
GTK_STOCK_CANCEL,
GTK_RESPONSE_REJECT,
_("Kill application"),
_("_Force Quit"),
GTK_RESPONSE_ACCEPT,
NULL);
@@ -228,7 +237,10 @@ warn_about_no_sm_support (char **lame_apps)
G_CALLBACK (gtk_main_quit),
NULL);
gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_CLOSE);
/* Wait 4 minutes then force quit, so we don't wait around all night */
g_timeout_add (4 * 60 * 1000, (GSourceFunc) gtk_main_quit, NULL);
gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_CLOSE);
list = create_lame_apps_list (lame_apps);
sw = gtk_scrolled_window_new (NULL, NULL);

View File

@@ -7,6 +7,9 @@ X-GNOME-WMSettingsModule=metacity
X-GNOME-WMName=Metacity
# back compat only
X-GnomeWMSettingsLibrary=metacity
X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Product=metacity
X-GNOME-Bugzilla-Component=general
[Window Manager]
SessionManaged=true

View File

@@ -71,8 +71,8 @@
<short>Action on title bar double-click</short>
<long>
This option determines the effects of double-clicking on the
title bar. Current valid options are 'toggle_shaded', which will
shade/unshade the window, and 'toggle_maximized' which will
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>
@@ -114,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>
@@ -177,6 +177,57 @@
</locale>
</schema>
<schema>
<key>/schemas/apps/metacity/general/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>
@@ -251,6 +302,29 @@ you set
</locale>
</schema>
<schema>
<key>/schemas/apps/metacity/window_keybindings/toggle_above</key>
<applyto>/apps/metacity/window_keybindings/toggle_above</applyto>
<owner>metacity</owner>
<type>string</type>
<default>disabled</default>
<locale name="C">
<short>Toggle always on top state</short>
<long>
The keybinding used to toggle always on top. A window that
is always on top will always be visible over other overlapping windows.
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/toggle_maximized</key>
<applyto>/apps/metacity/window_keybindings/toggle_maximized</applyto>
@@ -1548,6 +1622,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>
@@ -1585,6 +1753,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
@@ -90,7 +92,8 @@ find_next_cascade (MetaWindow *window,
int x_threshold, y_threshold;
int window_width, window_height;
int cascade_stage;
MetaRectangle work_area;
MetaRectangle work_area;
const MetaXineramaScreenInfo* current;
sorted = g_list_copy (windows);
sorted = g_list_sort (sorted, northwestcmp);
@@ -120,13 +123,10 @@ 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.
*/
meta_window_get_work_area (window, TRUE, &work_area);
current = meta_screen_get_current_xinerama (window->screen);
meta_window_get_work_area_for_xinerama (window, current->number, &work_area);
cascade_x = MAX (0, work_area.x);
cascade_y = MAX (0, work_area.y);
@@ -363,63 +363,32 @@ topmost_cmp (gconstpointer a, gconstpointer b)
return 0;
}
static gboolean
fit_rect_in_xinerama (MetaScreen *screen,
MetaRectangle *rect)
static void
center_tile_rect_in_area (MetaRectangle *rect,
MetaRectangle *work_area)
{
int i;
int best_index;
int best_overlap;
const MetaXineramaScreenInfo *xsi;
/* Find xinerama with best fit, then
* shift rect to be entirely within it.
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)
*/
best_overlap = -1;
best_index = -1;
i = 0;
while (i < screen->n_xinerama_infos)
{
MetaRectangle xinerama_rect;
MetaRectangle intersect;
int overlap;
xsi = &screen->xinerama_infos[i];
xinerama_rect.x = xsi->x_origin;
xinerama_rect.y = xsi->y_origin;
xinerama_rect.width = xsi->width;
xinerama_rect.height = xsi->height;
fluff = (work_area->width % (rect->width+1)) / 2;
rect->x = work_area->x + fluff;
fluff = (work_area->height % (rect->height+1)) / 3;
rect->y = work_area->y + fluff;
}
if (meta_rectangle_intersect (rect, &xinerama_rect, &intersect))
overlap = intersect.width * intersect.height;
else
overlap = 0;
if (overlap > best_overlap)
{
best_index = i;
best_overlap = overlap;
}
++i;
}
/* some overlap had to be better than -1 */
g_assert (best_index >= 0);
xsi = &screen->xinerama_infos[best_index];
if (rect->x < xsi->x_origin)
rect->x = xsi->x_origin;
if (rect->y < xsi->y_origin)
rect->y = xsi->y_origin;
/* 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));
static gboolean
rect_fits_in_work_area (MetaRectangle *work_area,
MetaRectangle *rect)
{
return ((rect->x >= work_area->x) &&
(rect->y >= work_area->y) &&
(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
@@ -435,6 +404,8 @@ find_first_fit (MetaWindow *window,
MetaFrameGeometry *fgeom,
/* visible windows on relevant workspaces */
GList *windows,
int* xineramas_list,
int n_xineramas,
int x,
int y,
int *new_x,
@@ -446,16 +417,26 @@ 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 *below_sorted;
GList *right_sorted;
GList *tmp;
MetaRectangle rect;
MetaRectangle work_area;
int i;
retval = FALSE;
sorted = NULL;
/* Below each window */
below_sorted = g_list_copy (windows);
below_sorted = g_list_sort (below_sorted, leftmost_cmp);
below_sorted = g_list_sort (below_sorted, topmost_cmp);
/* To the right of each window */
right_sorted = g_list_copy (windows);
right_sorted = g_list_sort (right_sorted, topmost_cmp);
right_sorted = g_list_sort (right_sorted, leftmost_cmp);
rect.width = window->rect.width;
rect.height = window->rect.height;
@@ -466,104 +447,26 @@ 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;
if (fit_rect_in_xinerama (window->screen, &rect) &&
!rectangle_overlaps_some_window (&rect, windows))
for (i = 0; i < n_xineramas; i++)
{
*new_x = rect.x;
*new_y = rect.y;
if (fgeom)
{
*new_x += fgeom->left_width;
*new_y += fgeom->top_height;
}
retval = TRUE;
goto out;
}
sorted = g_list_copy (windows);
/* Below each window */
sorted = g_list_sort (sorted, leftmost_cmp);
sorted = g_list_sort (sorted, topmost_cmp);
tmp = sorted;
while (tmp != NULL)
{
MetaWindow *w = tmp->data;
MetaRectangle 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) &&
!rectangle_overlaps_some_window (&rect, sorted))
{
*new_x = rect.x;
*new_y = rect.y;
if (fgeom)
{
*new_x += fgeom->left_width;
*new_y += fgeom->top_height;
}
retval = TRUE;
goto out;
}
tmp = tmp->next;
meta_topic (META_DEBUG_XINERAMA,
"Natural xinerama %d is %d,%d %dx%d\n",
i,
window->screen->xinerama_infos[xineramas_list[i]].x_origin,
window->screen->xinerama_infos[xineramas_list[i]].y_origin,
window->screen->xinerama_infos[xineramas_list[i]].width,
window->screen->xinerama_infos[xineramas_list[i]].height);
}
/* To the right of each window */
sorted = g_list_sort (sorted, topmost_cmp);
sorted = g_list_sort (sorted, leftmost_cmp);
tmp = sorted;
while (tmp != NULL)
/* try each xinerama in the natural ordering in turn */
i = 0;
while (i < n_xineramas)
{
MetaWindow *w = tmp->data;
MetaRectangle outer_rect;
meta_window_get_outer_rect (w, &outer_rect);
meta_window_get_work_area_for_xinerama (window, xineramas_list[i], &work_area);
rect.x = outer_rect.x + outer_rect.width;
rect.y = outer_rect.y;
if (fit_rect_in_xinerama (window->screen, &rect) &&
!rectangle_overlaps_some_window (&rect, sorted))
{
*new_x = rect.x;
*new_y = rect.y;
if (fgeom)
{
*new_x += fgeom->left_width;
*new_y += fgeom->top_height;
}
center_tile_rect_in_area (&rect, &work_area);
retval = TRUE;
goto out;
}
tmp = tmp->next;
}
/* Origin of 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) &&
if (rect_fits_in_work_area (&work_area, &rect) &&
!rectangle_overlaps_some_window (&rect, windows))
{
*new_x = rect.x;
@@ -578,69 +481,79 @@ find_first_fit (MetaWindow *window,
goto out;
}
/* try below each window */
tmp = below_sorted;
while (tmp != NULL)
{
MetaWindow *w = tmp->data;
MetaRectangle outer_rect;
meta_window_get_outer_rect (w, &outer_rect);
rect.x = outer_rect.x;
rect.y = outer_rect.y + outer_rect.height;
if (rect_fits_in_work_area (&work_area, &rect) &&
!rectangle_overlaps_some_window (&rect, below_sorted))
{
*new_x = rect.x;
*new_y = rect.y;
if (fgeom)
{
*new_x += fgeom->left_width;
*new_y += fgeom->top_height;
}
retval = TRUE;
goto out;
}
tmp = tmp->next;
}
/* try to the right of each window */
tmp = right_sorted;
while (tmp != NULL)
{
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 (rect_fits_in_work_area (&work_area, &rect) &&
!rectangle_overlaps_some_window (&rect, right_sorted))
{
*new_x = rect.x;
*new_y = rect.y;
if (fgeom)
{
*new_x += fgeom->left_width;
*new_y += fgeom->top_height;
}
retval = TRUE;
goto out;
}
tmp = tmp->next;
}
++i;
}
out:
g_list_free (sorted);
g_list_free (below_sorted);
g_list_free (right_sorted);
return retval;
}
static void
constrain_placement (MetaWindow *window,
MetaFrameGeometry *fgeom,
int x,
int y,
int *new_x,
int *new_y)
{
/* The purpose of this function is to apply constraints that are not
* covered by window.c:constrain_position(), but should apply
* whenever we are _placing_ a window regardless of placement algorithm.
*/
MetaRectangle work_area;
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);
nw_x = work_area.x;
nw_y = work_area.y;
if (window->frame)
{
nw_x += fgeom->left_width;
nw_y += fgeom->top_height;
}
/* Keep window from going off the bottom right, though we don't have
* this constraint once the window has been placed
*/
offscreen_w = (outer_rect.x + outer_rect.width) - (work_area.x + work_area.width);
if (offscreen_w > 0)
nw_x -= offscreen_w;
offscreen_h = (outer_rect.y + outer_rect.height) - (work_area.y + work_area.height);
if (offscreen_h > 0)
nw_y -= offscreen_h;
/* Keep window from going off left edge, though again we don't have
* this constraint once the window has been placed.
*/
if (x < nw_x)
x = nw_x;
if (y < nw_y)
y = nw_y;
*new_x = x;
*new_y = y;
}
void
meta_window_place (MetaWindow *window,
MetaFrameGeometry *fgeom,
@@ -651,6 +564,10 @@ meta_window_place (MetaWindow *window,
{
GList *windows;
const MetaXineramaScreenInfo *xi;
int* xineramas_list = NULL;
int n_xineramas;
int i;
int placed_on = -1;
/* frame member variables should NEVER be used in here, only
* MetaFrameGeometry. But remember fgeom == NULL
@@ -838,17 +755,89 @@ meta_window_place (MetaWindow *window,
x = xi->x_origin;
y = xi->y_origin;
if (find_first_fit (window, fgeom, windows, x, y, &x, &y))
meta_screen_get_natural_xinerama_list (window->screen,
&xineramas_list,
&n_xineramas);
if (find_first_fit (window, fgeom, windows,
xineramas_list, n_xineramas,
x, y, &x, &y))
goto done;
find_next_cascade (window, fgeom, windows, x, y, &x, &y);
/* This is a special-case origin-cascade so that windows that are
* too large to fit onto a workspace (and which will be
* automaximized later) will go onto an empty xinerama if one is
* available.
*/
if (window->has_maximize_func && window->decorated &&
!window->fullscreen)
{
if (window->frame)
{
x = fgeom->left_width;
y = fgeom->top_height;
}
else
{
x = 0;
y = 0;
}
for (i = 0; i < n_xineramas; i++)
{
MetaRectangle work_area;
meta_window_get_work_area_for_xinerama (window, xineramas_list[i], &work_area);
if (!rectangle_overlaps_some_window (&work_area, windows))
{
x += work_area.x;
y += work_area.y;
placed_on = i;
break;
}
}
}
/* if the window wasn't placed at the origin of an empty xinerama,
* cascade it onto the current xinerama
*/
if (placed_on == -1)
{
find_next_cascade (window, fgeom, windows, x, y, &x, &y);
placed_on = 0;
}
/* Maximize windows if they are too big for their work area (bit of
* a hack here). Assume undecorated windows probably don't intend to
* be maximized.
*/
if (window->has_maximize_func && window->decorated &&
!window->fullscreen)
{
MetaRectangle workarea;
MetaRectangle outer;
meta_window_get_work_area_for_xinerama (window,
xineramas_list[placed_on],
&workarea);
meta_window_get_outer_rect (window, &outer);
if (outer.width >= workarea.width &&
outer.height >= workarea.height)
{
outer.x = x;
outer.y = y;
meta_window_maximize_internal (window, &outer);
}
}
done:
g_free (xineramas_list);
g_list_free (windows);
constrain_placement (window, fgeom, x, y, &x, &y);
done_no_constraints:
*new_x = x;
*new_y = y;
}
@@ -942,17 +931,17 @@ get_vertical_edges (MetaWindow *window,
windows = get_windows_on_same_workspace (window, &n_windows);
i = 0;
n_edges = n_windows * 2 + 4 + window->screen->n_xinerama_infos - 1; /* 4 = workspace/screen edges */
/* 4 = workspace/screen edges */
n_edges = n_windows * 2 + 4 + window->screen->n_xinerama_infos - 1;
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 +1008,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;
@@ -1207,7 +1194,6 @@ meta_window_find_next_horizontal_edge (MetaWindow *window,
return retval;
}
int
meta_window_find_nearest_vertical_edge (MetaWindow *window,
int x_pos)

View File

@@ -29,8 +29,12 @@
#include <string.h>
#include <stdlib.h>
#define MAX_REASONABLE_WORKSPACES 32
#define MAX_COMMANDS 32
#define MAX_REASONABLE_WORKSPACES 36
#define MAX_COMMANDS (32 + NUM_EXTRA_COMMANDS)
#define NUM_EXTRA_COMMANDS 2
#define SCREENSHOT_COMMAND_IDX (MAX_COMMANDS - 2)
#define WIN_SCREENSHOT_COMMAND_IDX (MAX_COMMANDS - 1)
/* If you add a key, it needs updating in init() and in the gconf
* notify listener and of course in the .schemas file
@@ -54,6 +58,10 @@
#define KEY_WORKSPACE_NAME_PREFIX "/apps/metacity/workspace_names/name_"
#define KEY_VISUAL_BELL "/apps/metacity/general/visual_bell"
#define KEY_AUDIBLE_BELL "/apps/metacity/general/audible_bell"
#define KEY_VISUAL_BELL_TYPE "/apps/metacity/general/visual_bell_type"
#ifdef HAVE_GCONF
static GConfClient *default_client = NULL;
static GList *changes = NULL;
@@ -73,6 +81,9 @@ static gboolean application_based = FALSE;
static gboolean disable_workarounds = FALSE;
static gboolean auto_raise = FALSE;
static gboolean auto_raise_delay = 500;
static gboolean provide_visual_bell = TRUE;
static gboolean bell_is_audible = TRUE;
static MetaVisualBellType visual_bell_type = META_VISUAL_BELL_INVALID;
static MetaButtonLayout button_layout = {
{
META_BUTTON_FUNCTION_MENU,
@@ -88,6 +99,7 @@ static MetaButtonLayout button_layout = {
}
};
/* The screenshot commands are at the end */
static char *commands[MAX_COMMANDS] = { NULL, };
static char *workspace_names[MAX_REASONABLE_WORKSPACES] = { NULL, };
@@ -98,6 +110,8 @@ static gboolean update_titlebar_font (const char *value);
static gboolean update_mouse_button_mods (const char *value);
static gboolean update_focus_mode (const char *value);
static gboolean update_theme (const char *value);
static gboolean update_visual_bell (gboolean v1, gboolean v2);
static gboolean update_visual_bell_type (const char *value);
static gboolean update_num_workspaces (int value);
static gboolean update_application_based (gboolean value);
static gboolean update_disable_workarounds (gboolean value);
@@ -273,7 +287,7 @@ meta_prefs_init (void)
GError *err = NULL;
char *str_val;
int int_val;
gboolean bool_val;
gboolean bool_val, bool_val_2;
if (default_client != NULL)
return;
@@ -360,6 +374,20 @@ meta_prefs_init (void)
g_free (str_val);
#endif /* HAVE_GCONF */
bool_val = gconf_client_get_bool (default_client, KEY_VISUAL_BELL,
&err);
cleanup_error (&err);
bool_val_2 = gconf_client_get_bool (default_client, KEY_AUDIBLE_BELL,
&err);
cleanup_error (&err);
update_visual_bell (bool_val, bool_val_2);
str_val = gconf_client_get_string (default_client, KEY_VISUAL_BELL_TYPE,
&err);
cleanup_error (&err);
update_visual_bell_type (str_val);
g_free (str_val);
/* Load keybindings prefs */
init_bindings ();
@@ -375,7 +403,7 @@ meta_prefs_init (void)
NULL,
NULL,
&err);
cleanup_error (&err);
cleanup_error (&err);
#endif /* HAVE_GCONF */
}
@@ -674,6 +702,37 @@ change_notify (GConfClient *client,
if (update_button_layout (str))
queue_changed (META_PREF_BUTTON_LAYOUT);
}
else if (strcmp (key, KEY_VISUAL_BELL) == 0)
{
gboolean b;
b = value ? gconf_value_get_bool (value) : provide_visual_bell;
if (update_visual_bell (b, bell_is_audible))
queue_changed (META_PREF_VISUAL_BELL);
}
else if (strcmp (key, KEY_AUDIBLE_BELL) == 0)
{
gboolean b;
b = value ? gconf_value_get_bool (value) : bell_is_audible;
if (update_visual_bell (provide_visual_bell, b))
queue_changed (META_PREF_AUDIBLE_BELL);
}
else if (strcmp (key, KEY_VISUAL_BELL_TYPE) == 0)
{
const char * str;
if (value && value->type != GCONF_VALUE_STRING)
{
meta_warning (_("GConf key \"%s\" is set to an invalid type\n"),
KEY_VISUAL_BELL_TYPE);
goto out;
}
str = value ? gconf_value_get_string (value) : NULL;
if (update_visual_bell_type (str))
queue_changed (META_PREF_VISUAL_BELL_TYPE);
}
else
{
meta_topic (META_DEBUG_PREFS, "Key %s doesn't mean anything to Metacity\n",
@@ -803,8 +862,51 @@ update_use_system_font (gboolean value)
return old != value;
}
static MetaVisualBellType
visual_bell_type_from_string (const char *value)
{
if (value)
{
if (!strcmp (value, "fullscreen"))
{
return META_VISUAL_BELL_FULLSCREEN_FLASH;
}
else if (!strcmp (value, "frame_flash"))
{
return META_VISUAL_BELL_FRAME_FLASH;
}
}
return META_VISUAL_BELL_FULLSCREEN_FLASH;
}
static gboolean
update_visual_bell_type (const char *value)
{
MetaVisualBellType old_bell_type;
old_bell_type = visual_bell_type;
visual_bell_type = visual_bell_type_from_string (value);
return (visual_bell_type != old_bell_type);
}
#endif /* HAVE_GCONF */
static gboolean
update_visual_bell (gboolean visual_bell, gboolean audible_bell)
{
gboolean old_visual = provide_visual_bell;
gboolean old_audible = bell_is_audible;
gboolean has_changed;
provide_visual_bell = visual_bell;
bell_is_audible = audible_bell;
has_changed = (old_visual != provide_visual_bell) ||
(old_audible != bell_is_audible);
return has_changed;
}
#ifdef HAVE_GCONF
static gboolean
update_titlebar_font (const char *value)
@@ -1191,6 +1293,18 @@ meta_preference_to_string (MetaPreference pref)
case META_PREF_WORKSPACE_NAMES:
return "WORKSPACE_NAMES";
break;
case META_PREF_VISUAL_BELL:
return "VISUAL_BELL";
break;
case META_PREF_AUDIBLE_BELL:
return "AUDIBLE_BELL";
break;
case META_PREF_VISUAL_BELL_TYPE:
return "VISUAL_BELL_TYPE";
break;
}
return "(unknown)";
@@ -1229,100 +1343,105 @@ meta_prefs_set_num_workspaces (int n_workspaces)
/* Indexes must correspond to MetaKeybindingAction */
static MetaKeyPref screen_bindings[] = {
{ META_KEYBINDING_WORKSPACE_1, 0, 0 },
{ META_KEYBINDING_WORKSPACE_2, 0, 0 },
{ META_KEYBINDING_WORKSPACE_3, 0, 0 },
{ META_KEYBINDING_WORKSPACE_4, 0, 0 },
{ META_KEYBINDING_WORKSPACE_5, 0, 0 },
{ META_KEYBINDING_WORKSPACE_6, 0, 0 },
{ META_KEYBINDING_WORKSPACE_7, 0, 0 },
{ META_KEYBINDING_WORKSPACE_8, 0, 0 },
{ META_KEYBINDING_WORKSPACE_9, 0, 0 },
{ META_KEYBINDING_WORKSPACE_10, 0, 0 },
{ META_KEYBINDING_WORKSPACE_11, 0, 0 },
{ META_KEYBINDING_WORKSPACE_12, 0, 0 },
{ META_KEYBINDING_WORKSPACE_LEFT, 0, 0 },
{ META_KEYBINDING_WORKSPACE_RIGHT, 0, 0 },
{ META_KEYBINDING_WORKSPACE_UP, 0, 0 },
{ META_KEYBINDING_WORKSPACE_DOWN, 0, 0 },
{ META_KEYBINDING_SWITCH_WINDOWS, 0, 0 },
{ META_KEYBINDING_SWITCH_WINDOWS_BACKWARD, 0, 0 },
{ META_KEYBINDING_SWITCH_PANELS, 0, 0 },
{ META_KEYBINDING_SWITCH_PANELS_BACKWARD, 0, 0 },
{ META_KEYBINDING_CYCLE_WINDOWS, 0, 0 },
{ META_KEYBINDING_CYCLE_WINDOWS_BACKWARD, 0, 0 },
{ META_KEYBINDING_CYCLE_PANELS, 0, 0 },
{ META_KEYBINDING_CYCLE_PANELS_BACKWARD, 0, 0 },
{ META_KEYBINDING_SHOW_DESKTOP, 0, 0 },
{ META_KEYBINDING_COMMAND_1, 0, 0 },
{ META_KEYBINDING_COMMAND_2, 0, 0 },
{ META_KEYBINDING_COMMAND_3, 0, 0 },
{ META_KEYBINDING_COMMAND_4, 0, 0 },
{ META_KEYBINDING_COMMAND_5, 0, 0 },
{ META_KEYBINDING_COMMAND_6, 0, 0 },
{ META_KEYBINDING_COMMAND_7, 0, 0 },
{ META_KEYBINDING_COMMAND_8, 0, 0 },
{ META_KEYBINDING_COMMAND_9, 0, 0 },
{ META_KEYBINDING_COMMAND_10, 0, 0 },
{ META_KEYBINDING_COMMAND_11, 0, 0 },
{ META_KEYBINDING_COMMAND_12, 0, 0 },
{ META_KEYBINDING_COMMAND_13, 0, 0 },
{ META_KEYBINDING_COMMAND_14, 0, 0 },
{ META_KEYBINDING_COMMAND_15, 0, 0 },
{ META_KEYBINDING_COMMAND_16, 0, 0 },
{ META_KEYBINDING_COMMAND_17, 0, 0 },
{ META_KEYBINDING_COMMAND_18, 0, 0 },
{ META_KEYBINDING_COMMAND_19, 0, 0 },
{ META_KEYBINDING_COMMAND_20, 0, 0 },
{ META_KEYBINDING_COMMAND_21, 0, 0 },
{ META_KEYBINDING_COMMAND_22, 0, 0 },
{ META_KEYBINDING_COMMAND_23, 0, 0 },
{ META_KEYBINDING_COMMAND_24, 0, 0 },
{ META_KEYBINDING_COMMAND_25, 0, 0 },
{ META_KEYBINDING_COMMAND_26, 0, 0 },
{ META_KEYBINDING_COMMAND_27, 0, 0 },
{ META_KEYBINDING_COMMAND_28, 0, 0 },
{ META_KEYBINDING_COMMAND_29, 0, 0 },
{ META_KEYBINDING_COMMAND_30, 0, 0 },
{ META_KEYBINDING_COMMAND_31, 0, 0 },
{ META_KEYBINDING_COMMAND_32, 0, 0 },
{ NULL, 0, 0 }
{ META_KEYBINDING_WORKSPACE_1, 0, 0, FALSE },
{ META_KEYBINDING_WORKSPACE_2, 0, 0, FALSE },
{ META_KEYBINDING_WORKSPACE_3, 0, 0, FALSE },
{ META_KEYBINDING_WORKSPACE_4, 0, 0, FALSE },
{ META_KEYBINDING_WORKSPACE_5, 0, 0, FALSE },
{ META_KEYBINDING_WORKSPACE_6, 0, 0, FALSE },
{ META_KEYBINDING_WORKSPACE_7, 0, 0, FALSE },
{ META_KEYBINDING_WORKSPACE_8, 0, 0, FALSE },
{ META_KEYBINDING_WORKSPACE_9, 0, 0, FALSE },
{ META_KEYBINDING_WORKSPACE_10, 0, 0, FALSE },
{ META_KEYBINDING_WORKSPACE_11, 0, 0, FALSE },
{ META_KEYBINDING_WORKSPACE_12, 0, 0, FALSE },
{ META_KEYBINDING_WORKSPACE_LEFT, 0, 0, FALSE },
{ META_KEYBINDING_WORKSPACE_RIGHT, 0, 0, FALSE },
{ META_KEYBINDING_WORKSPACE_UP, 0, 0, FALSE },
{ META_KEYBINDING_WORKSPACE_DOWN, 0, 0, FALSE },
{ META_KEYBINDING_SWITCH_WINDOWS, 0, 0, TRUE },
{ META_KEYBINDING_SWITCH_WINDOWS_BACKWARD, 0, 0, TRUE },
{ META_KEYBINDING_SWITCH_PANELS, 0, 0, TRUE },
{ META_KEYBINDING_SWITCH_PANELS_BACKWARD, 0, 0, TRUE },
{ META_KEYBINDING_CYCLE_WINDOWS, 0, 0, TRUE },
{ META_KEYBINDING_CYCLE_WINDOWS_BACKWARD, 0, 0, TRUE },
{ META_KEYBINDING_CYCLE_PANELS, 0, 0, TRUE },
{ META_KEYBINDING_CYCLE_PANELS_BACKWARD, 0, 0, TRUE },
{ META_KEYBINDING_SHOW_DESKTOP, 0, 0, FALSE },
{ META_KEYBINDING_PANEL_MAIN_MENU, 0, 0, FALSE },
{ META_KEYBINDING_PANEL_RUN_DIALOG, 0, 0, FALSE },
{ META_KEYBINDING_COMMAND_1, 0, 0, FALSE },
{ META_KEYBINDING_COMMAND_2, 0, 0, FALSE },
{ META_KEYBINDING_COMMAND_3, 0, 0, FALSE },
{ META_KEYBINDING_COMMAND_4, 0, 0, FALSE },
{ META_KEYBINDING_COMMAND_5, 0, 0, FALSE },
{ META_KEYBINDING_COMMAND_6, 0, 0, FALSE },
{ META_KEYBINDING_COMMAND_7, 0, 0, FALSE },
{ META_KEYBINDING_COMMAND_8, 0, 0, FALSE },
{ META_KEYBINDING_COMMAND_9, 0, 0, FALSE },
{ META_KEYBINDING_COMMAND_10, 0, 0, FALSE },
{ META_KEYBINDING_COMMAND_11, 0, 0, FALSE },
{ META_KEYBINDING_COMMAND_12, 0, 0, FALSE },
{ META_KEYBINDING_COMMAND_13, 0, 0, FALSE },
{ META_KEYBINDING_COMMAND_14, 0, 0, FALSE },
{ META_KEYBINDING_COMMAND_15, 0, 0, FALSE },
{ META_KEYBINDING_COMMAND_16, 0, 0, FALSE },
{ META_KEYBINDING_COMMAND_17, 0, 0, FALSE },
{ META_KEYBINDING_COMMAND_18, 0, 0, FALSE },
{ META_KEYBINDING_COMMAND_19, 0, 0, FALSE },
{ META_KEYBINDING_COMMAND_20, 0, 0, FALSE },
{ META_KEYBINDING_COMMAND_21, 0, 0, FALSE },
{ META_KEYBINDING_COMMAND_22, 0, 0, FALSE },
{ META_KEYBINDING_COMMAND_23, 0, 0, FALSE },
{ META_KEYBINDING_COMMAND_24, 0, 0, FALSE },
{ META_KEYBINDING_COMMAND_25, 0, 0, FALSE },
{ META_KEYBINDING_COMMAND_26, 0, 0, FALSE },
{ META_KEYBINDING_COMMAND_27, 0, 0, FALSE },
{ META_KEYBINDING_COMMAND_28, 0, 0, FALSE },
{ META_KEYBINDING_COMMAND_29, 0, 0, FALSE },
{ META_KEYBINDING_COMMAND_30, 0, 0, FALSE },
{ META_KEYBINDING_COMMAND_31, 0, 0, FALSE },
{ META_KEYBINDING_COMMAND_32, 0, 0, FALSE },
{ META_KEYBINDING_COMMAND_SCREENSHOT, 0, 0, FALSE },
{ META_KEYBINDING_COMMAND_WIN_SCREENSHOT, 0, 0, FALSE },
{ NULL, 0, 0, FALSE}
};
static MetaKeyPref window_bindings[] = {
{ META_KEYBINDING_WINDOW_MENU, 0, 0 },
{ META_KEYBINDING_TOGGLE_FULLSCREEN, 0, 0 },
{ META_KEYBINDING_TOGGLE_MAXIMIZE, 0, 0 },
{ META_KEYBINDING_MAXIMIZE, 0, 0 },
{ META_KEYBINDING_UNMAXIMIZE, 0, 0 },
{ META_KEYBINDING_TOGGLE_SHADE, 0, 0 },
{ META_KEYBINDING_MINIMIZE, 0, 0 },
{ META_KEYBINDING_CLOSE, 0, 0 },
{ META_KEYBINDING_BEGIN_MOVE, 0, 0 },
{ META_KEYBINDING_BEGIN_RESIZE, 0, 0 },
{ META_KEYBINDING_TOGGLE_STICKY, 0, 0 },
{ META_KEYBINDING_MOVE_WORKSPACE_1, 0, 0 },
{ META_KEYBINDING_MOVE_WORKSPACE_2, 0, 0 },
{ META_KEYBINDING_MOVE_WORKSPACE_3, 0, 0 },
{ META_KEYBINDING_MOVE_WORKSPACE_4, 0, 0 },
{ META_KEYBINDING_MOVE_WORKSPACE_5, 0, 0 },
{ META_KEYBINDING_MOVE_WORKSPACE_6, 0, 0 },
{ META_KEYBINDING_MOVE_WORKSPACE_7, 0, 0 },
{ META_KEYBINDING_MOVE_WORKSPACE_8, 0, 0 },
{ META_KEYBINDING_MOVE_WORKSPACE_9, 0, 0 },
{ META_KEYBINDING_MOVE_WORKSPACE_10, 0, 0 },
{ META_KEYBINDING_MOVE_WORKSPACE_11, 0, 0 },
{ META_KEYBINDING_MOVE_WORKSPACE_12, 0, 0 },
{ META_KEYBINDING_MOVE_WORKSPACE_LEFT, 0, 0 },
{ META_KEYBINDING_MOVE_WORKSPACE_RIGHT, 0, 0 },
{ META_KEYBINDING_MOVE_WORKSPACE_UP, 0, 0 },
{ META_KEYBINDING_MOVE_WORKSPACE_DOWN, 0, 0 },
{ META_KEYBINDING_RAISE_OR_LOWER, 0, 0 },
{ META_KEYBINDING_RAISE, 0, 0 },
{ META_KEYBINDING_LOWER, 0, 0 },
{ META_KEYBINDING_MAXIMIZE_VERTICALLY, 0, 0 },
{ META_KEYBINDING_MAXIMIZE_HORIZONTALLY, 0, 0 },
{ NULL, 0, 0 }
{ META_KEYBINDING_WINDOW_MENU, 0, 0, FALSE },
{ META_KEYBINDING_TOGGLE_FULLSCREEN, 0, 0, FALSE },
{ META_KEYBINDING_TOGGLE_MAXIMIZE, 0, 0, FALSE },
{ META_KEYBINDING_TOGGLE_ABOVE, 0, 0, FALSE },
{ META_KEYBINDING_MAXIMIZE, 0, 0, FALSE },
{ META_KEYBINDING_UNMAXIMIZE, 0, 0, FALSE },
{ META_KEYBINDING_TOGGLE_SHADE, 0, 0, FALSE },
{ META_KEYBINDING_MINIMIZE, 0, 0, FALSE },
{ META_KEYBINDING_CLOSE, 0, 0, FALSE },
{ META_KEYBINDING_BEGIN_MOVE, 0, 0, FALSE },
{ META_KEYBINDING_BEGIN_RESIZE, 0, 0, FALSE },
{ META_KEYBINDING_TOGGLE_STICKY, 0, 0, FALSE },
{ META_KEYBINDING_MOVE_WORKSPACE_1, 0, 0, FALSE },
{ META_KEYBINDING_MOVE_WORKSPACE_2, 0, 0, FALSE },
{ META_KEYBINDING_MOVE_WORKSPACE_3, 0, 0, FALSE },
{ META_KEYBINDING_MOVE_WORKSPACE_4, 0, 0, FALSE },
{ META_KEYBINDING_MOVE_WORKSPACE_5, 0, 0, FALSE },
{ META_KEYBINDING_MOVE_WORKSPACE_6, 0, 0, FALSE },
{ META_KEYBINDING_MOVE_WORKSPACE_7, 0, 0, FALSE },
{ META_KEYBINDING_MOVE_WORKSPACE_8, 0, 0, FALSE },
{ META_KEYBINDING_MOVE_WORKSPACE_9, 0, 0, FALSE },
{ META_KEYBINDING_MOVE_WORKSPACE_10, 0, 0, FALSE },
{ META_KEYBINDING_MOVE_WORKSPACE_11, 0, 0, FALSE },
{ META_KEYBINDING_MOVE_WORKSPACE_12, 0, 0, FALSE },
{ META_KEYBINDING_MOVE_WORKSPACE_LEFT, 0, 0, FALSE },
{ META_KEYBINDING_MOVE_WORKSPACE_RIGHT, 0, 0, FALSE },
{ META_KEYBINDING_MOVE_WORKSPACE_UP, 0, 0, FALSE },
{ META_KEYBINDING_MOVE_WORKSPACE_DOWN, 0, 0, FALSE },
{ META_KEYBINDING_RAISE_OR_LOWER, 0, 0, FALSE },
{ META_KEYBINDING_RAISE, 0, 0, FALSE },
{ META_KEYBINDING_LOWER, 0, 0, FALSE },
{ META_KEYBINDING_MAXIMIZE_VERTICALLY, 0, 0, FALSE },
{ META_KEYBINDING_MAXIMIZE_HORIZONTALLY, 0, 0, FALSE },
{ NULL, 0, 0, FALSE }
};
static void
@@ -1554,15 +1673,31 @@ update_command (const char *name,
++p;
if (!g_ascii_isdigit (*p))
if (g_ascii_isdigit (*p))
{
meta_topic (META_DEBUG_KEYBINDINGS,
"Command %s doesn't end in number?\n", name);
return FALSE;
i = atoi (p);
i -= 1; /* count from 0 not 1 */
}
else
{
p = strrchr (name, '/');
++p;
if (strcmp (p, "command_screenshot") == 0)
{
i = SCREENSHOT_COMMAND_IDX;
}
else if (strcmp (p, "command_window_screenshot") == 0)
{
i = WIN_SCREENSHOT_COMMAND_IDX;
}
else
{
meta_topic (META_DEBUG_KEYBINDINGS,
"Command %s doesn't end in number?\n", name);
return FALSE;
}
}
i = atoi (p);
i -= 1; /* count from 0 not 1 */
if (i >= MAX_COMMANDS)
{
@@ -1602,8 +1737,19 @@ char*
meta_prefs_get_gconf_key_for_command (int i)
{
char *key;
key = g_strdup_printf (KEY_COMMAND_PREFIX"%d", i + 1);
switch (i)
{
case SCREENSHOT_COMMAND_IDX:
key = g_strdup (KEY_COMMAND_PREFIX "screenshot");
break;
case WIN_SCREENSHOT_COMMAND_IDX:
key = g_strdup (KEY_COMMAND_PREFIX "window_screenshot");
break;
default:
key = g_strdup_printf (KEY_COMMAND_PREFIX"%d", i + 1);
break;
}
return key;
}
@@ -1775,6 +1921,24 @@ meta_prefs_get_button_layout (MetaButtonLayout *button_layout_p)
*button_layout_p = button_layout;
}
gboolean
meta_prefs_get_visual_bell ()
{
return provide_visual_bell;
}
gboolean
meta_prefs_bell_is_audible ()
{
return bell_is_audible;
}
MetaVisualBellType
meta_prefs_get_visual_bell_type ()
{
return visual_bell_type;
}
void
meta_prefs_get_screen_bindings (const MetaKeyPref **bindings,
int *n_bindings)

View File

@@ -42,7 +42,10 @@ typedef enum
META_PREF_DISABLE_WORKAROUNDS,
META_PREF_COMMANDS,
META_PREF_BUTTON_LAYOUT,
META_PREF_WORKSPACE_NAMES
META_PREF_WORKSPACE_NAMES,
META_PREF_VISUAL_BELL,
META_PREF_AUDIBLE_BELL,
META_PREF_VISUAL_BELL_TYPE
} MetaPreference;
typedef void (* MetaPrefsChangedFunc) (MetaPreference pref,
@@ -106,6 +109,8 @@ void meta_prefs_change_workspace_name (int i,
#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"
@@ -138,11 +143,14 @@ void meta_prefs_change_workspace_name (int i,
#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_TOGGLE_ABOVE "toggle_above"
#define META_KEYBINDING_MAXIMIZE "maximize"
#define META_KEYBINDING_UNMAXIMIZE "unmaximize"
#define META_KEYBINDING_TOGGLE_SHADE "toggle_shaded"
@@ -201,6 +209,8 @@ typedef enum _MetaKeyBindingAction
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,
@@ -220,6 +230,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,
@@ -233,6 +245,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

@@ -92,11 +92,10 @@ ensure_size_window (MetaResizePopup *popup)
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),

View File

@@ -2,9 +2,10 @@
/*
* Copyright (C) 2001, 2002 Havoc Pennington
* Copyright (C) 2002 Red Hat Inc.
* Copyright (C) 2002, 2003 Red Hat Inc.
* Some ICCCM manager selection code derived from fvwm2,
* Copyright (C) 2001 Dominik Vogt, Matthias Clasen, and fvwm2 team
* 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
@@ -51,7 +52,7 @@ static char* get_screen_name (MetaDisplay *display,
static void update_num_workspaces (MetaScreen *screen);
static void update_focus_mode (MetaScreen *screen);
static void update_workspace_names (MetaScreen *screen);
static void set_workspace_names (MetaScreen *screen);
static void prefs_changed_callback (MetaPreference pref,
gpointer data);
@@ -74,24 +75,13 @@ set_wm_check_hint (MetaScreen *screen)
XA_WINDOW,
32, PropModeReplace, (guchar*) data, 1);
/* Legacy GNOME hint (uses cardinal, dunno why) */
/* do this after setting up window fully, to avoid races
* with clients listening to property notify on root.
*/
XChangeProperty (screen->display->xdisplay, screen->xroot,
screen->display->atom_win_supporting_wm_check,
XA_CARDINAL,
32, PropModeReplace, (guchar*) data, 1);
return Success;
}
static int
set_supported_hint (MetaScreen *screen)
{
#define N_SUPPORTED 45
#define N_WIN_SUPPORTED 1
#define N_SUPPORTED 49
Atom atoms[N_SUPPORTED];
atoms[0] = screen->display->atom_net_wm_name;
@@ -115,43 +105,39 @@ set_supported_hint (MetaScreen *screen)
atoms[18] = screen->display->atom_net_client_list_stacking;
atoms[19] = screen->display->atom_net_wm_state_skip_taskbar;
atoms[20] = screen->display->atom_net_wm_state_skip_pager;
atoms[21] = screen->display->atom_net_wm_icon;
atoms[22] = screen->display->atom_net_wm_moveresize;
atoms[23] = screen->display->atom_net_wm_state_hidden;
atoms[24] = screen->display->atom_net_wm_window_type_utility;
atoms[25] = screen->display->atom_net_wm_window_type_splash;
atoms[26] = screen->display->atom_net_wm_state_fullscreen;
atoms[27] = screen->display->atom_net_wm_ping;
atoms[28] = screen->display->atom_net_active_window;
atoms[29] = screen->display->atom_net_workarea;
atoms[30] = screen->display->atom_net_showing_desktop;
atoms[31] = screen->display->atom_net_desktop_layout;
atoms[32] = screen->display->atom_net_desktop_names;
atoms[33] = screen->display->atom_net_wm_allowed_actions;
atoms[34] = screen->display->atom_net_wm_action_move;
atoms[35] = screen->display->atom_net_wm_action_resize;
atoms[36] = screen->display->atom_net_wm_action_shade;
atoms[37] = screen->display->atom_net_wm_action_stick;
atoms[38] = screen->display->atom_net_wm_action_maximize_horz;
atoms[39] = screen->display->atom_net_wm_action_maximize_vert;
atoms[40] = screen->display->atom_net_wm_action_change_desktop;
atoms[41] = screen->display->atom_net_wm_action_close;
atoms[42] = screen->display->atom_net_wm_state_above;
atoms[43] = screen->display->atom_net_wm_state_below;
atoms[44] = screen->display->atom_net_startup_id;
atoms[21] = screen->display->atom_net_wm_icon_name;
atoms[22] = screen->display->atom_net_wm_icon;
atoms[23] = screen->display->atom_net_wm_icon_geometry;
atoms[24] = screen->display->atom_net_wm_moveresize;
atoms[25] = screen->display->atom_net_active_window;
atoms[26] = screen->display->atom_net_wm_strut;
atoms[27] = screen->display->atom_net_wm_state_hidden;
atoms[28] = screen->display->atom_net_wm_window_type_utility;
atoms[29] = screen->display->atom_net_wm_window_type_splash;
atoms[30] = screen->display->atom_net_wm_state_fullscreen;
atoms[31] = screen->display->atom_net_wm_ping;
atoms[32] = screen->display->atom_net_wm_pid;
atoms[33] = screen->display->atom_net_workarea;
atoms[34] = screen->display->atom_net_showing_desktop;
atoms[35] = screen->display->atom_net_desktop_layout;
atoms[36] = screen->display->atom_net_desktop_names;
atoms[37] = screen->display->atom_net_wm_allowed_actions;
atoms[38] = screen->display->atom_net_wm_action_move;
atoms[39] = screen->display->atom_net_wm_action_resize;
atoms[40] = screen->display->atom_net_wm_action_shade;
atoms[41] = screen->display->atom_net_wm_action_stick;
atoms[42] = screen->display->atom_net_wm_action_maximize_horz;
atoms[43] = screen->display->atom_net_wm_action_maximize_vert;
atoms[44] = screen->display->atom_net_wm_action_change_desktop;
atoms[45] = screen->display->atom_net_wm_action_close;
atoms[46] = screen->display->atom_net_wm_state_above;
atoms[47] = screen->display->atom_net_wm_state_below;
atoms[48] = screen->display->atom_net_startup_id;
XChangeProperty (screen->display->xdisplay, screen->xroot,
screen->display->atom_net_supported,
XA_ATOM,
32, PropModeReplace, (guchar*) atoms, N_SUPPORTED);
/* Set legacy GNOME hints */
atoms[0] = screen->display->atom_win_layer;
XChangeProperty (screen->display->xdisplay, screen->xroot,
screen->display->atom_win_protocols,
XA_ATOM,
32, PropModeReplace, (guchar*) atoms, N_WIN_SUPPORTED);
return Success;
#undef N_SUPPORTED
@@ -352,6 +338,20 @@ reload_xinerama_infos (MetaScreen *screen)
g_assert (screen->n_xinerama_infos > 0);
g_assert (screen->xinerama_infos != NULL);
{
GList *tmp;
tmp = screen->workspaces;
while (tmp != NULL)
{
MetaWorkspace *space = tmp->data;
meta_workspace_invalidate_work_area (space);
tmp = tmp->next;
}
}
}
MetaScreen*
@@ -496,7 +496,6 @@ meta_screen_new (MetaDisplay *display,
SubstructureRedirectMask | SubstructureNotifyMask |
ColormapChangeMask | PropertyChangeMask |
LeaveWindowMask | EnterWindowMask |
ButtonPressMask | ButtonReleaseMask |
KeyPressMask | KeyReleaseMask |
FocusChangeMask | StructureNotifyMask |
attr.your_event_mask);
@@ -523,6 +522,7 @@ meta_screen_new (MetaDisplay *display,
screen->current_cursor = -1; /* invalid/unset */
screen->default_xvisual = DefaultVisualOfScreen (screen->xscreen);
screen->default_depth = DefaultDepthOfScreen (screen->xscreen);
screen->flash_window = None;
screen->wm_sn_selection_window = new_wm_sn_owner;
screen->wm_sn_atom = wm_sn_atom;
@@ -568,7 +568,6 @@ meta_screen_new (MetaDisplay *display,
set_wm_check_hint (screen);
meta_screen_update_workspace_layout (screen);
meta_screen_update_workspace_names (screen);
/* Get current workspace */
current_workspace = 0;
@@ -587,6 +586,8 @@ meta_screen_new (MetaDisplay *display,
meta_workspace_activate (meta_workspace_new (screen));
update_num_workspaces (screen);
set_workspace_names (screen);
screen->all_keys_grabbed = FALSE;
screen->keys_grabbed = FALSE;
meta_screen_grab_keys (screen);
@@ -754,7 +755,7 @@ prefs_changed_callback (MetaPreference pref,
}
else if (pref == META_PREF_WORKSPACE_NAMES)
{
update_workspace_names (screen);
set_workspace_names (screen);
}
}
@@ -1036,8 +1037,8 @@ meta_screen_ensure_tab_popup (MetaScreen *screen,
MetaTabList type)
{
MetaTabEntry *entries;
GSList *tab_list;
GSList *tmp;
GList *tab_list;
GList *tmp;
int len;
int i;
@@ -1049,7 +1050,7 @@ meta_screen_ensure_tab_popup (MetaScreen *screen,
screen,
screen->active_workspace);
len = g_slist_length (tab_list);
len = g_list_length (tab_list);
entries = g_new (MetaTabEntry, len + 1);
entries[len].key = NULL;
@@ -1116,7 +1117,7 @@ meta_screen_ensure_tab_popup (MetaScreen *screen,
TRUE);
g_free (entries);
g_slist_free (tab_list);
g_list_free (tab_list);
/* don't show tab popup, since proper window isn't selected yet */
}
@@ -1187,26 +1188,43 @@ meta_screen_ensure_workspace_popup (MetaScreen *screen)
/* don't show tab popup, since proper space isn't selected yet */
}
/* Focus top window on active workspace */
void
meta_screen_focus_top_window (MetaScreen *screen,
MetaWindow *not_this_one)
meta_screen_focus_mouse_window (MetaScreen *screen,
MetaWindow *not_this_one)
{
MetaWindow *window;
Window root_return, child_return;
int root_x_return, root_y_return;
int win_x_return, win_y_return;
unsigned int mask_return;
if (not_this_one)
meta_topic (META_DEBUG_FOCUS,
"Focusing top window excluding %s\n", not_this_one->desc);
window = meta_stack_get_default_focus_window (screen->stack,
screen->active_workspace,
not_this_one);
"Focusing mouse window excluding %s\n", not_this_one->desc);
meta_error_trap_push (screen->display);
XQueryPointer (screen->display->xdisplay,
screen->xroot,
&root_return,
&child_return,
&root_x_return,
&root_y_return,
&win_x_return,
&win_y_return,
&mask_return);
meta_error_trap_pop (screen->display, TRUE);
window = meta_stack_get_default_focus_window_at_point (screen->stack,
screen->active_workspace,
not_this_one,
root_x_return,
root_y_return);
/* FIXME I'm a loser on the CurrentTime front */
if (window)
{
meta_topic (META_DEBUG_FOCUS,
"Focusing top window %s\n", window->desc);
"Focusing mouse window %s\n", window->desc);
meta_window_focus (window, meta_display_get_current_time (screen->display));
@@ -1216,23 +1234,20 @@ meta_screen_focus_top_window (MetaScreen *screen,
}
else
{
meta_topic (META_DEBUG_FOCUS, "No top window to focus found\n");
meta_topic (META_DEBUG_FOCUS, "No mouse window to focus found\n");
}
}
const MetaXineramaScreenInfo*
meta_screen_get_xinerama_for_window (MetaScreen *screen,
MetaWindow *window)
meta_screen_get_xinerama_for_rect (MetaScreen *screen,
MetaRectangle *rect)
{
int i;
int best_xinerama, xinerama_score;
MetaRectangle window_rect;
if (screen->n_xinerama_infos == 1)
return &screen->xinerama_infos[0];
meta_window_get_outer_rect (window, &window_rect);
best_xinerama = 0;
xinerama_score = 0;
@@ -1246,7 +1261,7 @@ meta_screen_get_xinerama_for_window (MetaScreen *screen,
screen_info.width = screen->xinerama_infos[i].width;
screen_info.height = screen->xinerama_infos[i].height;
if (meta_rectangle_intersect (&screen_info, &window_rect, &dest))
if (meta_rectangle_intersect (&screen_info, rect, &dest))
{
if (dest.width * dest.height > xinerama_score)
{
@@ -1254,19 +1269,180 @@ meta_screen_get_xinerama_for_window (MetaScreen *screen,
best_xinerama = i;
}
}
++i;
}
return &screen->xinerama_infos[best_xinerama];
}
const MetaXineramaScreenInfo*
meta_screen_get_xinerama_for_window (MetaScreen *screen,
MetaWindow *window)
{
MetaRectangle window_rect;
meta_window_get_outer_rect (window, &window_rect);
return meta_screen_get_xinerama_for_rect (screen, &window_rect);
}
const MetaXineramaScreenInfo*
meta_screen_get_xinerama_neighbor (MetaScreen *screen,
int which_xinerama,
MetaScreenDirection direction)
{
MetaXineramaScreenInfo* input = screen->xinerama_infos + which_xinerama;
MetaXineramaScreenInfo* current;
int i;
for (i = 0; i < screen->n_xinerama_infos; i++)
{
current = screen->xinerama_infos + i;
if (((direction == META_SCREEN_RIGHT) &&
(current->x_origin == input->x_origin + input->width) &&
(current->y_origin >= input->y_origin) &&
(current->y_origin <= input->y_origin+input->height)) ||
((direction == META_SCREEN_LEFT) &&
(input->x_origin == current->x_origin + current->width) &&
(current->y_origin >= input->y_origin) &&
(current->y_origin <= input->y_origin + input->height)) ||
((direction == META_SCREEN_UP) &&
(input->y_origin == current->y_origin + current->height) &&
(current->x_origin >= input->x_origin) &&
(current->x_origin <= input->x_origin + input->width)) ||
((direction == META_SCREEN_DOWN) &&
(current->y_origin == input->y_origin + input->height) &&
(current->x_origin >= input->x_origin) &&
(current->x_origin <= input->x_origin + input->width)))
{
return current;
}
}
return NULL;
}
void
meta_screen_get_natural_xinerama_list (MetaScreen *screen,
int** xineramas_list,
int* n_xineramas)
{
const MetaXineramaScreenInfo* current;
const MetaXineramaScreenInfo* tmp;
GQueue* xinerama_queue;
int* visited;
int cur = 0;
int i;
*n_xineramas = screen->n_xinerama_infos;
*xineramas_list = g_new (int, screen->n_xinerama_infos);
/* we calculate a natural ordering by which to choose xineramas for
* window placement. We start at the current xinerama, and perform
* a breadth-first search of the xineramas starting from that
* xinerama. We choose preferentially left, then right, then down,
* then up. The visitation order produced by this traversal is the
* natural xinerama ordering.
*/
visited = g_new (int, screen->n_xinerama_infos);
for (i = 0; i < screen->n_xinerama_infos; i++)
{
visited[i] = FALSE;
}
current = meta_screen_get_current_xinerama (screen);
xinerama_queue = g_queue_new ();
g_queue_push_tail (xinerama_queue, (gpointer) current);
visited[current->number] = TRUE;
while (!g_queue_is_empty (xinerama_queue))
{
current = (const MetaXineramaScreenInfo*)
g_queue_pop_head (xinerama_queue);
(*xineramas_list)[cur++] = current->number;
/* enqueue each of the directions */
tmp = meta_screen_get_xinerama_neighbor (screen,
current->number,
META_SCREEN_LEFT);
if (tmp && !visited[tmp->number])
{
g_queue_push_tail (xinerama_queue,
(MetaXineramaScreenInfo*) tmp);
visited[tmp->number] = TRUE;
}
tmp = meta_screen_get_xinerama_neighbor (screen,
current->number,
META_SCREEN_RIGHT);
if (tmp && !visited[tmp->number])
{
g_queue_push_tail (xinerama_queue,
(MetaXineramaScreenInfo*) tmp);
visited[tmp->number] = TRUE;
}
tmp = meta_screen_get_xinerama_neighbor (screen,
current->number,
META_SCREEN_UP);
if (tmp && !visited[tmp->number])
{
g_queue_push_tail (xinerama_queue,
(MetaXineramaScreenInfo*) tmp);
visited[tmp->number] = TRUE;
}
tmp = meta_screen_get_xinerama_neighbor (screen,
current->number,
META_SCREEN_DOWN);
if (tmp && !visited[tmp->number])
{
g_queue_push_tail (xinerama_queue,
(MetaXineramaScreenInfo*) tmp);
visited[tmp->number] = TRUE;
}
}
/* in case we somehow missed some set of xineramas, go through the
* visited list and add in any xineramas that were missed
*/
for (i = 0; i < screen->n_xinerama_infos; i++)
{
if (visited[i] == FALSE)
{
(*xineramas_list)[cur++] = i;
}
}
g_free (visited);
g_queue_free (xinerama_queue);
}
gboolean
meta_screen_rect_intersects_xinerama (MetaScreen *screen,
MetaRectangle *rect,
int which_xinerama)
{
MetaRectangle dest, screen_rect;
screen_rect.x = screen->xinerama_infos[which_xinerama].x_origin;
screen_rect.y = screen->xinerama_infos[which_xinerama].y_origin;
screen_rect.width = screen->xinerama_infos[which_xinerama].width;
screen_rect.height = screen->xinerama_infos[which_xinerama].height;
if (meta_rectangle_intersect (&screen_rect, rect, &dest))
return TRUE;
return FALSE;
}
const MetaXineramaScreenInfo*
meta_screen_get_current_xinerama (MetaScreen *screen)
{
if (screen->n_xinerama_infos == 1)
return &screen->xinerama_infos[0];
/* Sadly, we have to do it this way. Yuck.
*/
@@ -1295,9 +1471,11 @@ meta_screen_get_current_xinerama (MetaScreen *screen)
while (i < screen->n_xinerama_infos)
{
if ((root_x_return >= screen->xinerama_infos[i].x_origin &&
root_x_return < (screen->xinerama_infos[i].x_origin + screen->xinerama_infos[i].width) &&
root_x_return < (screen->xinerama_infos[i].x_origin +
screen->xinerama_infos[i].width) &&
root_y_return >= screen->xinerama_infos[i].y_origin &&
root_y_return < (screen->xinerama_infos[i].y_origin + screen->xinerama_infos[i].height)))
root_y_return < (screen->xinerama_infos[i].y_origin +
screen->xinerama_infos[i].height)))
{
screen->last_xinerama_index = i;
break;
@@ -1412,7 +1590,7 @@ meta_screen_update_workspace_layout (MetaScreen *screen)
}
static void
update_workspace_names (MetaScreen *screen)
set_workspace_names (MetaScreen *screen)
{
/* This updates names on root window when the pref changes,
* note we only get prefs change notify if things have
@@ -1532,7 +1710,7 @@ set_work_area_hint (MetaScreen *screen)
if (workspace->screen == screen)
{
meta_workspace_get_work_area (workspace, &area);
meta_workspace_get_work_area_all_xineramas (workspace, &area);
tmp[0] = area.x;
tmp[1] = area.y;
tmp[2] = area.width;
@@ -1883,6 +2061,10 @@ meta_screen_resize_func (MetaScreen *screen,
MetaWindow *window,
void *user_data)
{
if (window->struts)
{
meta_window_update_struts (window);
}
meta_window_queue_move_resize (window);
}
@@ -1937,6 +2119,31 @@ queue_windows_showing (MetaScreen *screen)
g_slist_free (windows);
}
void
meta_screen_minimize_all_except (MetaScreen *screen,
MetaWindow *keep)
{
GSList *windows;
GSList *tmp;
windows = meta_display_list_windows (screen->display);
tmp = windows;
while (tmp != NULL)
{
MetaWindow *w = tmp->data;
if (w->screen == screen &&
w->has_minimize_func &&
w != keep)
meta_window_minimize (w);
tmp = tmp->next;
}
g_slist_free (windows);
}
void
meta_screen_show_desktop (MetaScreen *screen)
{
@@ -1948,6 +2155,8 @@ meta_screen_show_desktop (MetaScreen *screen)
queue_windows_showing (screen);
update_showing_desktop_hint (screen);
meta_workspace_focus_top_window (screen->active_workspace, NULL);
}
void
@@ -1961,8 +2170,6 @@ meta_screen_unshow_desktop (MetaScreen *screen)
queue_windows_showing (screen);
update_showing_desktop_hint (screen);
meta_screen_focus_top_window (screen, NULL);
}
#ifdef HAVE_STARTUP_NOTIFICATION
@@ -2122,9 +2329,14 @@ meta_screen_sn_event (SnMonitorEvent *event,
{
case SN_MONITOR_EVENT_INITIATED:
{
const char *wmclass;
wmclass = sn_startup_sequence_get_wmclass (sequence);
meta_topic (META_DEBUG_STARTUP,
"Received startup initiated for %s\n",
sn_startup_sequence_get_id (sequence));
"Received startup initiated for %s wmclass %s\n",
sn_startup_sequence_get_id (sequence),
wmclass ? wmclass : "(unset)");
add_sequence (screen, sequence);
}
break;
@@ -2164,24 +2376,67 @@ meta_screen_apply_startup_properties (MetaScreen *screen,
SnStartupSequence *sequence;
startup_id = meta_window_get_startup_id (window);
meta_topic (META_DEBUG_STARTUP,
"Applying startup props to %s id \"%s\"\n",
window->desc,
startup_id ? startup_id : "(none)");
sequence = NULL;
if (startup_id == NULL)
{
tmp = screen->startup_sequences;
while (tmp != NULL)
{
const char *wmclass;
wmclass = sn_startup_sequence_get_wmclass (tmp->data);
if (wmclass != NULL &&
((window->res_class &&
strcmp (wmclass, window->res_class) == 0) ||
(window->res_name &&
strcmp (wmclass, window->res_name) == 0)))
{
sequence = tmp->data;
g_assert (window->startup_id == NULL);
window->startup_id = g_strdup (sn_startup_sequence_get_id (sequence));
startup_id = window->startup_id;
meta_topic (META_DEBUG_STARTUP,
"Ending legacy sequence %s due to window %s\n",
sn_startup_sequence_get_id (sequence),
window->desc);
sn_startup_sequence_complete (sequence);
break;
}
tmp = tmp->next;
}
}
if (startup_id == NULL)
return;
sequence = NULL;
tmp = screen->startup_sequences;
while (tmp != NULL)
if (sequence == NULL)
{
const char *id;
id = sn_startup_sequence_get_id (tmp->data);
if (strcmp (id, startup_id) == 0)
tmp = screen->startup_sequences;
while (tmp != NULL)
{
sequence = tmp->data;
break;
const char *id;
id = sn_startup_sequence_get_id (tmp->data);
if (strcmp (id, startup_id) == 0)
{
sequence = tmp->data;
break;
}
tmp = tmp->next;
}
tmp = tmp->next;
}
if (sequence != NULL)

View File

@@ -48,6 +48,14 @@ typedef enum
META_SCREEN_BOTTOMRIGHT
} MetaScreenCorner;
typedef enum
{
META_SCREEN_UP,
META_SCREEN_DOWN,
META_SCREEN_LEFT,
META_SCREEN_RIGHT
} MetaScreenDirection;
struct _MetaScreen
{
MetaDisplay *display;
@@ -70,6 +78,8 @@ struct _MetaScreen
MetaCursor current_cursor;
Window flash_window;
Window wm_sn_selection_window;
Atom wm_sn_atom;
Time wm_sn_timestamp;
@@ -124,12 +134,25 @@ void meta_screen_ensure_tab_popup (MetaScreen *scree
void meta_screen_ensure_workspace_popup (MetaScreen *screen);
void meta_screen_focus_top_window (MetaScreen *screen,
MetaWindow *not_this_one);
void meta_screen_focus_mouse_window (MetaScreen *screen,
MetaWindow *not_this_one);
const MetaXineramaScreenInfo* meta_screen_get_current_xinerama (MetaScreen *screen);
const MetaXineramaScreenInfo* meta_screen_get_xinerama_for_window (MetaScreen *screen,
MetaWindow *window);
const MetaXineramaScreenInfo* meta_screen_get_current_xinerama (MetaScreen *screen);
const MetaXineramaScreenInfo* meta_screen_get_xinerama_for_rect (MetaScreen *screen,
MetaRectangle *rect);
const MetaXineramaScreenInfo* meta_screen_get_xinerama_for_window (MetaScreen *screen,
MetaWindow *window);
gboolean meta_screen_rect_intersects_xinerama (MetaScreen *screen,
MetaRectangle *window,
int which_xinerama);
const MetaXineramaScreenInfo* meta_screen_get_xinerama_neighbor (MetaScreen *screen,
int which_xinerama,
MetaScreenDirection dir);
void meta_screen_get_natural_xinerama_list (MetaScreen *screen,
int** xineramas_list,
int* n_xineramas);
void meta_screen_update_workspace_layout (MetaScreen *screen);
void meta_screen_update_workspace_names (MetaScreen *screen);
@@ -160,10 +183,12 @@ void meta_screen_resize (MetaScreen *screen,
int width,
int height);
void meta_screen_minimize_all_except (MetaScreen *screen,
MetaWindow *keep);
/* Show/hide the desktop (temporarily hide all windows) */
void meta_screen_show_desktop (MetaScreen *screen);
void meta_screen_unshow_desktop (MetaScreen *screen);
void meta_screen_show_desktop (MetaScreen *screen);
void meta_screen_unshow_desktop (MetaScreen *screen);
void meta_screen_apply_startup_properties (MetaScreen *screen,
MetaWindow *window);

View File

@@ -2,7 +2,7 @@
/*
* Copyright (C) 2001 Havoc Pennington
* Copyright (C) 2002 Red Hat, Inc.
* Copyright (C) 2002, 2003 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
@@ -183,20 +183,37 @@ window_is_fullscreen_size (MetaWindow *window)
{
int i;
if (window->rect.x <= 0 &&
window->rect.y <= 0 &&
window->rect.width >= window->screen->width &&
if (window->rect.width >= window->screen->width &&
window->rect.height >= window->screen->height)
return TRUE;
{
/* we use the work area since windows that try to
* position at 0,0 will get pushed down by menu panel
*/
MetaRectangle workarea;
meta_window_get_work_area_current_xinerama (window, &workarea);
if (window->rect.x <= workarea.x &&
window->rect.y <= workarea.y &&
window->rect.x + window->rect.width >= workarea.x + workarea.width &&
window->rect.y + window->rect.height >= workarea.y + workarea.height)
return TRUE;
}
i = 0;
while (i < window->screen->n_xinerama_infos)
{
if (window->rect.x == window->screen->xinerama_infos[i].x_origin &&
window->rect.y == window->screen->xinerama_infos[i].y_origin &&
window->rect.width >= window->screen->xinerama_infos[i].width &&
if (window->rect.width >= window->screen->xinerama_infos[i].width &&
window->rect.height >= window->screen->xinerama_infos[i].height)
return TRUE;
{
MetaRectangle workarea;
meta_window_get_work_area_current_xinerama (window, &workarea);
if (window->rect.x <= workarea.x &&
window->rect.y <= workarea.y &&
window->rect.x + window->rect.width >= workarea.x + workarea.width &&
window->rect.y + window->rect.height >= workarea.y + workarea.height)
return TRUE;
}
++i;
}
@@ -204,11 +221,25 @@ window_is_fullscreen_size (MetaWindow *window)
return FALSE;
}
static gboolean
is_focused_foreach (MetaWindow *window,
void *data)
{
if (window->has_focus ||
(window == window->display->expected_focus_window))
{
*((gboolean*) data) = TRUE;
return FALSE;
}
return TRUE;
}
/* Get layer ignoring any transient or group relationships */
static MetaStackLayer
get_standalone_layer (MetaWindow *window)
{
MetaStackLayer layer;
gboolean focused_transient = FALSE;
switch (window->type)
{
@@ -229,15 +260,15 @@ get_standalone_layer (MetaWindow *window)
break;
default:
meta_window_foreach_transient (window,
is_focused_foreach,
&focused_transient);
#if 0
if (window->has_focus &&
meta_prefs_get_focus_mode () == META_FOCUS_MODE_CLICK)
layer = META_LAYER_FOCUSED_WINDOW;
#endif
if (window->has_focus &&
(window->fullscreen || window_is_fullscreen_size (window)))
if (window->wm_state_below)
layer = META_LAYER_BOTTOM;
else if ((window->has_focus || focused_transient ||
(window == window->display->expected_focus_window)) &&
(window->fullscreen || window_is_fullscreen_size (window)))
layer = META_LAYER_FULLSCREEN;
else if (window->wm_state_above)
layer = META_LAYER_DOCK;
@@ -249,37 +280,34 @@ get_standalone_layer (MetaWindow *window)
return layer;
}
typedef struct
{
MetaStackLayer max;
} MaxLayerData;
static gboolean
max_layer_func (MetaWindow *window,
void *data)
{
MaxLayerData *d = data;
MetaStackLayer layer;
layer = get_standalone_layer (window);
if (layer > d->max)
d->max = layer;
return TRUE;
}
static MetaStackLayer
get_maximum_layer_of_ancestor (MetaWindow *window)
{
MetaWindow *w;
MetaStackLayer max;
MetaStackLayer layer;
max = get_standalone_layer (window);
w = window;
while (w != NULL)
{
if (w->xtransient_for == None ||
w->transient_parent_is_root_window)
break;
w = meta_display_lookup_x_window (w->display, w->xtransient_for);
if (w == window)
break; /* Cute, someone thought they'd make a transient_for cycle */
/* w may be null... */
if (w != NULL)
{
layer = get_standalone_layer (w);
if (layer > max)
max = layer;
}
}
MaxLayerData d;
return max;
d.max = get_standalone_layer (window);
meta_window_foreach_ancestor (window, max_layer_func, &d);
return d.max;
}
/* Note that this function can never use window->layer only
@@ -488,6 +516,8 @@ add_constraint (Constraint **constraints,
MetaWindow *below)
{
Constraint *c;
g_assert (above->screen == below->screen);
/* check if constraint is a duplicate */
c = constraints[below->stack_position];
@@ -562,7 +592,8 @@ create_constraints (Constraint **constraints,
{
MetaWindow *group_window = tmp2->data;
if (!WINDOW_IN_STACK (group_window))
if (!WINDOW_IN_STACK (group_window) ||
w->screen != group_window->screen)
{
tmp2 = tmp2->next;
continue;
@@ -597,7 +628,8 @@ create_constraints (Constraint **constraints,
parent =
meta_display_lookup_x_window (w->display, w->xtransient_for);
if (parent && WINDOW_IN_STACK (parent))
if (parent && WINDOW_IN_STACK (parent) &&
parent->screen == w->screen)
{
meta_topic (META_DEBUG_STACK, "Constraining %s above %s due to transiency\n",
w->desc, parent->desc);
@@ -1299,12 +1331,27 @@ meta_stack_get_below (MetaStack *stack,
return NULL;
else
return below;
}
}
MetaWindow*
meta_stack_get_default_focus_window (MetaStack *stack,
MetaWorkspace *workspace,
MetaWindow *not_this_one)
static gboolean
window_contains_point (MetaWindow *window,
int root_x,
int root_y)
{
MetaRectangle rect;
meta_window_get_outer_rect (window, &rect);
return POINT_IN_RECT (root_x, root_y, rect);
}
static MetaWindow*
get_default_focus_window (MetaStack *stack,
MetaWorkspace *workspace,
MetaWindow *not_this_one,
gboolean must_be_at_point,
int root_x,
int root_y)
{
/* Find the topmost, focusable, mapped, window.
* not_this_one is being unfocused or going away, so exclude it.
@@ -1353,12 +1400,16 @@ meta_stack_get_default_focus_window (MetaStack *stack,
{
if (transient_parent == NULL &&
not_this_one->xtransient_for != None &&
not_this_one->xtransient_for == window->xwindow)
not_this_one->xtransient_for == window->xwindow &&
(!must_be_at_point ||
window_contains_point (window, root_x, root_y)))
transient_parent = window;
if (topmost_in_group == NULL &&
not_this_one_group != NULL &&
not_this_one_group == meta_window_get_group (window))
not_this_one_group == meta_window_get_group (window) &&
(!must_be_at_point ||
window_contains_point (window, root_x, root_y)))
topmost_in_group = window;
}
@@ -1367,7 +1418,9 @@ meta_stack_get_default_focus_window (MetaStack *stack,
* focusing dock, even though docks are stacked higher.
*/
if (topmost_overall == NULL &&
window->type != META_WINDOW_DOCK)
window->type != META_WINDOW_DOCK &&
(!must_be_at_point ||
window_contains_point (window, root_x, root_y)))
topmost_overall = window;
/* We could try to bail out early here for efficiency in
@@ -1388,6 +1441,26 @@ meta_stack_get_default_focus_window (MetaStack *stack,
return topmost_dock;
}
MetaWindow*
meta_stack_get_default_focus_window_at_point (MetaStack *stack,
MetaWorkspace *workspace,
MetaWindow *not_this_one,
int root_x,
int root_y)
{
return get_default_focus_window (stack, workspace, not_this_one,
TRUE, root_x, root_y);
}
MetaWindow*
meta_stack_get_default_focus_window (MetaStack *stack,
MetaWorkspace *workspace,
MetaWindow *not_this_one)
{
return get_default_focus_window (stack, workspace, not_this_one,
FALSE, 0, 0);
}
GList*
meta_stack_list_windows (MetaStack *stack,
MetaWorkspace *workspace)

View File

@@ -118,9 +118,16 @@ MetaWindow* meta_stack_get_above (MetaStack *stack,
MetaWindow* meta_stack_get_below (MetaStack *stack,
MetaWindow *window,
gboolean only_within_layer);
MetaWindow* meta_stack_get_default_focus_window (MetaStack *stack,
MetaWorkspace *workspace,
MetaWindow *not_this_one);
MetaWindow* meta_stack_get_default_focus_window (MetaStack *stack,
MetaWorkspace *workspace,
MetaWindow *not_this_one);
MetaWindow* meta_stack_get_default_focus_window_at_point (MetaStack *stack,
MetaWorkspace *workspace,
MetaWindow *not_this_one,
int root_x,
int root_y);
GList* meta_stack_list_windows (MetaStack *stack,
MetaWorkspace *workspace);

View File

@@ -122,11 +122,10 @@ meta_ui_tab_popup_new (const MetaTabEntry *entries,
popup = g_new (MetaTabPopup, 1);
popup->outline_window = gtk_window_new (GTK_WINDOW_POPUP);
#ifdef HAVE_GTK_MULTIHEAD
gtk_window_set_screen (GTK_WINDOW (popup->outline_window),
gdk_display_get_screen (gdk_display_get_default (),
screen_number));
#endif
gtk_widget_set_app_paintable (popup->outline_window, TRUE);
gtk_widget_realize (popup->outline_window);
@@ -135,11 +134,10 @@ meta_ui_tab_popup_new (const MetaTabEntry *entries,
G_CALLBACK (outline_window_expose), popup);
popup->window = gtk_window_new (GTK_WINDOW_POPUP);
#ifdef HAVE_GTK_MULTIHEAD
gtk_window_set_screen (GTK_WINDOW (popup->window),
gdk_display_get_screen (gdk_display_get_default (),
screen_number));
#endif
gtk_window_set_position (GTK_WINDOW (popup->window),
GTK_WIN_POS_CENTER_ALWAYS);

View File

@@ -4261,7 +4261,7 @@ meta_theme_load (const char *theme_name,
GError *error;
ParseInfo info;
char *text;
int length;
gsize length;
char *theme_file;
char *theme_dir;
MetaTheme *retval;
@@ -4269,7 +4269,8 @@ meta_theme_load (const char *theme_name,
text = NULL;
length = 0;
retval = NULL;
context = NULL;
theme_dir = NULL;
theme_file = NULL;
@@ -4378,12 +4379,12 @@ meta_theme_load (const char *theme_name,
if (!g_markup_parse_context_end_parse (context, &error))
goto out;
g_markup_parse_context_free (context);
goto out;
out:
if (context)
g_markup_parse_context_free (context);
g_free (text);
if (error)

View File

@@ -44,9 +44,6 @@
#define BUTTON_LAYOUT_COMBINATIONS ((MAX_BUTTONS_PER_CORNER+1)*(MAX_BUTTONS_PER_CORNER+1))
#endif
#define CLIENT_WIDTH 200
#define CLIENT_HEIGHT 200
enum
{
FONT_SIZE_SMALL,
@@ -57,11 +54,11 @@ enum
static MetaTheme *global_theme = NULL;
static GtkWidget *previews[META_FRAME_TYPE_LAST*FONT_SIZE_LAST + BUTTON_LAYOUT_COMBINATIONS] = { NULL, };
static double milliseconds_to_draw_frame = 0.0;
static void run_position_expression_tests (void);
static void run_position_expression_timings (void);
static void run_theme_benchmark (int client_width,
int client_height);
static void run_theme_benchmark (void);
static GtkItemFactoryEntry menu_items[] =
@@ -747,6 +744,20 @@ previews_of_button_layouts (void)
return sw;
}
static GtkWidget*
benchmark_summary (void)
{
char *msg;
GtkWidget *label;
msg = g_strdup_printf ("%g milliseconds to draw one window frame",
milliseconds_to_draw_frame);
label = gtk_label_new (msg);
g_free (msg);
return label;
}
int
main (int argc, char **argv)
{
@@ -797,7 +808,7 @@ main (int argc, char **argv)
global_theme->name,
(end - start) / (double) CLOCKS_PER_SEC);
run_theme_benchmark (CLIENT_WIDTH, CLIENT_HEIGHT);
run_theme_benchmark ();
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_default_size (GTK_WINDOW (window), 350, 350);
@@ -834,6 +845,11 @@ main (int argc, char **argv)
gtk_notebook_append_page (GTK_NOTEBOOK (notebook),
collection,
gtk_label_new ("Button Layouts"));
collection = benchmark_summary ();
gtk_notebook_append_page (GTK_NOTEBOOK (notebook),
collection,
gtk_label_new ("Benchmark"));
i = 0;
while (i < (int) G_N_ELEMENTS (previews))
@@ -886,8 +902,7 @@ create_title_layout (GtkWidget *widget)
}
static void
run_theme_benchmark (int client_width,
int client_height)
run_theme_benchmark (void)
{
GtkWidget* widget;
GdkPixmap *pixmap;
@@ -902,9 +917,13 @@ run_theme_benchmark (int client_width,
PangoLayout *layout;
clock_t start;
clock_t end;
GTimer *timer;
int i;
MetaButtonLayout button_layout;
#define ITERATIONS 100
int client_width;
int client_height;
int inc;
widget = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_widget_realize (widget);
@@ -918,11 +937,6 @@ run_theme_benchmark (int client_width,
&left_width,
&right_width);
pixmap = gdk_pixmap_new (widget->window,
client_width + left_width + right_width,
client_height + top_height + bottom_height,
-1);
layout = create_title_layout (widget);
i = 0;
@@ -938,12 +952,27 @@ run_theme_benchmark (int client_width,
button_layout.right_buttons[0] = META_BUTTON_FUNCTION_MINIMIZE;
button_layout.right_buttons[1] = META_BUTTON_FUNCTION_MAXIMIZE;
button_layout.right_buttons[2] = META_BUTTON_FUNCTION_CLOSE;
timer = g_timer_new ();
start = clock ();
client_width = 50;
client_height = 50;
inc = 1000 / ITERATIONS; /* Increment to grow width/height,
* eliminates caching effects.
*/
i = 0;
while (i < ITERATIONS)
{
/* Creating the pixmap in the loop is right, since
* GDK does the same with its double buffering.
*/
pixmap = gdk_pixmap_new (widget->window,
client_width + left_width + right_width,
client_height + top_height + bottom_height,
-1);
meta_theme_draw_frame (global_theme,
widget,
pixmap,
@@ -958,18 +987,28 @@ run_theme_benchmark (int client_width,
button_states,
meta_preview_get_mini_icon (),
meta_preview_get_icon ());
g_object_unref (G_OBJECT (pixmap));
++i;
client_width += inc;
client_height += inc;
}
end = clock ();
g_timer_stop (timer);
g_print ("Drew %d frames for %dx%d clients in %g seconds (%g seconds per frame)\n",
ITERATIONS, client_width, client_height,
((double)end - (double)start) / CLOCKS_PER_SEC,
((double)end - (double)start) / CLOCKS_PER_SEC / (double) ITERATIONS);
milliseconds_to_draw_frame = (g_timer_elapsed (timer, NULL) / (double) ITERATIONS) * 1000;
g_print ("Drew %d frames in %g client-side seconds (%g milliseconds per frame) and %g seconds wall clock time including X server resources (%g milliseconds per frame)\n",
ITERATIONS,
((double)end - (double)start) / CLOCKS_PER_SEC,
(((double)end - (double)start) / CLOCKS_PER_SEC / (double) ITERATIONS) * 1000,
g_timer_elapsed (timer, NULL),
milliseconds_to_draw_frame);
g_timer_destroy (timer);
g_object_unref (G_OBJECT (layout));
g_object_unref (G_OBJECT (pixmap));
gtk_widget_destroy (widget);
#undef ITERATIONS

View File

@@ -4760,8 +4760,10 @@ theme_get_style (MetaTheme *theme,
resize = META_FRAME_RESIZE_LAST; /* compiler */
break;
}
if (flags & META_FRAME_HAS_FOCUS)
/* re invert the styles used for focus/unfocussed while flashing a frame */
if (((flags & META_FRAME_HAS_FOCUS) && !(flags & META_FRAME_IS_FLASHING))
|| (!(flags & META_FRAME_HAS_FOCUS) && (flags & META_FRAME_IS_FLASHING)))
focus = META_FRAME_FOCUS_YES;
else
focus = META_FRAME_FOCUS_NO;

View File

@@ -4,7 +4,8 @@ THEMES= \
Crux \
Esco \
AgingGorilla \
Metabox
Metabox \
Simple
THEME_DIR=$(datadir)/themes
THEME_SUBDIR=metacity-1

View File

@@ -2,7 +2,7 @@
<metacity_theme>
<info>
<name>Metabox</name>
<author>Garrett LeSage &lt;garrett@redhat.com&lt; based on Havoc Pennington &lt;hp@redhat.com&gt;'s Atlanta theme</author>
<author>Garrett LeSage &lt;garrett@redhat.com&gt; based on Havoc Pennington &lt;hp@redhat.com&gt;'s Atlanta theme</author>
<copyright>&#194; Garrett LeSage, Havoc Pennington, 2002</copyright>
<date>Jun 12, 2002</date>
<description>Looks a little like BlackBox.</description>
@@ -246,15 +246,20 @@
</draw_ops>
<draw_ops name="close_button">
<include name="bg_button_active"/>
<line color="blend/gtk:bg[SELECTED]/gtk:fg[SELECTED]/0.75"
width="2"
<include name="bg_button_active"/>
<!-- draw longer lines and clip for 'x' with symmetrical endpoints &lt;joefefifo@yahoo.com&gt; -->
<clip x="ButtonIPad" y="ButtonIPad"
width="width - ButtonIPad - 4"
height="height - ButtonIPad - 4"/>
<line color="blend/gtk:bg[SELECTED]/gtk:fg[SELECTED]/0.75"
width="2"
x1="ButtonIPad" y1="ButtonIPad"
x2="width - ButtonIPad - 1" y2="height - ButtonIPad - 1"/>
<line color="blend/gtk:bg[SELECTED]/gtk:fg[SELECTED]/0.75"
x2="width - ButtonIPad" y2="height - ButtonIPad"/>
<line color="blend/gtk:bg[SELECTED]/gtk:fg[SELECTED]/0.75"
width="2"
x1="ButtonIPad" y1="height - ButtonIPad - 1"
x2="width - ButtonIPad - 1" y2="ButtonIPad"/>
x1="ButtonIPad" y1="height - ButtonIPad - 1"
x2="width - ButtonIPad" y2="ButtonIPad - 1"/>
</draw_ops>
<draw_ops name="close_button_pressed">
@@ -268,15 +273,19 @@
</draw_ops>
<draw_ops name="close_button_unfocused">
<include name="bg_button_inactive"/>
<line color="blend/gtk:fg[INSENSITIVE]/gtk:bg[INSENSITIVE]/0.35"
<include name="bg_button_inactive"/>
<!-- draw longer lines and clip for 'x' with symmetrical endpoints &lt;joefefifo@yahoo.com&gt; -->
<clip x="ButtonIPad" y="ButtonIPad"
width="width - ButtonIPad - 4"
height="height - ButtonIPad - 4"/>
<line color="blend/gtk:fg[INSENSITIVE]/gtk:bg[INSENSITIVE]/0.35"
width="2"
x1="ButtonIPad" y1="ButtonIPad"
x2="width - ButtonIPad - 1" y2="height - ButtonIPad - 1"/>
<line color="blend/gtk:fg[INSENSITIVE]/gtk:bg[INSENSITIVE]/0.35"
x2="width - ButtonIPad" y2="height - ButtonIPad"/>
<line color="blend/gtk:fg[INSENSITIVE]/gtk:bg[INSENSITIVE]/0.35"
width="2"
x1="ButtonIPad" y1="height - ButtonIPad - 1"
x2="width - ButtonIPad - 1" y2="ButtonIPad"/>
x2="width - ButtonIPad" y2="ButtonIPad - 1"/>
</draw_ops>
<draw_ops name="outer_bevel">

BIN
src/themes/Simple/close.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 333 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 291 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 340 B

View File

@@ -0,0 +1,316 @@
<?xml version="1.0"?>
<metacity_theme>
<info>
<name>Simple</name>
<author>Tuomas Kuosmanen &lt;tigert@ximian.com&gt;</author>
<copyright>&#194; Tuomas Kuosmanen, 2002, based on Atlanta theme by Havoc.</copyright>
<date>April, 2002</date>
<description>Default GNOME window theme</description>
</info>
<frame_geometry name="normal">
<distance name="left_width" value="4"/>
<distance name="right_width" value="4"/>
<distance name="bottom_height" value="4"/>
<distance name="left_titlebar_edge" value="2"/>
<distance name="right_titlebar_edge" value="2"/>
<distance name="button_width" value="16"/>
<distance name="button_height" value="16"/>
<distance name="title_vertical_pad" value="0"/>
<border name="title_border" left="1" right="1" top="2" bottom="2"/>
<border name="button_border" left="1" right="1" top="0" bottom="0"/>
</frame_geometry>
<!-- strip borders off the normal geometry -->
<frame_geometry name="normal_small_borders" parent="normal">
<distance name="left_width" value="0"/>
<distance name="right_width" value="0"/>
<distance name="bottom_height" value="0"/>
<distance name="left_titlebar_edge" value="0"/>
<distance name="right_titlebar_edge" value="0"/>
</frame_geometry>
<frame_geometry name="utility" title_scale="xx-small">
<distance name="left_width" value="3"/>
<distance name="right_width" value="3"/>
<distance name="bottom_height" value="4"/>
<distance name="left_titlebar_edge" value="3"/>
<distance name="right_titlebar_edge" value="3"/>
<distance name="button_width" value="16"/>
<distance name="button_height" value="16"/>
<distance name="title_vertical_pad" value="1"/>
<border name="title_border" left="3" right="4" top="3" bottom="3"/>
<border name="button_border" left="0" right="0" top="0" bottom="0"/>
</frame_geometry>
<frame_geometry name="border" has_title="false">
<distance name="left_width" value="4"/>
<distance name="right_width" value="4"/>
<distance name="bottom_height" value="4"/>
<distance name="left_titlebar_edge" value="0"/>
<distance name="right_titlebar_edge" value="0"/>
<distance name="button_width" value="0"/>
<distance name="button_height" value="0"/>
<distance name="title_vertical_pad" value="4"/>
<border name="title_border" left="0" right="0" top="0" bottom="0"/>
<border name="button_border" left="0" right="0" top="0" bottom="0"/>
</frame_geometry>
<!-- define constants -->
<constant name="ArrowWidth" value="8"/>
<constant name="ArrowHeight" value="4"/>
<constant name="ButtonIPad" value="4"/>
<constant name="ThickLineWidth" value="3"/>
<constant name="IconTitleSpacing" value="6"/>
<constant name="SpacerWidth" value="2"/>
<constant name="SpacerHeight" value="10"/>
<!-- Buttons -->
<draw_ops name="button_pressed_bg">
<rectangle color="gtk:light[NORMAL]" filled="true"
x="1" y="1" width="width" height="height"/>
<rectangle color="gtk:dark[NORMAL]" filled="true"
x="0" y="0" width="width - 1" height="height - 1"/>
<rectangle color="blend/#000000/gtk:bg[NORMAL]/0.9" filled="true"
x="1" y="1" width="width - 2" height="height - 2"/>
<!-- gtk_box state="active" shadow="out" x="0" y="0" width="width" height="height"/ -->
</draw_ops>
<draw_ops name="menu_button">
<icon x="1"
y="1"
width="width-2" height="height-2"/>
</draw_ops>
<draw_ops name="menu_button_pressed">
<include name="menu_button"/>
</draw_ops>
<draw_ops name="minimize_button">
<image filename="minimize.png" x="0" y="0" width="object_width" height="object_height"/>
</draw_ops>
<draw_ops name="minimize_button_pressed">
<include name="button_pressed_bg"/>
<include name="minimize_button"/>
</draw_ops>
<draw_ops name="maximize_button">
<image filename="maximize.png" x="0" y="0" width="object_width" height="object_height"/>
</draw_ops>
<draw_ops name="maximize_button_pressed">
<include name="button_pressed_bg"/>
<include name="maximize_button"/>
</draw_ops>
<draw_ops name="restore_button">
<image filename="maximized.png" x="0" y="0" width="object_width" height="object_height"/>
</draw_ops>
<draw_ops name="restore_button_pressed">
<include name="button_pressed_bg"/>
<include name="restore_button"/>
</draw_ops>
<draw_ops name="close_button">
<image filename="close.png" x="0" y="0" width="object_width" height="object_height"/>
</draw_ops>
<draw_ops name="close_button_pressed">
<include name="button_pressed_bg"/>
<include name="close_button"/>
</draw_ops>
<draw_ops name="outer_bevel">
<rectangle color="#000000"
x="0" y="0" width="width" height="height" filled="true"/>
<rectangle color="gtk:bg[NORMAL]"
x="1" y="1" width="width-2" height="height-2" filled="true"/>
<line color="gtk:light[NORMAL]"
x1="1" y1="1" x2="1" y2="height-3"/>
<line color="gtk:light[NORMAL]"
x1="1" y1="1" x2="width-3" y2="1"/>
<line color="gtk:dark[NORMAL]"
x1="width-2" y1="2" x2="width-2" y2="height-2"/>
<line color="gtk:dark[NORMAL]"
x1="2" y1="height-2" x2="width-3" y2="height-2"/>
</draw_ops>
<draw_ops name="blank">
<!-- nothing -->
</draw_ops>
<draw_ops name="focus_outline">
<rectangle color="gtk:dark[NORMAL]"
x="left_width-1" y="top_height-1"
width="width-left_width-right_width+1"
height="height-top_height-bottom_height+1"/>
</draw_ops>
<draw_ops name="focus_background">
<include name="outer_bevel"/>
</draw_ops>
<draw_ops name="title_tile">
<line color="gtk:bg[SELECTED]" x1="0" y1="0" x2="width" y2="0"/>
<line color="blend/gtk:bg[SELECTED]/#000000/0.1" x1="0" y1="1" x2="width" y2="1"/>
</draw_ops>
<draw_ops name="title_tile_unfocused">
<line color="blend/gtk:bg[NORMAL]/#000000/0.1" x1="0" y1="0" x2="width" y2="0"/>
<line color="blend/gtk:bg[NORMAL]/#000000/0.2" x1="0" y1="1" x2="width" y2="1"/>
</draw_ops>
<draw_ops name="title_bg">
<tile name="title_tile" tile_width="width" tile_height="2" x="0" y="0" width="width" height="height"/>
<rectangle color="blend/gtk:bg[SELECTED]/#000000/0.6" filled="false" x="0" y="0" width="width-1" height="height-1"/>
<rectangle color="blend/#000000/gtk:bg[NORMAL]/0.5" filled="true" x="0" y="0" width="1" height="1"/>
<rectangle color="blend/#000000/gtk:bg[NORMAL]/0.5" filled="true" x="width-1" y="0" width="1" height="1"/>
<rectangle color="blend/#000000/gtk:bg[NORMAL]/0.5" filled="true" x="0" y="height-1" width="1" height="1"/>
<rectangle color="blend/#000000/gtk:bg[NORMAL]/0.5" filled="true" x="width-1" y="height-1" width="1" height="1"/>
</draw_ops>
<draw_ops name="title_bg_unfocused">
<tile name="title_tile_unfocused" tile_width="width" tile_height="2" x="0" y="0" width="width-1" height="height-1"/>
<rectangle color="blend/#000000/gtk:bg[NORMAL]/0.7" filled="false" x="0" y="0" width="width-1" height="height-1"/>
<rectangle color="blend/#000000/gtk:bg[NORMAL]/0.8" filled="true" x="0" y="0" width="1" height="1"/>
<rectangle color="blend/#000000/gtk:bg[NORMAL]/0.8" filled="true" x="width-1" y="0" width="1" height="1"/>
<rectangle color="blend/#000000/gtk:bg[NORMAL]/0.8" filled="true" x="0" y="height-1" width="1" height="1"/>
<rectangle color="blend/#000000/gtk:bg[NORMAL]/0.8" filled="true" x="width-1" y="height-1" width="1" height="1"/>
</draw_ops>
<draw_ops name="title_text_focused">
<clip x="0" y="0" width="width-SpacerWidth" height="height"/>
<title color="blend/gtk:fg[SELECTED]/#000000/0.7"
x="(0 `max` (width-title_width-mini_icon_width-IconTitleSpacing)) / 2 + mini_icon_width + IconTitleSpacing + 1"
y="((height - title_height) / 2) `max` 0 + 1"/>
<title color="gtk:fg[SELECTED]"
x="(0 `max` (width-title_width-mini_icon_width-IconTitleSpacing)) / 2 + mini_icon_width + IconTitleSpacing"
y="((height - title_height) / 2) `max` 0"/>
</draw_ops>
<draw_ops name="title_text">
<clip x="0" y="0" width="width-SpacerWidth" height="height"/>
<title color="blend/gtk:dark[NORMAL]/#000000/0.5"
x="(0 `max` (width-title_width-mini_icon_width-IconTitleSpacing)) / 2 + mini_icon_width + IconTitleSpacing"
y="((height - title_height) / 2) `max` 0"/>
</draw_ops>
<draw_ops name="title_normal">
<include name="title_bg_unfocused"/>
<include name="title_text"/>
</draw_ops>
<draw_ops name="title_focused">
<include name="title_bg"/>
<include name="title_text_focused"/>
</draw_ops>
<draw_ops name="title_utility">
<include name="title_text"/>
</draw_ops>
<draw_ops name="title_utility_focused">
<include name="title_bg"/>
<include name="title_text_focused"/>
</draw_ops>
<frame_style name="normal_unfocused" geometry="normal">
<piece position="entire_background" draw_ops="outer_bevel"/>
<piece position="title" draw_ops="title_normal"/>
<!-- we don't specify for prelight, so normal is used -->
<button function="close" state="normal" draw_ops="close_button"/>
<button function="close" state="pressed" draw_ops="close_button_pressed"/>
<button function="minimize" state="normal" draw_ops="minimize_button"/>
<button function="minimize" state="pressed" draw_ops="minimize_button_pressed"/>
<button function="maximize" state="normal" draw_ops="maximize_button"/>
<button function="maximize" state="pressed" draw_ops="maximize_button_pressed"/>
<button function="menu" state="normal" draw_ops="menu_button"/>
<button function="menu" state="pressed" draw_ops="menu_button_pressed"/>
</frame_style>
<frame_style name="normal_focused" geometry="normal" parent="normal_unfocused">
<piece position="entire_background" draw_ops="focus_background"/>
<piece position="title" draw_ops="title_focused"/>
</frame_style>
<frame_style name="shaded_focused" geometry="normal" parent="normal_unfocused">
<piece position="title" draw_ops="title_focused"/>
</frame_style>
<frame_style name="maximized_unfocused" geometry="normal_small_borders" parent="normal_unfocused">
<piece position="entire_background" draw_ops="blank"/>
<button function="maximize" state="normal" draw_ops="restore_button"/>
<button function="maximize" state="pressed" draw_ops="restore_button_pressed"/>
</frame_style>
<frame_style name="maximized_focused" geometry="normal_small_borders" parent="normal_focused">
<piece position="entire_background" draw_ops="focus_outline"/>
<button function="maximize" state="normal" draw_ops="restore_button"/>
<button function="maximize" state="pressed" draw_ops="restore_button_pressed"/>
</frame_style>
<frame_style name="utility_unfocused" geometry="utility" parent="normal_unfocused">
<piece position="title" draw_ops="title_utility"/>
</frame_style>
<frame_style name="utility_focused" geometry="utility" parent="normal_focused">
<piece position="title" draw_ops="title_utility_focused"/>
</frame_style>
<frame_style name="border" geometry="border" parent="normal_unfocused">
<piece position="entire_background" draw_ops="outer_bevel"/>
<piece position="title" draw_ops="blank"/>
</frame_style>
<frame_style_set name="normal">
<frame focus="yes" state="normal" resize="both" style="normal_focused"/>
<frame focus="no" state="normal" resize="both" style="normal_unfocused"/>
<frame focus="yes" state="maximized" style="maximized_focused"/>
<frame focus="no" state="maximized" style="maximized_unfocused"/>
<frame focus="yes" state="shaded" style="shaded_focused"/>
<frame focus="no" state="shaded" style="normal_unfocused"/>
<frame focus="yes" state="maximized_and_shaded" style="maximized_focused"/>
<frame focus="no" state="maximized_and_shaded" style="maximized_unfocused"/>
</frame_style_set>
<frame_style_set name="utility" parent="normal">
<frame focus="yes" state="normal" resize="both" style="utility_focused"/>
<frame focus="no" state="normal" resize="both" style="utility_unfocused"/>
<!-- this is a bunch of crack since utility windows shouldn't be maximized -->
<frame focus="yes" state="maximized" style="utility_focused"/>
<frame focus="no" state="maximized" style="utility_unfocused"/>
<frame focus="yes" state="shaded" style="utility_focused"/>
<frame focus="no" state="shaded" style="utility_unfocused"/>
<frame focus="yes" state="maximized_and_shaded" style="utility_focused"/>
<frame focus="no" state="maximized_and_shaded" style="utility_unfocused"/>
</frame_style_set>
<frame_style_set name="border" parent="normal">
<frame focus="yes" state="normal" resize="both" style="border"/>
<frame focus="no" state="normal" resize="both" style="border"/>
<!-- this is a bunch of crack since utility windows shouldn't be maximized -->
<frame focus="yes" state="maximized" style="utility_focused"/>
<frame focus="no" state="maximized" style="utility_unfocused"/>
<frame focus="yes" state="shaded" style="utility_focused"/>
<frame focus="no" state="shaded" style="utility_unfocused"/>
<frame focus="yes" state="maximized_and_shaded" style="utility_focused"/>
<frame focus="no" state="maximized_and_shaded" style="utility_unfocused"/>
</frame_style_set>
<window type="normal" style_set="normal"/>
<window type="dialog" style_set="normal"/>
<window type="modal_dialog" style_set="normal"/>
<window type="menu" style_set="normal"/>
<window type="utility" style_set="utility"/>
<window type="border" style_set="border"/>
<menu_icon function="close" state="normal" draw_ops="close_button"/>
<menu_icon function="maximize" state="normal" draw_ops="maximize_button"/>
<menu_icon function="unmaximize" state="normal" draw_ops="restore_button"/>
<menu_icon function="minimize" state="normal" draw_ops="minimize_button"/>
</metacity_theme>

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