Commit Graph

870 Commits

Author SHA1 Message Date
Jeff Waugh
9170f58f3b Set titlebar_uses_system_font = false. The previous default was almost
2004-06-04  Jeff Waugh  <jdub@perkypants.org>

	* src/metacity.schemas.in: Set titlebar_uses_system_font = false. The
	previous default was almost violent in its lack of appreciation for
	human beings. In fact, this entire setting should probably be removed, but
	for now, let's just fix the default. Permission granted by Havoc.
2004-06-04 13:55:10 +00:00
Rob Adams
77a1e8ec8b make the no sm support warning dialog resizable, since the default GTK
2004-05-02  Rob Adams  <readams@readams.net>

	* src/metacity-dialog.c (warn_about_no_sm_support): make the no sm
	support warning dialog resizable, since the default GTK warning
	dialog not has default not resizable.  Fix for #141672 from
	Olivier Crete.
2004-05-03 02:03:59 +00:00
Rob Adams
0ceb317ac6 Add a value type check for the visual bell/audible bell gconf settings.
2004-04-29  Rob Adams  <readams@readams.net>

	* src/prefs.c (change_notify): Add a value type check for the
	visual bell/audible bell gconf settings.  Patch from Jarrod
	Johnson for #141409.
2004-04-30 00:26:48 +00:00
Mark McLoughlin
5c01798884 Syncing across this change from libwnck. Patch from Neil Muller
2004-04-19  Mark McLoughlin  <mark@skynet.ie>

        Syncing across this change from libwnck.
        Patch from Neil Muller <neil@dip.sun.ac.za> in bug #133979.

        * src/iconcache.c: (find_largest_sizes), (find_best_size):
        Don't down-size nitems from a gulong to an int. Fixes a
        crash with enlightenment, apparently.
2004-04-19 14:53:14 +00:00
Elijah Newren
4b9a23e8eb Fix unwanted mouse grab op on rapid click-and-release 2004-04-16 03:38:19 +00:00
Rob Adams
f3cc59c78a don't promote due to transiency; we handle that elsewhere now.
2004-03-01  Rob Adams  <readams@readams.net>

	* src/stack.c (compute_layer): don't promote due to transiency; we
	handle that elsewhere now.
	(ensure_above): perform layer promotion here as well as stack
	position promotion.  Note that this means that we need to do stack
	constraints now on layer change now.
	(get_maximum_layer_of_ancestor): remove function
	(max_layer_func): remove function
	(MaxLayerData): remove struct
2004-03-02 02:28:21 +00:00
Rob Adams
56609cbb39 Revert 2/27 patch for layer promotion.
2004-02-28  Rob Adams  <readams@readams.net>

	Revert 2/27 patch for layer promotion.
2004-02-28 23:58:40 +00:00
Rob Adams
16a8add6f8 only move on MRU list if the window belongs on the workspace, since the
2004-02-27  Rob Adams  <readams@readams.net>

	* src/window.c (meta_window_notify_focus): only move on MRU list
	if the window belongs on the workspace, since the FocusIn event
	could be for a window whose workspace we've since switched away
	from.  Possible fix for #122016.

	* src/workspace.c (meta_workspace_contains_window): search for the
	workspace in window->workspaces rather than the window in
	workspace->windows.  Since the number of workspaces is at most 36,
	this is a O(1) lookup rather than a O(n) lookup.  Sorry; couldn't
	resist.
2004-02-28 02:53:56 +00:00
Rob Adams
036a61d198 Change move_to_workspace_left/right/up/down keybindings to
2004-02-27  Rob Adams  <readams@readams.net>

	* src/metacity.schemas.in: Change
	move_to_workspace_left/right/up/down keybindings to
	<Control><Alt><Shift> arrow to avoid conflicting with new
	keybindings in spacial nautilus.
2004-02-28 01:56:31 +00:00
Rob Adams
9739346c85 Handle layer promotion of transient descendants of layer-promoted windows
2004-02-27  Rob Adams  <readams@readams.net>

	Handle layer promotion of transient descendants of layer-promoted
	windows to also be layer promoted, using a simple iterative
	algorithm.

	* src/stack.c (compute_layer): change name to promote_layer, and
	convert to simply perform any necessary layer promotion without
	computing the standalone layer.
	(max_layer_func): use window->layer instead of
	get_standalone_layer
	(get_maximum_layer_of_ancestor): use window->layer instead of
	get_standalone_layer
	(meta_stack_ensure_sorted): implement iterative algorithm,
	explained in a long comment.

	* src/window.h: add a tmp_layer field used by stack.c for
	determining if the stack is dirty or not, since maintaining this
	information in meta_stack_ensure_sorted is no longer practical.
2004-02-28 01:49:17 +00:00
Rob Adams
47e6bd5648 Add my copyright notice to a number of files on which it should already
2004-02-23  Rob Adams  <readams@readams.net>

	Add my copyright notice to a number of files on which it should
	already exist.

	* src/window.c (meta_window_notify_focus): modify code to move to
	front of MRU list so that we can have an assert that it was there
	in the first place.  This code may be causing some crashes.  See
	#131196.
2004-02-28 01:48:27 +00:00
Rob Adams
db108c1fc3 Add my copyright notice to a number of files on which it should already
2004-02-23  Rob Adams  <readams@readams.net>

	Add my copyright notice to a number of files on which it should
	already exist.

	* src/window.c (meta_window_notify_focus): modify code to move to
	front of MRU list so that we can have an assert that it was there
	in the first place.  This code may be causing some crashes.  See
	#131196.
2004-02-23 01:48:29 +00:00
Rob Adams
f1701a751f remove trailing comma in MetaKeyBindingAction enum. Fix for #134868 thanks
2004-02-19  Rob Adams  <readams@readams.net>

	* src/prefs.h: remove trailing comma in MetaKeyBindingAction enum.
	Fix for #134868 thanks to bugzilla-gnome@thewrittenword.com.
2004-02-19 18:36:14 +00:00
Rob Adams
ad65847d7d reset drag state after shaking loose or reattaching. Fix for #132625.
2004-02-16  Rob Adams  <readams@readams.net>

	* src/window.c (update_move): reset drag state after shaking loose
	or reattaching.  Fix for #132625.
2004-02-16 19:01:25 +00:00
Anders Carlsson
27eb5a60f3 Actually translate a message, don't just mark it for translation.
2004-02-15  Anders Carlsson  <andersca@gnome.org>

	* src/menu.c (meta_window_menu_new): Actually translate a message,
	don't just mark it for translation.
2004-02-15 14:42:16 +00:00
Elijah Newren
339719568f Prepend windows to mru list when switching workspaces. Fixes #134368 2004-02-15 14:27:43 +00:00
Rob Adams
fd13022dc4 If we're moving a window and receive a _NET_CURRENT_DESKTOP message
2004-02-14  Rob Adams  <readams@readams.net>

	If we're moving a window and receive a _NET_CURRENT_DESKTOP
	message indicating a workspace switch, bring along the drag window
	to the new workspace, solving a potentially weird bug where the
	window would be lost on the old workspace.  This also makes it
	possible to implement edge flipping in an external program with
	just a few lines of code.  Patch for #131630 from ed@catmur.co.uk.

	* src/keybindings.c (switch_to_workspace): remove function -- no
	longer needed.
	(handle_activate_workspace): call meta_workspace_activate instead
	of switch_to_workspace

	* src/workspace.c (meta_workspace_activate_with_focus): if we're
	in a move grab op, bring along the drag window.
2004-02-15 05:29:49 +00:00
James M. Cape
74a8b5b78b Use the 'utility' frame for dialogs too.
2004-01-27  James M. Cape  <jcape@ignore-your.tv>

        * src/themes/Esco/metacity-theme-1.xml: Use the 'utility' frame
        for dialogs too.
2004-01-28 04:20:22 +00:00
James M. Cape
4b3b706369 Updated this theme.
2004-01-24  James M. Cape  <jcape@ignore-your.tv>

	* src/themes/Esco/metacity-theme-1.xml: Updated this theme.
2004-01-24 16:20:41 +00:00
Elijah Newren
595cbe2ac0 Remove duplicate entries. 2004-01-21 17:33:56 +00:00
Rob Adams
007a1f0d0d Default binding removed for toggle_shaded, since we don't have anything in
2004-01-17  Rob Adams  <readams@readams.net>

	* src/metacity.schemas.in: Default binding removed for
	toggle_shaded, since we don't have anything in the graphical UI
	for it any more.
2004-01-17 18:59:42 +00:00
Rob Adams
40a710dad0 Don't show left/right/up/down if a window is sticky. Make "On Top"
2004-01-17  Rob Adams  <readams@readams.net>

	* src/window.c (meta_window_show_menu): Don't show
	left/right/up/down if a window is sticky.  Make "On Top"
	insensitive for docks, splash screens, and desktops since it has
	no effect anyway.
2004-01-17 18:57:26 +00:00
Rob Adams
3d996ff73d update default action_double_click_titlebar to be toggle_maximize instead
2004-01-10  Rob Adams  <readams@readams.net>

	* src/metacity.schemas.in: update default
	action_double_click_titlebar to be toggle_maximize instead of
	toggle_shade.  See #131126.
2004-01-10 22:22:46 +00:00
Rob Adams
1b7a651a33 if we maximize after placement, and the window is too big to fix in the
2004-01-12  Rob Adams  <readams@readams.net>

	* src/constraints.c (meta_window_constrain): if we maximize after
	placement, and the window is too big to fix in the work area,
	define a sane saved_rect approximately with dimensions
	three-quarters approximately three quarters the size of the work
	area.  This avoids the problem where large windows would
	unmaximize and actually get bigger.  See #93590.
2004-01-10 18:13:14 +00:00
Thomas Fitzsimmons
a605da04c1 Add _NET_FRAME_EXTENTS and _NET_REQUEST_FRAME_EXTENTS.
2004-01-09  Thomas Fitzsimmons  <fitzsim@redhat.com>

	Add _NET_FRAME_EXTENTS and _NET_REQUEST_FRAME_EXTENTS.

	* src/display.c: include xprops.h
	(process_request_frame_extents): new function
	(meta_display_open): add _NET_FRAME_EXTENTS and
	_NET_REQUEST_FRAME_EXTENTS atoms
	(event_callback): handle frame extents message

	* src/display.h (struct _MetaDisplay): add atom_net_frame_extents
	and atom_net_request_frame_extents

	* src/theme.c (meta_pango_font_desc_get_text_height): make font_desc
	parameter const

	* src/ui.c: include prefs.h
	(meta_ui_theme_get_frame_borders): new function

	* src/window.c (update_net_frame_extents): new function
	(meta_window_move_resize_internal): update frame extents
	property when frame geometry changes

	* src/screen.c (set_supported_hint): add atom_net_frame_extents
	and atom_net_request_frame_extents
2004-01-10 17:16:07 +00:00
Calum Benson
c820769bce Ensure window buttons get larger when using large print themes.
Fixes #123469.
2004-01-09 11:17:28 +00:00
Rob Adams
2fdb75ad45 Maintain the button grab for sloppy and mouse focus all the time. This
2003-01-04  Rob Adams  <readams@readams.net>

	Maintain the button grab for sloppy and mouse focus all the time.
	This fixes a number of problem introduced by trying to drop the
	grab; we now do this only for click to focus mode.  This has the
	unfortunate effect that #102209 reappears for sloppy and mouse
	focus, but this seems unavoidable, because of limitations in the X
	protocol.  See #115072.

	* src/display.c (meta_display_grab_focus_window_button): #if 0 the
	section on not grabbing unless in click-to-focus mode.

	* src/window.c (meta_window_notify_focus): drop focus button grab
	on FocusIn and acquire it on FocusOut only when in click-to-focus
	mode.
2004-01-05 07:24:32 +00:00
Havoc Pennington
a27089a110 handle ReparentNotify, and add a lot of debug output.
2003-12-25  Havoc Pennington  <hp@redhat.com>

	* src/compositor.c (process_reparent): handle ReparentNotify, and
	add a lot of debug output.
2003-12-26 02:42:38 +00:00
Havoc Pennington
35c64b45dd change to track all children of the root window, not only mapped children;
2003-12-25  Havoc Pennington  <hp@redhat.com>

	* src/compositor.c (meta_compositor_process_event): change to
	track all children of the root window, not only mapped children;
	this keeps us from losing track of the stacking order

	* src/display.c (event_callback): don't do any of the compositor
	event handling inline, do it all in compositor.c
2003-12-26 00:05:26 +00:00
Rob Adams
c2ba0a7d67 2003-12-21 Rob Adams <readams@readams.net
* src/main.c (main): fix minor punctuation error in a string.  Fix
	for #129805.
2003-12-22 00:43:53 +00:00
Rob Adams
690100f1ad Reorganize the window menu according to discussion on #110904. The
2003-12-20  Rob Adams  <readams@readams.net>

	Reorganize the window menu according to discussion on #110904.
	The workspace name mnemonic chunk of the patch is thanks to
	Jonathan Blandford.

	* src/common.h: add MENU_OP_ABOVE, MENU_OP_UNABOVE, MENU_UP_MOVE_TO_*
	menu ops.

	* src/core.c (meta_core_get_menu_accelerator): add accelerator for
	the new menu ops.

	* src/menu.c: add checked attribute in _MenuItem struct to display
	a checkmark next to a menu item.  Add the new menu items to
	menuitems.
	(get_workspace_name_with_accel): Add mnemonics even to renamed
	workspaces.
	(menu_item_new): provide support for the checked attribute
	(meta_window_menu_new): construct new submenu for workspace
	switching.

	* src/window.c (menu_callback): implement support for the new menu
	ops.
	(meta_window_show_menu): don't use the OP_*SHAPE operations, and
	compute which of the OP_MOVE_TO_* ops should be used for the
	current workspace and workspace layout.  Add the OP_*ABOVE
	operations.
2003-12-21 06:31:40 +00:00
Rob Adams
4be245a26a add test-size-hints to cvsignore 2003-12-19 23:37:23 +00:00
Rob Adams
104786735a initialize grab_wireframe_active to FALSE. Fix for #128090.
2003-12-17  Rob Adams  <readams@readams.net>

	* src/display.c (meta_display_open): initialize
	grab_wireframe_active to FALSE.  Fix for #128090.

2003-12-17  Rob Adams  <readams@readams.net>

	* src/tabpopup.c (meta_ui_tab_popup_new): Don't try to call
	utf8_strndup on a null title for an entry.  Fix for #128566.

	* src/workspace.c (meta_workspace_free): Call g_list_free on the
	mru_list, since with sticky windows that MRU list could well not
	be emtpy.  See #122016.
2003-12-17 16:01:00 +00:00
Rob Adams
191b3f2c21 set on_all_workspaces in all cases _before_ adding to the workspaces, so
2003-12-13  Rob Adams  <readams@readams.net>

	* src/window.c (meta_window_new_with_attrs): set on_all_workspaces
	in all cases _before_ adding to the workspaces, so that windows
	initially on all workspaces are added correctly to the MRU lists.
	Fix for #120907.

	* src/workspace.c (meta_workspace_add_window): handle sticky
	windows so that we add to add mru lists if needed
	(meta_workspace_remove_window): handle sticky windows so that they
	are removed from all mru lists if needed.
2003-12-14 19:19:40 +00:00
Rob Adams
9bde925d3d Revert prior change 2003-12-13 23:00:06 +00:00
Rob Adams
7630d22b8d Add increased robustness for dealing with all workspaces windows and MRU
2003-12-13  Rob Adams  <readams@readams.net>

	Add increased robustness for dealing with all workspaces windows
	and MRU lists.
	Also add very preliminary _NET_WM_USER_TIME
	support, limited to simply listening for the property and keeping
	an internal variable updated, and also treating some input events
	as though they were user time updates.

	* src/window.c (meta_window_new_with_attrs): set on_all_workspaces
	in all cases _before_ adding to the workspaces, so that windows
	initially on all workspaces are added correctly to the MRU lists.
	Fix for #120907.
	(process_property_notify): add net_wm_user_time support.

	* src/workspace.c (meta_workspace_add_window): handle sticky
	windows so that we add to add mru lists if needed
	(meta_workspace_remove_window): handle sticky windows so that they
	are removed from all mru lists if needed.

	* src/display.[ch] (meta_display_open): add net_wm_user_time support.
	(event_callback): simulate user time update on key and button presses.

	* src/screen.c (set_supported_hint): add net_wm_user_time support.

	* src/window-props.c (init_net_wm_user_time): new function for
	user_time support
	(reload_net_wm_user_time): new function for user_time support
	(meta_display_init_window_prop_hooks): add hook for user_time
2003-12-13 18:28:14 +00:00
Havoc Pennington
a92be6e319 unstick window to get it out of mru_list it should not be in; assert that
2003-12-12  Havoc Pennington  <hp@redhat.com>

	* src/window.c (meta_window_free): unstick window to get it out of
	mru_list it should not be in; assert that window has been removed
	from all mru_list. Perhaps fixes #122016 crash.
2003-12-13 03:58:55 +00:00
Havoc Pennington
4ebdb0b9c0 fix up compositing manager to somewhat work
2003-11-29  Havoc Pennington  <hp@redhat.com>

	* fix up compositing manager to somewhat work
2003-11-30 03:30:27 +00:00
Havoc Pennington
8d892f76da Oops, did not mean to do that. 2003-11-24 23:05:04 +00:00
Havoc Pennington
03bbe3de17 fix the extension checks
2003-11-24  Havoc Pennington  <hp@redhat.com>

	* src/compositor.c (meta_compositor_new): fix the extension checks
2003-11-24 23:00:52 +00:00
Havoc Pennington
47a1c285c7 init prev_mask field
2003-11-24  Havoc Pennington  <hp@redhat.com>

	* src/iconcache.c (meta_icon_cache_init): init prev_mask field

	* src/window.c (meta_window_new_with_attrs): init xgroup_leader
	prior to use
2003-11-24 19:09:25 +00:00
Havoc Pennington
4ccb120922 need to select PropertyChangeMask on the leader window 2003-11-24 18:38:38 +00:00
Havoc Pennington
423b5f5f39 add an event_serial argument and use it when the pointer is already
2003-11-24  Havoc Pennington  <hp@redhat.com>

	* src/display.c (meta_display_begin_grab_op): add an event_serial
	argument and use it when the pointer is already grabbed
	automatically on the button press. May fix bug #126871
2003-11-24 18:09:47 +00:00
Havoc Pennington
feefcdd892 Apply patch from Gregory Merchan to avoid using CurrentTime when setting
2003-11-24  Havoc Pennington  <hp@redhat.com>

	* Apply patch from Gregory Merchan to avoid using CurrentTime when
	setting input focus. Bug #108881
2003-11-24 17:47:48 +00:00
Havoc Pennington
927a6def1b move xcompmgr code in here (minus drop shadows), untested since Keith's
2003-11-23  Havoc Pennington  <hp@redhat.com>

	* src/compositor.c: move xcompmgr code in here (minus drop
	shadows), untested since Keith's server just crashes at the
	moment. "It compiles"
2003-11-23 18:16:01 +00:00
Havoc Pennington
d538690bd4 new function
2003-11-20  Havoc Pennington  <hp@redhat.com>

	* src/window.c (meta_window_new_with_attrs): new function

	* src/display.c, src/screen.c: create the compositor and feed
	windows and events to it
2003-11-21 02:32:05 +00:00
Havoc Pennington
24d8655188 revert the change here
2003-11-20  Havoc Pennington  <hp@redhat.com>

	* src/window.c (meta_window_notify_focus): revert the change here
2003-11-20 05:52:37 +00:00
Rob Adams
917dfefd6c 2003-11-17 Rob Adams <readams@readams.net
* src/window.c (set_allowed_actions_hint): increment i between
	resize and fullscreen.
2003-11-17 16:46:01 +00:00
Rob Adams
9378a4fb4d Create COMPLIANCE document describing metacity specification compliance.
2003-11-16  Rob Adams  <readams@readams.net>

	Create COMPLIANCE document describing metacity specification
	compliance.  Right now gives detailed EWMH compliance; still need
	to add ICCCM compliance information.  Also some minor fixes to
	bring metacity into compliance on some points.

	* COMPLIANCE: new file

	* src/display.h, src/display.c (meta_display_open),
	src/screen.c (set_supported_hint): add
	atom_net_wm_action_fullscreen and atom_net_wm_action_minimize

	* src/window.c (set_allowed_actions_hint): some fixes to which
	hints to set and add fullscreen and minimize.
2003-11-17 00:06:58 +00:00
Rob Adams
67c36f0917 add paranoia check to make sure a window is really on a workspace before
2003-11-16  Rob Adams  <readams@readams.net>

	* src/window.c (meta_window_notify_focus): add paranoia check to
	make sure a window is really on a workspace before inserting it at
	the beginning of the MRU list.  Maybe there's a race condition
	with focusing and workspace switching.  Hopefully a fix for #122016.
2003-11-16 21:50:51 +00:00
Havoc Pennington
6a0f4f6ccb add the missing files 2003-11-16 04:35:16 +00:00
Havoc Pennington
901ad18a67 fix warning
2003-11-15  Havoc Pennington  <hp@redhat.com>

	* src/main.c (main): fix warning

	* src/compositor.c: add a new file to contain compositing manager
	functionality; not yet implemented at all.
2003-11-16 04:20:17 +00:00
Rob Adams
6ac67f80a6 Inherit visual from frame window so that metacity will work with the new
2003-11-15  Rob Adams  <readams@readams.net>

	Inherit visual from frame window so that metacity will work with
	the new compositing manager extension work by Keith on
	freedesktop.org, so that ARGB windows can be full
	alpha-transparent without a metacity frame getting drawn in the
	background.  In the long term, we need to actually set alpha
	values when drawing the frame so that it will really work; this is
	a stopgap solution.  Patch from Keith Packard; see Bug 126875.

	* src/frame.c (meta_window_ensure_frame): pass client visual to
	frame.

	* src/ui.[ch] (meta_ui_create_frame_window): add new xvisual
	parameter and use it to create new window.
2003-11-16 04:19:18 +00:00
Rob Adams
a88f44ea64 don't set window->type_atom here so that the type-inference code will
2003-11-15  Rob Adams  <readams@readams.net>

	* src/window.c (update_net_wm_type): don't set window->type_atom
	here so that the type-inference code will actually be called.  Fix
	for #126873 from Keith Packard.
2003-11-16 03:56:04 +00:00
Rob Adams
3c384d37c6 configure frame first if we grow more than we shrink combined in both
2003-11-08  Rob Adams  <readams@readams.net>

	* src/window.c (meta_window_move_resize_internal): configure frame
	first if we grow more than we shrink combined in both dimensions.
	Patch from Soren Sandmann for #108925.
2003-11-08 17:25:49 +00:00
Rob Adams
66b2e8bc3f use maximize_after_placement to automaximize in meta_window_place; avoids
2003-11-07  Rob Adams  <readams@readams.net>

	* src/place.c (meta_window_place): use maximize_after_placement to
	automaximize in meta_window_place; avoids a problem with not
	recalculating the frame geometry after auto-maximizing.
2003-11-08 05:47:37 +00:00
Rob Adams
17dc2d6151 show the window if it's a transient of a dock or desktop, since otherwise
2003-11-07  Rob Adams  <readams@readams.net>

	* src/window.c (window_should_be_showing): show the window if it's
	a transient of a dock or desktop, since otherwise such windows are
	invisible in show desktop mode.  Fix for #124648.
2003-11-08 05:29:23 +00:00
Rob Adams
2218b79143 Try harder to find a theme in the event that the theme in the preference
2003-11-07  Rob Adams  <readams@readams.net>

	* src/main.c (main): Try harder to find a theme in the event that
	the theme in the preference cannot be found.  Patch from Marcin
	Krzyzanowski.  See #125815.

	* src/place.c (meta_window_place): use "visual" centering for
	dialog placement and clip new dialogs to an xinerama workspace.
	Fix for #118336.
2003-11-08 04:43:18 +00:00
Havoc Pennington
830a52ee25 patch to avoid creating stick/unstick menu items when only one workspace,
2003-10-30  Havoc Pennington  <hp@redhat.com>

	* src/menu.c (meta_window_menu_new): patch to avoid creating
	stick/unstick menu items when only one workspace, bug #116563
	from Michael Terry
2003-10-30 21:11:11 +00:00
Havoc Pennington
8658268847 if a window is focused which is not either a dock or a transient in the
2003-10-25  Havoc Pennington  <hp@redhat.com>

	* src/window.c (meta_window_notify_focus): if a window is focused
	which is not either a dock or a transient in the same group as a
	dock, shuffle all dock/desktop windows to the end of the MRU list
	so they won't annoyingly get focus all the time. #123816
2003-10-26 16:22:51 +00:00
Yukihiro Nakai
4770da34b3 Gettextize metacity-theme-viewer. #121747 2003-10-15 16:04:12 +00:00
Havoc Pennington
6aff3466c6 In the "prefs cause code complexity" department, here's a "sloppy focus
2003-10-13  Havoc Pennington  <hp@redhat.com>

        In the "prefs cause code complexity" department, here's a "sloppy
	focus die die die" kind of moment.

	* src/display.c (meta_display_grab_focus_window_button): don't
	grab in sloppy focus mode, since we were dropping the grab on
	window enter anyway this just removes races from the current
	behavior.

	* src/display.c (prefs_changed_callback): ungrab/grab on focus
	mode changes, since we treat sloppy and click differently.
2003-10-13 20:15:40 +00:00
Havoc Pennington
e98fad3e62 Merge reduced_resources mode patch from the branch. Offers wireframe and
2003-10-12  Havoc Pennington  <hp@redhat.com>

        Merge reduced_resources mode patch from the branch. Offers
	wireframe and no-animations.

	* src/window.c (implement_showing): no animation if we are
	in reduced resources mode

	* src/prefs.c: add REDUCED_RESOURCES pref

	* src/window.c (meta_window_update_keyboard_resize): fix to
	modify grab_anchor_window_pos to grab_wireframe_rect if
	appropriate instead of window->rect

	* src/display.h (struct _MetaDisplay): add grab_start_serial used
	to avoid responding to events that occurred prior to the grab
	initialization.

	Still broken in various ways, specifically EnterNotify that
	occurred prior to XGrabPointer is processed as if it occurred
	after.

	* src/window.c (meta_window_update_keyboard_move): add this
	instead of meta_window_warp_pointer() crack

	* src/effects.c (meta_effects_update_wireframe): draw a kind of
	grid for the wireframe, instead of just a rectangle, like twm

	* src/screen.c (meta_screen_new): line width of 3 for the XOR gc

        "Reduced resources" mode based on wireframe patch from
	Erwann Chenede. Still pretty buggy.

	* src/keybindings.c (process_keyboard_move_grab)
	(process_keyboard_resize_grab): add gruesome wireframe hacks

	* src/display.c (meta_display_end_grab_op): end wireframe
	(meta_display_begin_grab_op): begin wireframe

	* src/effects.c (meta_effects_end_wireframe)
	(meta_effects_update_wireframe, meta_effects_begin_wireframe):
	routines to draw the wireframe stuff

	* src/window.c (window_should_be_showing): hide window when
	doing wireframe, commented out as it breaks grab
	* src/window.c (meta_window_refresh_resize_popup): handle wireframe

	* src/screen.c (meta_screen_new): create a screen->root_xor_gc
	for use in drawing wireframes

	* src/frames.c (meta_frames_push_delay_exposes): repaint
	everything before we delay
2003-10-12 06:25:38 +00:00
Havoc Pennington
6628acb59c initialize display->grab_have_pointer to FALSE, previously I think you
2003-10-11  Havoc Pennington  <hp@pobox.com>

	* src/display.c (meta_display_begin_grab_op): initialize
	display->grab_have_pointer to FALSE, previously I think you could
	get a case where we didn't have the grab and thought we did.
	Bugs were reported with this happening. Of course we still have
	the "why did the grab fail" problem, but it should be less
	noticeable with this fixed.
2003-10-11 04:27:06 +00:00
Rob Adams
6d7d586f3c disable onscreen resize constraints for right, left, and bottom, since
2003-10-06  Rob Adams  <readams@readams.net>

	* src/constraints.c (constraint_onscreen_*_func): disable onscreen
	resize constraints for right, left, and bottom, since there is no
	way to violate onscreen constraints by resizing in these
	directions and the code to implement the constraints made some
	incorrect assumptions.  Fix for #120701, #120756, #123165,
	#123631, #123838.
2003-10-07 02:08:45 +00:00
Havoc Pennington
199d20197e add the moveresize idle at META_PRIORITY_RESIZE so it runs before GTK does
2003-09-30  Havoc Pennington  <hp@redhat.com>

	* src/window.c (meta_window_queue_move_resize): add the moveresize
	idle at META_PRIORITY_RESIZE so it runs before GTK does any
	drawing, may fix bug #109211 (seem to for me)

	* src/ui.h (META_PRIORITY_RESIZE): add this between GTK
	resize/redraw priorities

	* src/display.c (meta_display_queue_retheme_all_windows): remove
	some debug spew from meta_warning
2003-09-30 20:36:02 +00:00
Havoc Pennington
5fdb8ab7d6 remove nonstandard header include, #121870
2003-09-30  Havoc Pennington  <hp@redhat.com>

	* src/testasyncgetprop.c: remove nonstandard header include,
	#121870
2003-09-30 20:05:35 +00:00
Havoc Pennington
7c80b0a335 call bind_textdomain_codeset(), fix from Yukihiro Nakai bug #121743
2003-09-30  Havoc Pennington  <hp@redhat.com>

	* src/tools/metacity-message.c (main): call
	bind_textdomain_codeset(), fix from Yukihiro Nakai bug #121743
2003-09-30 19:59:15 +00:00
Rached Ben Mustapha
37640a925e Fix bug #118428
2003-07-28  Rached Ben Mustapha <rached@benmur.net>

        Fix bug #118428

        * src/window.c (redraw_icon): Also redraw window icon if the window
	is not mapped but its frame is.
	(idle_update_icon): Unset the window->update_icon_queued flag.
2003-09-30 19:45:56 +00:00
Havoc Pennington
0895abd894 put a random cap on number of characters in the title of each window, bug
2003-09-29  Havoc Pennington  <hp@redhat.com>

	* src/tabpopup.c (meta_ui_tab_popup_new): put a random cap on
	number of characters in the title of each window, bug #109301
2003-09-29 23:42:45 +00:00
Havoc Pennington
89ca4aab3d a little program to test size hints, for now just a 0x0 min size to verify
2003-09-29  Havoc Pennington  <hp@redhat.com>

	* src/wm-tester/test-size-hints.c: a little program to test size
	hints, for now just a 0x0 min size to verify bug #113320
2003-09-29 23:21:41 +00:00
Havoc Pennington
a4dc0d581a attempt to fix this to return the data as an array of long even on 64-bit
2003-09-29  Havoc Pennington  <hp@redhat.com>

	* src/async-getprop.c (async_get_property_handler): attempt to fix
	this to return the data as an array of long even on 64-bit as with
	XGetWindowProperty() breakage, bug #114035, credit to Gwenole
	Beauchesne for tracking down.
2003-09-29 22:17:16 +00:00
Havoc Pennington
a889ff3469 fix the 64-bit check not to use macros from the X tree that don't get set
2003-09-29  Havoc Pennington  <hp@redhat.com>

	* src/xprops.c (cvtINT16toInt): fix the 64-bit check not to use
	macros from the X tree that don't get set

	* configure.in: check for sizes of various types
2003-09-29 18:16:45 +00:00
Havoc Pennington
320ef83bfc don't move the focus after you click the close button on a window. bug
2003-09-29  Havoc Pennington  <hp@redhat.com>

	* src/delete.c (meta_window_delete): don't move the focus after
	you click the close button on a window. bug #108706
2003-09-29 17:35:11 +00:00
Havoc Pennington
8849fad8f9 fix warnings (one was a real bug)
2003-09-29  Havoc Pennington  <hp@redhat.com>

	* src/main.c (find_accessibility_module): fix warnings (one was a
	real bug)

	* src/ui.c (meta_gdk_pixbuf_get_from_pixmap): fix warning that
	probably explains remaining crash on bug #116923. Jeez, need to
	use -Werror here or something.

        Fix #103575, spawn child processes on proper screen.

	* src/keybindings.c (error_on_command): pass --screen to
	metacity-dialog
	(handle_run_command): launch user command with DISPLAY reflecting
	the screen you launch it from

	* src/delete.c (delete_ping_timeout_func): pass --screen to
	metacity-dialog
2003-09-29 16:55:26 +00:00
Havoc Pennington
26c2ae81ea when focus on root window becomes None, set it to something other than
2003-09-26  Havoc Pennington  <hp@redhat.com>

	* src/display.c (event_callback): when focus on root window
	becomes None, set it to something other than None so keybindings
	keep working and print a warning about how some application sucks.
	#84564
	(event_callback): Fix debug spew to print focus event details
	properly
	(meta_display_open): when setting initial focus, always use
	RevertToPointerRoot and fix the focus if it's None or PointerRoot
2003-09-27 02:40:09 +00:00
Padraig O'Briain
922932d240 Add -DMETACITY_LIBDIR to support loading of modules Add functions
2003-09-26  Padraig O'Briain  <padraig.obriain@sun.com>

	* src/Makefile.am: Add -DMETACITY_LIBDIR to support loading of modules
	* src/main.c: Add functions find_accessibility_module,
	accessibility_invoke_module and accessibility_invoke
	(main); Check whether GConf accessibility key is true and if so
	load accessibility modules. This code is based on the libgnome code.

	src/tabpopup.c (meta_ui_tab_popup_new): Set accessible role of
	accessible for label containing window name to STATUSBAR so
	AT can be aware of window name.

	This fixes bug #120025
2003-09-26 17:04:37 +00:00
Havoc Pennington
28fbdc611e fix hang when we get EOF, #121376 from Laurent Vivier
2003-09-24  Havoc Pennington  <hp@pobox.com>

	* src/session.c (io_from_warning_dialog): fix hang when we get
	EOF, #121376 from Laurent Vivier
2003-09-25 01:50:30 +00:00
Rob Adams
dc40522ea7 Fix bug where multiple entries could appear in MRU lists, or no entry when
2003-09-20  Rob Adams <readams@readams.net>

	Fix bug where multiple entries could appear in MRU lists, or no
	entry when sticking/unsticking windows.  Fix for #122016

	* src/window.c (meta_window_stick): use window->screen->workspaces
	instead of window->workspaces.
	(meta_window_unstick): use window->screen->workspaces instead of
	window->workspaces.
2003-09-20 17:05:35 +00:00
Rob Adams
de44b2d794 Fix a bug with partial-width panel struts caused by incorrect computation
2003-09-19  Rob Adams <readams@readams.net>

	Fix a bug with partial-width panel struts caused by incorrect
	computation of rectangle widths, and another when using different
	screen resolutions on xineramas.  See #122404.  Also fix a crash
	bug with the MRU list when sticking and unsticking windows.  See
	#120809.

	* src/constraints.c (get_outermost_onscreen_positions): Fix
	off-by-one error with partial-width struts.

	* src/window.c (meta_window_update_struts): Fix off-by-one error
	with partial-width struts.
	(meta_window_stick): assign back to GList after g_list_append
	(meta_window_unstick): assign back to GList after g_list_append

	* src/workspace.c (ensure_work_areas_validated): For right and
	bottom struts, compute strut relative to root window and not to
	xinerama edge in compliance with EWMH recommendations.
2003-09-20 04:58:25 +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
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
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
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
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
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
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
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
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
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
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
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
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
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