1
0
Fork 0
Commit graph

90 commits

Author SHA1 Message Date
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
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
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
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
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
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
Havoc Pennington
6cfcc01334 handle the client having a shape mask, fixes #101806
2003-01-05  Havoc Pennington  <hp@pobox.com>

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

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

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

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

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

	* src/prefs.c (update_application_based): don't let people turn on
	application_based, as it just causes funky bugs. We can reenable
	the pref when/if it ever does something useful.
2003-01-05 07:51:02 +00:00
Havoc Pennington
967777b965 add myself here, bug #100789
2002-12-09  Havoc Pennington  <hp@pobox.com>

	* AUTHORS: add myself here, bug #100789

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

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

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

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

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

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

	* configure.in (HAVE_XSYNC): check for Xsync extension
2002-12-10 03:23:04 +00:00
Havoc Pennington
e0c8b245ef new functions to resize to fill screen
2002-12-08  Havoc Pennington  <hp@pobox.com>

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

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

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

	* src/metacity.schemas.in: shorten some overlong short
	descriptions that make the keybindings capplet look ugly.
	Add maximize_vertically, maximize_horizontally keys.
2002-12-08 21:09:05 +00:00
Hidetoshi Tajima
d78fab02eb never use a window with input = FALSE take_focus = FALSE in the normal and
* src/window.h (META_WINDOW_IN_NORMAL_TAB_CHAIN,
	META_WINDOW_IN_DOCK_TAB_CHAIN) : never use a window with input =
	FALSE take_focus = FALSE in the normal and doc tab chains #90409
2002-12-06 05:07:01 +00:00
Havoc Pennington
5e1439f89e lengthen to 15 seconds
2002-11-30  Havoc Pennington  <hp@pobox.com>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

	* src/screen.c (startup_sequence_timeout): when timing out a
	startup sequence, send a remove message, don't just time it out
	locally.
2002-12-01 03:58:04 +00:00
Havoc Pennington
9feebc05c7 add _NET_WM_NAME, WM_NAME, _NET_WM_ICON_NAME, WM_ICON_NAME support
2002-11-03  Havoc Pennington  <hp@pobox.com>

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

	* src/window.c (meta_window_new): use window-props.h for
	_NET_WM_NAME, WM_NAME, _NET_WM_ICON_NAME, WM_ICON_NAME
2002-11-04 00:19:08 +00:00
Havoc Pennington
9702903343 make public
2002-10-24  Havoc Pennington  <hp@pobox.com>

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

	* src/screen.c (meta_screen_ensure_tab_popup): put the alt+tab
	highlight-window indicator on the icon, not the window itself,
	if the window is minimized.
2002-10-24 05:21:51 +00:00
Havoc Pennington
c6b475b251 Optimizations for managing new windows (do not all take effect if
2002-10-21  Havoc Pennington  <hp@redhat.com>

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

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

	* src/display.c (meta_change_button_grab): ditto

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

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

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

	* src/Makefile.am (INCLUDES): define G_LOG_DOMAIN
2002-10-21 21:44:35 +00:00
Havoc Pennington
94b6dde6bb make it static
2002-10-01  Havoc Pennington  <hp@pobox.com>

	* src/screen.c (meta_screen_resize_func): make it static

	* src/stack.c (get_standalone_layer): put above/below windows
	in an appropriate layer.

	* src/screen.c (set_supported_hint): say we support above/below

	* src/display.h (struct _MetaDisplay): add _NET_WM_STATE_ABOVE,
	_NET_WM_STATE_BELOW atoms

	* src/window.c (meta_window_client_message): handle above/below
	state messages
	(set_net_wm_state): handler above/below state
	(update_net_wm_state): handle above/below states
2002-10-02 00:47:29 +00:00
Havoc Pennington
e96e7ffc89 Rewrite stack code to work a lot differently. Should be better now, and
2002-09-28  Havoc Pennington  <hp@pobox.com>

	* src/window.c, src/stack.c: Rewrite stack code to work a lot
	differently. Should be better now, and not lose relative positions
	of windows when moving among layers. Also should now be possible
	to get session management to restore the stacking order.  Probably
	breaks some stuff, and makes all the stack.c changes I made
	yesterday sort of irrelevant.
2002-09-28 16:33:39 +00:00
Havoc Pennington
e7e41b045d keep a flag transient_parent_is_root_window for whether the
2002-09-27  Havoc Pennington  <hp@redhat.com>

	* src/window.c (update_transient_for): keep a flag
	transient_parent_is_root_window for whether the
	root-window-as-parent convention was used.

2002-09-25  Arvind Samptur <arvind.samptur@wipro.com>

 	* src/stack.c (sort_window_list): Keep dialogs without
 	transient parent above entire app. Fixes #88926
2002-09-27 19:42:59 +00:00
Havoc Pennington
4694ded7cd new function
2002-09-24  Havoc Pennington  <hp@redhat.com>

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

	* src/stack.c (compute_layer): put focused window in a layer above
	all other windows, in click-to-focus mode. #93022

	* src/window.c (meta_window_notify_focus): update window layer on
	focus change.
2002-09-24 21:22:06 +00:00
Havoc Pennington
27e35b8bcd window is in fullscreen layer if any member of its group is fullscreen
2002-08-12  Havoc Pennington  <hp@redhat.com>

	* src/stack.c (compute_layer): window is in fullscreen layer if
	any member of its group is fullscreen

	* src/window.c (meta_window_unmake_fullscreen): update layer for
	whole window group
	(meta_window_make_fullscreen): ditto

	* src/util.c (meta_unsigned_long_hash): move hash/equal funcs for
	Window in here.

	* src/group.c: track window groups so we can do stuff with them.
2002-08-12 21:32:13 +00:00
Craig Black
4fcc9f052e Patch to provide extra cues to the user when using window menu move and
2002-08-08  Craig Black  <blackc@speakeasy.net>

  Patch to provide extra cues to the user when using
  window menu move and resize, #85724.

  * src/common.h: add new cursors

  * src/display.c: (grab_op_is_mouse)
  (meta_display_create_x_cursor), (xcursor_for_op),
  (meta_display_set_grab_op_cursor),
  (meta_display_begin_grab_op):
  The keyboard move and resize grab ops now also use the mouse.
  Allow the grab cursor to be changed during the grab op.
  Hold onto the initial grab position in case of reset.

  * src/display.h: save the initial grab position

  * src/keybindings.c: (process_keyboard_move_grab),
  (process_keyboard_resize_grab), (handle_begin_move),
  (handle_begin_resize):
  The keyboard move and resize grab ops now also use the mouse.

  * src/window.c: (meta_window_client_message), (menu_callback),
  (update_move), (update_resize),
  (meta_window_handle_mouse_grab_op_event), (warp_pointer),
  (meta_window_warp_pointer), (meta_window_begin_grab_op),
  (meta_window_update_resize_grab_op):
  When moving or resizing a window use the last grab position
  in computing change increment.
  Provide support for warping the mouse pointer.

  * src/window.h: new warp pointer and grab op helper functions
2002-08-09 04:27:23 +00:00
Havoc Pennington
a62b3c8b29 Apply blackc@speakeasy.net patch, bug #83940, to do mini-workspaces
2002-07-06  Havoc Pennington  <hp@pobox.com>

        Apply blackc@speakeasy.net patch, bug #83940, to do
	mini-workspaces similar to the pager, when switching
	spaces.

	* src/window.c (update_net_wm_state): actually fill in
	wm_state_skip_taskbar, wm_state_skip_pager flags

	* src/tabpopup.c: support drawing a mini-workspace similar to the
	one the pager draws.

	* src/stack.c (meta_stack_list_windows): new function to list
	the windows in stacking order

	* src/screen.c (meta_screen_ensure_workspace_popup): don't pass in
	the ugly default app icon for workspaces

	* src/display.c (event_callback): fix from blackc@speakeasy.net
	to avoid dereferencing a NULL grab window.
2002-07-06 19:05:37 +00:00
Havoc Pennington
d826e620a9 use new macros to get whether we allow move/resize correct
2002-07-02  Havoc Pennington  <hp@pobox.com>

	* src/window.c (meta_window_show_menu): use new macros to get
	whether we allow move/resize correct

	* src/frame.c (meta_frame_get_flags): use new macros to get
	whether we can move/resize correct, considering
	maximized/fullscreen for the move case.

	* src/window.h (META_WINDOW_ALLOWS_RESIZE,
	META_WINDOW_ALLOWS_MOVE): new macros

	* src/keybindings.c (process_keyboard_resize_grab): finish the
	right/left resize, patch from Jayaraj #78179.

	Has the same old move/resize bug, if it hits a constraint it
	starts to break because we move without resizing.
2002-07-03 02:32:40 +00:00
Havoc Pennington
de42a62f4e Theme breakage! Themes have to implement "border" frames now, see Atlanta
2002-06-21  Havoc Pennington  <hp@pobox.com>

        Theme breakage! Themes have to implement "border" frames
	now, see Atlanta for an example. Fixes #84285

	* src/tools/metacity-window-demo.c (do_appwindow): add a
	border-only window

	* src/window.c (update_mwm_hints): read border only from the MWM
	hints

	* src/window.h (struct _MetaWindow): add border_only flag

	* src/core.c (meta_core_get_frame_type): report border type if
	required

	* src/common.h (enum): add META_FRAME_TYPE_BORDER
2002-06-22 03:23:02 +00:00
Havoc Pennington
2b780e5486 short-circuit the "only one xinerama" case, and use outer rect of window
2002-06-08  Havoc Pennington  <hp@pobox.com>

	* src/screen.c (meta_screen_get_xinerama_for_window):
	short-circuit the "only one xinerama" case, and use outer rect of
	window instead of window->rect, so we get root window coords.

	* src/theme.c (meta_frame_layout_get_borders): if fullscreen all
	frame edges are zero-width.

	* src/frame.c (meta_frame_get_flags): init fullscreen flag.

	* src/common.h (enum): add META_FRAME_FULLSCREEN frame flag

	* src/place.c: fix up calls to meta_window_get_work_area

	* src/window.c (meta_window_get_work_area): add an arg for whether
	the work area is for the screen or the xinerama subscreen.
	(constrain_position): fix up calls to meta_window_get_work_area
	(constrain_size): ditto

	* src/screen.c (meta_screen_new): add METACITY_DEBUG_XINERAMA
	environment variable which simulates xinerama on a single head.
2002-06-08 06:07:21 +00:00
Havoc Pennington
a40a9eccf4 Patch from Gaute Lindkvist so you can't move the panel or desktop to only
2002-05-26  Havoc Pennington  <hp@pobox.com>

        Patch from Gaute Lindkvist so you can't move the panel or desktop
	to only one workspace.

	* src/keybindings.c (handle_move_to_workspace): don't allow moving
	window to another space if the window is always_sticky

	* src/window.c (recalc_window_features): set the always_sticky
	field for desktop/dock windows.
	(meta_window_show_menu): disable unsticking always sticky windows
	via the menus

	* src/menu.c (meta_window_menu_new): disable workspace items
	if requested
2002-05-26 15:54:38 +00:00
Havoc Pennington
912afb6e6b DefaultScreen() returns the screen number not Screen*
2002-05-09  Havoc Pennington  <hp@redhat.com>

	* src/frames.c (show_tip_now): DefaultScreen() returns the screen
	number not Screen*

	* src/frame.c (meta_frame_sync_to_window): immediately repaint
	frame whenever we resize it, if we're inside a grab operation.

	* src/frames.c (meta_frames_repaint_frame): new function

	* src/window.c (meta_window_new): initialize window's colormap
	(meta_window_notify_focus): install the colormap for a window when
	it gets focus, uninstall on unfocus.

	* src/window.h (struct _MetaWindow): store window's colormap

	* src/display.c (event_callback): note changes to window colormap

	* src/frame.c (EVENT_MASK): add ColormapChangeMask
2002-05-09 22:34:00 +00:00
Havoc Pennington
41120f2a79 on unminimize, queue calc_showing on all transients
2002-05-05  Havoc Pennington  <hp@pobox.com>

	* src/window.c (meta_window_unminimize): on unminimize, queue
	calc_showing on all transients
	(meta_window_activate): on activate, unminimize all a window's
	ancestors, not just the window itself.

	* src/workspace.c (set_work_area_hint): don't increment "tmp" by
	16 unsigned long, increment by 4

	* src/window.c (meta_window_free): if a window isn't minimized,
	restore its WM_STATE to NormalState instead of IconicState,
	since IconicState on initial window map means that the window
	should be minimized.

	* src/workspace.c (meta_workspace_invalidate_work_area): queue an
	idle to recompute the work area hint.
	(set_work_area_hint): we need 4*num_workspaces ints, not just
	num_workspaces.

	* src/screen.c (meta_screen_new): add work_area_idle field,
	handle it on screen shutdown

	* src/common.h (META_PRIORITY_PREFS_NOTIFY,
	META_PRIORITY_WORK_AREA_HINT): define some idle priorities

	* src/window.c (meta_window_calc_showing): hide windows if
	their parent window is minimized
	(meta_window_minimize): also queue_calc_showing on all
	transients of the window being minimized

	* src/place.c (constrain_placement): function to apply
	placement-time-only constraints, such as "not off the left of the
	screen"
	(meta_window_place): put dialogs down a bit over their parent,
	not right at the top.
	(meta_window_place): when centering a dialog, center it
	on the current xinerama screen, rather than the entire
	screen.

	* src/screen.c (meta_screen_get_current_xinerama): new function,
	but not implemented
2002-05-05 05:41:13 +00:00
Havoc Pennington
2a71cab8c4 reply immediately for windows that don't support _NET_WM_PING
2002-04-15  Havoc Pennington  <hp@redhat.com>

	* src/display.c (meta_display_ping_window): reply immediately for
	windows that don't support _NET_WM_PING

	* src/window.c (update_protocols): check whether windows
	support _NET_WM_PING
2002-04-15 22:14:06 +00:00
Havoc Pennington
d02060e201 new file containing all the wacky mess I just added to a simple "click the
2002-04-13  Havoc Pennington  <hp@pobox.com>

	* src/delete.c: new file containing all the
	wacky mess I just added to a simple "click the close button",
	contains all the dealing-with-dead-application cruft.
	Use metacity-window-demo to test by clicking the
	toolbar button that locks it up.
2002-04-13 04:58:45 +00:00
Havoc Pennington
fa0592ebc7 remove the unused tab stuff
2002-04-05  Havoc Pennington  <hp@pobox.com>

	* src/stack.c: remove the unused tab stuff

	* src/display.c: implement tab list among panels

	* src/keybindings.c: fill in move-between-panels keybindings
2002-04-05 15:52:49 +00:00
Havoc Pennington
bfc47ccd6e Add some total crackrock resize-grid indication for windows that have
2002-03-17  Havoc Pennington  <hp@pobox.com>

	* src/resizepopup.c: Add some total crackrock resize-grid
	indication for windows that have width_inc/height_inc
	so I can debug gnome-terminal sizing.
2002-03-17 17:22:23 +00:00
Havoc Pennington
11089cb824 use new functions
2002-03-11  Havoc Pennington  <hp@pobox.com>

	* src/keybindings.c: use new functions

	* src/display.c (meta_display_get_tab_next):
	(meta_display_get_tab_list): new tab order functions using
	MRU list instead of map order

	* src/window.c (meta_window_notify_focus): maintain focus MRU list

	* src/display.h (struct _MetaDisplay): Keep an MRU list of
	windows.
2002-03-12 04:34:17 +00:00
Havoc Pennington
20218dac92 put in hack to keep Pango from mangling our server grab and locking up on
2002-02-19  Havoc Pennington  <hp@pobox.com>

	* src/ui.c (meta_ui_init): put in hack to keep Pango from mangling
	our server grab and locking up on startup. (hack doesn't work
	but I want to fix it on my real computer not this laptop)

	* src/window.c: Implement _NET_WM_STATE_FULLSCREEN

	* src/display.c (meta_display_open): add atoms for
	_NET_WM_STATE_FULLSCREEN
2002-02-23 22:58:02 +00:00
Havoc Pennington
245c9c2d7e port to icon cache
2002-02-09  Havoc Pennington  <hp@pobox.com>

	* src/window.c (update_icon): port to icon cache

	* src/iconcache.c, src/iconcache.c: begin process of cleaning up
	window.c by moving the icon-reading code in here, based on the
	code in libwnck, which was in turn based on the earlier metacity
	code
2002-02-09 23:03:52 +00:00
Havoc Pennington
116fc5546f put in some kind of distinctive frame for UTILITY, though it's ugly. Also
2002-02-09  Havoc Pennington  <hp@pobox.com>

	* src/themes/Atlanta/metacity-theme-1.xml: put in some kind of
	distinctive frame for UTILITY, though it's ugly. Also put in the
	borderless look for maximized windows.

	* src/stack.c (compute_layer): put splash screen in the splash
	layer

	* src/stack.h (enum): create a splash screen layer

	* src/place.c (meta_window_place): center splashscreen, and fix a
	typo in the centering code

	* src/window.c (recalc_window_features): disable most features on
	splash screens

	* src/screen.c (set_supported_hint): add UTILITY and SPLASHSCREEN
	hints

	* src/window.c: add UTILITY, SPLASHSCREEN implementation

	* src/window.h (enum): add UTILITY, SPLASHSCREEN types

	* src/theme-parser.c (parse_toplevel_element): parser support
	for has_title attribute

	* src/theme.c (meta_frame_layout_get_borders): handle a has_title
	field in the layout, for utility windows that don't display a
	title (would be better to be able to shrink the title text,
	but that's kind of tricky to implement :-/)
2002-02-09 06:54:44 +00:00
Havoc Pennington
b52ee424e4 Only consider the bottom of the titlebar a resize control; I keep
2002-01-27  Havoc Pennington  <hp@pobox.com>

	* src/frames.c (get_control): Only consider the bottom of the
	titlebar a resize control; I keep accidentally resizing windows
	instead of activating them. Also, give south resizing priority
	over north, if the window is so small the active regions overlap

	* src/theme.c: add MetaTheme, get MetaFrameStyleSet into
	a usable state

	* src/common.h: move window type back to window.h, decided
	not to use it on frame side
	(MetaFrameType): add this instead
2002-01-27 08:21:53 +00:00
Havoc Pennington
7eac9e4958 make the check for whether to eat focus click a lot more complicated
2002-01-27  Havoc Pennington  <hp@pobox.com>

	* src/display.c (event_callback): make the check for whether to
	eat focus click a lot more complicated

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

	* src/prefs.h, src/prefs.c: add application based pref

	* src/metacity.schemas: add "application_based" setting to
	give me a mode to fool with being application based,
	without being unusable in the meantime. Yeah the crack flows
	freely these days. Everyone knew it would happen.
2002-01-27 05:50:34 +00:00
Havoc Pennington
5fdb8463de cheesy client with static bit gravity, used to test the below change.
2002-01-19  Havoc Pennington  <hp@pobox.com>

	* src/wm-tester/test-resizing.c: cheesy client with static
	bit gravity, used to test the below change.

	* src/window.c (meta_window_move_resize_internal): implement
	Owen's proposal for window resizing.
	http://mail.gnome.org/archives/wm-spec-list/1999-November/msg00088.html

	Currently you have to do METACITY_USE_STATIC_GRAVITY=1 in order to
	use it, because some GDK bug is screwing up exposes on my frames
	when it's enabled.

	* src/display.c (meta_display_create_x_cursor): fix glyph for
	NE/NW cursors

	* src/frames.c (get_control): add ability to resize from top

	* src/frame.c (meta_frame_get_flags): can't resize shaded windows
	(meta_frame_sync_to_window): add gravity arg

	* src/common.h (MetaWindowType): move here from window.h so
	it can be used in themes stuff.
	(MetaFrameFlags): remove META_FRAME_TRANSIENT since it
	overlaps with window type and was unused.
2002-01-19 23:59:11 +00:00
Havoc Pennington
19d2e8c7e1 give priority to keeping NW corner onscreen rather than SE, if we need to
2002-01-18  Havoc Pennington  <hp@pobox.com>

	* src/window.c (constrain_position): give priority to keeping NW
	corner onscreen rather than SE, if we need to shift the window
	to fit inside constraints

	* src/frames.c (meta_frames_get_geometry): don't depend on the
	current window size

	* src/theme.c: move geometry stuff in here, to be calculated as
	part of the theme

	* src/core.c (meta_core_get_client_size): new function to replace
	meta_core_get_frame_size() so we don't have weird cycles
	in the geometry calculation
2002-01-19 03:50:03 +00:00
Havoc Pennington
b2bbb306f4 store strut information, update it on property changes, etc. etc. so we
2002-01-09  Havoc Pennington  <hp@pobox.com>

	* src/window.c, src/window.h: store strut information,
	update it on property changes, etc. etc. so we avoid panel
	on maximize.

	* src/workspace.c (meta_workspace_get_work_area): add accessor for
	work area so we can compute it lazily

	* src/display.h, src/display.c: add _NET_WM_STRUT atom
	and _WIN_HINTS atom
2002-01-10 06:31:31 +00:00
Havoc Pennington
69dae32c37 Rework the click-client-area-to-focus support to use synchronous grabs,
2001-12-10  Havoc Pennington  <hp@pobox.com>

        Rework the click-client-area-to-focus support to use synchronous
	grabs, avoids a big mess, lets us pass through click when
	required (for dock/desktop). Disadvantage is all left-button
	clicks now require window manager approval. ;-)

	* src/display.c (event_callback): don't focus dock/desktop when
	the mouse enters them; require a click.
	(meta_change_button_grab): allow sync grabs
	(meta_display_grab_unfocused_window_buttons): establish a
	synchronous grab and maintain it all the time, rename to
	meta_display_grab_focus_window_button

	* src/window.c: change to reflect display.c
2001-12-11 04:03:58 +00:00
Havoc Pennington
fa803fd88f fix broken "tmp = tmp->data"
2001-12-10  Havoc Pennington  <hp@pobox.com>

	* src/screen.c (meta_screen_foreach_window): fix broken
	"tmp = tmp->data"

	Implement do-not-pass-thru-click for click-to-focus mode.

	* src/screen.c (update_focus_mode): when focus mode changes,
	update all the window grabs

	* src/display.c (meta_display_grab_unfocused_window_buttons):
	implement grabbing button 1 on client area of unfocused
	click-to-focus windows

	* src/window.c (meta_window_update_unfocused_button_grabs): update
	whether we're grabbing unmodified button 1 on client area
	according to focus state and focus mode
	(meta_window_new): start out with proper grab state
2001-12-10 07:48:21 +00:00
Havoc Pennington
3b9c81f390 note exciting new unminimize feature for the tab popup
2001-10-29  Havoc Pennington  <hp@pobox.com>

	* README: note exciting new unminimize feature for the tab popup

	* src/keybindings.c (process_tab_grab): use meta_window_activate()
	when choosing a window with tab popup, this should deiconify it

	* src/window.c (meta_window_client_message): use
	meta_window_activate for _NET_ACTIVE_WINDOW message
	(meta_window_activate): new function to raise/focus/unminimize
	(meta_window_flush_calc_showing): new function
	(meta_window_focus): force a calc showing on focus, so that we can
	focus the window if appropriate (it must be mapped)
2001-10-29 07:00:46 +00:00
Havoc Pennington
d080f816b6 I was using meta_workspace_contains_window() in a number of places where
2001-10-25  Havoc Pennington  <hp@pobox.com>

	* src/window.c (meta_window_visible_on_workspace):
	I was using meta_workspace_contains_window() in a number of
	places where on_all_workspaces should also have been considered,
	thus this new function. Fixes bugs such as pinned windows
	not appearing in the tab order.
	(meta_window_client_message): use meta_window_visible_on_workspace

	* src/stack.c (find_tab_forward): ditto
	(find_tab_backward): ditto
	(meta_stack_get_tab_next): ditto
	(meta_stack_get_tab_list): ditto

	* src/place.c (get_windows_on_same_workspace): ditto

	* src/keybindings.c (handle_focus_previous): ditto
	(handle_focus_previous): ditto
2001-10-25 04:51:25 +00:00
Havoc Pennington
842eb3fa93 take a window mapped at fullscreen size/pos to desire maximization; once I
2001-10-14  Havoc Pennington  <hp@pobox.com>

	* src/window.c (meta_window_new): take a window mapped at
	fullscreen size/pos to desire maximization; once I add a
	fullscreen state, will change to copy kwin and take this mapping
	as a desire for fullscreen, but for now testing with maximization.

	* src/window.h: remove fullscreen window type, now proposing it
	as a window state instead.

2001-10-14  Havoc Pennington  <hp@pobox.com>

	* src/window.c (meta_window_maximize): always raise windows on
	maximize
	(meta_window_client_message): when activating a window, move
	it to current workspace, instead of moving user to the
	window's workspace.
2001-10-14 22:13:53 +00:00
Havoc Pennington
7be4c63ee4 new function
2001-09-16  Havoc Pennington  <hp@pobox.com>

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

	* configure.in: bump version to 2.3.8

	* src/display.c (event_callback): raise dock on enter notify,
	lower it on leave notify (need to refine this behavior)

	* src/stack.c (compute_layer): experiment with putting the panel
	in the normal layer, and raising it on mouseover
2001-09-16 21:50:27 +00:00
Havoc Pennington
39df21227d add support for a mini icon in the titlebar (update_icon): re-enable
2001-09-15  Havoc Pennington  <hp@pobox.com>

	* src/window.c: add support for a mini icon in the titlebar
	(update_icon): re-enable support for _NET_WM_ICON

	* src/session.c (save_state): add an ferror check when writing
	session file
2001-09-16 00:30:45 +00:00
Havoc Pennington
f386494ba4 Don't separate user_has_moved/user_has_resized, fixes bug in east-resizing
2001-09-10  Havoc Pennington  <hp@pobox.com>

	* src/window.c: Don't separate user_has_moved/user_has_resized,
	fixes bug in east-resizing Emacs, among other things

	* src/frame.c (meta_frame_sync_to_window): return immediately if
	nothing to do

	* src/util.c (ensure_logfile): replace rather than truncate old
	logfiles
2001-09-11 02:57:05 +00:00