1
0
Fork 0
Commit graph

298 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Havoc Pennington
8f7eda43a8 implement compression of motion events (drop all but the most recently
2003-01-11  Havoc Pennington  <hp@pobox.com>

	* src/window.c (meta_window_handle_mouse_grab_op_event): implement
	compression of motion events (drop all but the most recently
	received), guessing at fixes for #103009
2003-01-11 19:32:12 +00:00
Havoc Pennington
5d2f307735 argh, we were making all dialogs skip taskbar; when did that get added.
2003-01-09  Havoc Pennington  <hp@redhat.com>

	* src/window.c (recalc_window_features): argh, we were making all
	dialogs skip taskbar; when did that get added.  Fix to match
	libwnck, only skip taskbar when the dialog is transient for some
	other app window.
2003-01-09 23:28:01 +00:00
Arvind Samptur
e2155c8fee don't apply offscreen height difference. This would get the window under
2003-01-06  Arvind Samptur <arvind.samptur@wipro.com>
        * src/window.c: (constrain_position) don't apply
        offscreen height difference. This would get the
        window under the panel on a resize or a move.
        Fixes #102418
2003-01-06 04:40:11 +00:00
Havoc Pennington
b799630ba5 focus new windows even in mouse focus mode, #89981, patch from
2003-01-05  Havoc Pennington  <hp@pobox.com>

	* src/window.c (meta_window_show): focus new windows even in
	mouse focus mode, #89981, patch from readams@hmc.edu
2003-01-05 18:39:55 +00:00
Havoc Pennington
6cfcc01334 handle the client having a shape mask, fixes #101806
2003-01-05  Havoc Pennington  <hp@pobox.com>

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

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

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

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

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

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

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

	* src/window.c (meta_window_fill_horizontal)
	(meta_window_fill_vertical): maximize to work area, not entire
	screen. doh.
2003-01-03 19:06:53 +00:00
Havoc Pennington
91641c2cf3 select ColormapChangeMask on toplevel windows, maybe a partial fix for
2002-12-18  Havoc Pennington  <hp@redhat.com>

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

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

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

	* src/window.c (update_sm_hints): ditto

	* src/keybindings.c (reload_modmap): ditto
	(meta_display_process_key_event): ditto
2002-12-19 20:18:54 +00:00
Havoc Pennington
89c31c43ca select ColormapChangeMask on toplevel windows, maybe a partial fix for
2002-12-18  Havoc Pennington  <hp@redhat.com>

	* src/window.c (meta_window_new): select ColormapChangeMask
	on toplevel windows, maybe a partial fix for #101478
2002-12-18 22:16:58 +00:00
Havoc Pennington
8a9a4aba77 get window name before anything else.
2002-12-15  Havoc Pennington  <hp@pobox.com>

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

	* src/xprops.c (validate_or_free_results): instead of suggesting
	how to get window title etc. with xprop, just print out the
	window title. much better.
2002-12-15 21:59:38 +00:00
Havoc Pennington
967777b965 add myself here, bug #100789
2002-12-09  Havoc Pennington  <hp@pobox.com>

	* AUTHORS: add myself here, bug #100789

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

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

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

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

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

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

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

	* src/display.c, src/window.c: Handle crossing events during
	resizing. (#93384).
2002-12-09 21:07:27 +00:00
Havoc Pennington
9c337d0a8f updates
2002-12-08  Havoc Pennington  <hp@pobox.com>

	* README: updates

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

	* src/util.c (ensure_logfile): kill this function when verbose
	mode is disabled.
2002-12-09 02:53:16 +00:00