Yeah I know maximization is broken, I'm too tired to fix it. Probably

2002-06-08  Havoc Pennington  <hp@pobox.com>

        Yeah I know maximization is broken, I'm too tired to fix it.
	Probably because of the change to update_struts() that was
	supposed to fix the 100% CPU bug.

	* src/place.c (meta_window_place): don't run docks and things
	through the placement algorithm. Thought it might fix
	metacity-window-demo but it didn't.

	* src/window.c (constrain_size): only get work area when needed
	(meta_window_new): init the do_not_cover field
This commit is contained in:
Havoc Pennington 2002-06-08 06:29:19 +00:00 committed by Havoc Pennington
parent 2b780e5486
commit e694f07144
3 changed files with 39 additions and 3 deletions

View File

@ -1,3 +1,16 @@
2002-06-08 Havoc Pennington <hp@pobox.com>
Yeah I know maximization is broken, I'm too tired to fix it.
Probably because of the change to update_struts() that was
supposed to fix the 100% CPU bug.
* src/place.c (meta_window_place): don't run docks and things
through the placement algorithm. Thought it might fix
metacity-window-demo but it didn't.
* src/window.c (constrain_size): only get work area when needed
(meta_window_new): init the do_not_cover field
2002-06-08 Havoc Pennington <hp@pobox.com>
* src/screen.c (meta_screen_get_xinerama_for_window):

View File

@ -308,6 +308,27 @@ meta_window_place (MetaWindow *window,
goto done;
}
}
switch (window->type)
{
/* Run placement algorithm on these. */
case META_WINDOW_NORMAL:
case META_WINDOW_DIALOG:
case META_WINDOW_MODAL_DIALOG:
case META_WINDOW_SPLASHSCREEN:
break;
/* Assume the app knows best how to place these, no placement
* algorithm ever (other than "leave them as-is")
*/
case META_WINDOW_DESKTOP:
case META_WINDOW_DOCK:
case META_WINDOW_TOOLBAR:
case META_WINDOW_MENU:
case META_WINDOW_UTILITY:
goto done;
break;
}
if ((window->type == META_WINDOW_DIALOG ||
window->type == META_WINDOW_MODAL_DIALOG) &&

View File

@ -400,6 +400,7 @@ meta_window_new (MetaDisplay *display, Window xwindow,
window->type_atom = None;
window->has_struts = FALSE;
window->do_not_cover = FALSE;
window->left_strut = 0;
window->right_strut = 0;
window->top_strut = 0;
@ -4977,13 +4978,10 @@ constrain_size (MetaWindow *window,
int delta;
double min_aspect, max_aspect;
int minw, minh, maxw, maxh, fullw, fullh;
MetaRectangle work_area;
/* frame member variables should NEVER be used in here */
#define FLOOR(value, base) ( ((int) ((value) / (base))) * (base) )
meta_window_get_work_area (window, TRUE, &work_area);
/* Get the allowed size ranges, considering maximized, etc. */
if (window->fullscreen)
@ -5006,6 +5004,10 @@ constrain_size (MetaWindow *window,
}
else
{
MetaRectangle work_area;
meta_window_get_work_area (window, TRUE, &work_area);
fullw = work_area.width;
fullh = work_area.height;
}