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
This commit is contained in:
Havoc Pennington
2003-06-28 16:12:32 +00:00
committed by Havoc Pennington
parent e1102bc6ff
commit fa075eb8f1
4 changed files with 61 additions and 23 deletions

View File

@ -4842,6 +4842,8 @@ meta_window_update_struts (MetaWindow *window)
MetaRectangle new_right;
MetaRectangle new_top;
MetaRectangle new_bottom;
#define MIN_EMPTY (75)
meta_verbose ("Updating struts for %s\n", window->desc);
@ -4893,13 +4895,13 @@ meta_window_update_struts (MetaWindow *window)
{
new_has_struts = TRUE;
new_left.width = MIN ((int)struts[0],
window->screen->width/2 - 75);
window->screen->width/2 - MIN_EMPTY);
new_right.width = MIN ((int)struts[1],
window->screen->width/2 - 75);
window->screen->width/2 - MIN_EMPTY);
new_top.height = MIN ((int)struts[2],
window->screen->height/2 - 75);
window->screen->height/2 - MIN_EMPTY);
new_bottom.height = MIN ((int)struts[3],
window->screen->height/2 - 75);
window->screen->height/2 - MIN_EMPTY);
new_right.x = window->screen->width -
new_right.width;
new_bottom.y = window->screen->height -
@ -4945,13 +4947,13 @@ meta_window_update_struts (MetaWindow *window)
{
new_has_struts = TRUE;
new_left.width = MIN ((int)struts[0],
window->screen->width/2 - 75);
window->screen->width/2 - MIN_EMPTY);
new_right.width = MIN ((int)struts[1],
window->screen->width/2 - 75);
window->screen->width/2 - MIN_EMPTY);
new_top.height = MIN ((int)struts[2],
window->screen->height/2 - 75);
window->screen->height/2 - MIN_EMPTY);
new_bottom.height = MIN ((int)struts[3],
window->screen->height/2 - 75);
window->screen->height/2 - MIN_EMPTY);
new_left.x = 0;
new_right.x = window->screen->width -
new_right.width;